Linux: how to setup SSH X11 forwarding and can run x aplications, when X server is not running now?
Hello, I have a Linux Ubuntu at home that runs on Raspberry. For performance reasons, I have turned off the GUI X server and only go through CLI. But all X applications stayed on the machine. X11 server but I do not want to turn on, but I would like to run X applications via SSH X11 forwarding. I have these questions:
1.) Is it possible to run X applications over SSH when the X server is turned off on the destination server?
2.) How do I set up SSH X11 forwarding?
3.) How is it used?
Thank you
Hello,
to your questions about SSH X11 forwarding:
1.) Yes, running X applications via SSH is possible even if the X server is disabled on the target server
2.) How do I set up SSH X11 forwarding - just edit the following values on the target server in the sshd_config file:
#restart SSH
3.) Using SSH X11 forwarding
- just add -X after ssh as follows:
- and then you can run gparted in this SSH session
- this will open a window on your PC even though the program is running on the target server.
1.) Is it possible to run X applications over SSH when the X server is turned off on the destination server?
2.) How do I set up SSH X11 forwarding?
3.) How is it used?
Thank you
REPLY
Hello,
to your questions about SSH X11 forwarding:
1.) Yes, running X applications via SSH is possible even if the X server is disabled on the target server
2.) How do I set up SSH X11 forwarding - just edit the following values on the target server in the sshd_config file:
vim /etc/ssh/sshd_config
X11Forwarding yes
X11DisplayOffset 10
#restart SSH
systemctl restart sshd
3.) Using SSH X11 forwarding
- just add -X after ssh as follows:
ssh -X user@10.10.10.10
- and then you can run gparted in this SSH session
gparted
- this will open a window on your PC even though the program is running on the target server.