Error: no DISPLAY environment variable specified when using X server

I am trying to access GUIs from my Ubuntu 22 server. On my Windows 11 cmd with Xming installed (which I don't think I need). I run ssh -X me@myserver. Then in bash I type firefox and get the following result:

Error: no DISPLAY environment variable specified

If I set DISPLAY to localhost 0.0, it says:

Unable to init server: Could not connect: Connection refused Error: cannot open display: :0.0

Do I need an actual display plugged in my server?

Related question:

3 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like