I connect to a Debian server using ssh -i mykey.pem username@ip. I want to install and run, for example, a browser with a GUI and see the window from my local client, how could I do it? Elinks works, but it's kind of tough to use for navigating the web.

Before flagging this question as duplicate, I have to say that I already tried the instruction in How do I work with GUI tools over a remote server?.

I also tried login with ssh -X -i ... and ssh -Y -i ... .

X11Forwarding yes is enabled in /etc/ssh/sshd_config (on the remote server). ForwardX11 yes is set in ~/.ssh/config (local client)

echo $DISPLAY output: (after login, none)

export DISPLAY=<myip>:0.0

echo $DISPLAY output: <myip>:0.0 (after the comment above).

When trying to run xfe I get: FXApp::openDisplay: unable to open display <myip>:0.0

What's wrong? What could I try? Do I have to open any port on my local machine?

  • 1
    Before exporting DISPLAY, you should ensure it is set: what is the result of echo $DISPLAY ? If it contains localhost, you should let it unchanged. Most of the time, activating X11Forwarding in config and ssh -X ... should be sufficient. – apaul Apr 10 '15 at 12:52
  • @updated question. – S. Saavedra Apr 10 '15 at 12:54
  • Thanks, but I meant BEFORE you type export DISPLAY=... :) Just log on your server using ssh -X then type echo $DISPLAY just after you logged in. – apaul Apr 10 '15 at 12:57
  • @apaul: done, output is none. – S. Saavedra Apr 10 '15 at 17:33
  • 1
    So I guess the server is not started in init level 5, thus isn't able to run X applications. If you manage this server, you can run init 5 or modify /etc/inittab and restart the server. Else, ask the server admin to set the start init level to level 5. – apaul Apr 10 '15 at 18:26

If you are manually setting DISPLAY, you probably need to issue

 xhost +

on your local machine first. (I know, everyone will flame on about poor security etc, you could refine it a bit, but for testing, this is the most expeditious way to go).

That said, ssh -X should "just work"

| improve this answer | |
  • No luck with this. :( – S. Saavedra Apr 10 '15 at 17:46

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.