7

How to run X11 GUI applications from a remote server using SSH?

For example:

  • my first desktop 192.168.1.1
  • my second desktop IP 192.168.1.12

I 'm sshing from my first desktop to the second and i want to run the GUI applications from the second and redirect X11 to the first.

  • try ssh -l user 192.168.1.12 -X. Start app. – 2707974 Mar 20 '14 at 6:40
5

Try the following command to create the ssh connection:

ssh -X remote_login@192.168.1.12

Just replace remote_login by your second desktop login

ssh man page:

-X Enables X11 forwarding. This can also be specified on a per-host basis in a configuration file.

 X11 forwarding should be enabled with caution.  Users with the
 ability to bypass file permissions on the remote host (for the
 user's X authorization database) can access the local X11 display
 through the forwarded connection.  An attacker may then be able
 to perform activities such as keystroke monitoring.

 For this reason, X11 forwarding is subjected to X11 SECURITY
 extension restrictions by default.  Please refer to the ssh -Y
 option and the ForwardX11Trusted directive in ssh_config(5) for
 more information.
2

Ok, I found a way:

ssh -X user@192.168.1.12

Then when I login I just easily can start whatever GUI app I need. I tried Firefox and yes I can just use Firefox from the second computer. That's really nice.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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