Tuesday, October 8, 2013

Run X Applications Over Network Using SSH

Topology:
Linux-based PC: 192.168.1.1
Linux-based Laptop: 192.168.1.7

In PC, you edit /etc/ssh/sshd_config using any editor you like:
$ sudo vi /etc/ssh/sshd
Looking for this line, or you can add if it's not already there:
X11Forwarding     yes
Save that file and restart SSH service:
$ sudo /etc/init.d/ssh restart
Allow Laptop to run X applications:
$ xhost 192.168.1.7
Define default display:
$ export DISPLAY=192.168.1.1:0

Then from Laptop terminal, run the command to execute any X applications you like:
$ ssh -X [username]@192.168.1.1 firefox
$ ssh -X [username]@192.168.1.1 oowriter

That's it! :)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

No comments:

Post a Comment

Hi, for all of those who already put comments on my blog post, thanks.. really appreciate it. And for those who have not, just put your comments here :)