A couple of months ago my main desktop computer failed, hardware problems which stopped me from being able to access the gui (graphical user interface) not just in linux but windows 7 aswell. I found however that I could boot into cli (command line interface). This was limiting as I was only able to cli programs. However if I used ssh from another computer I was then able to start some of the gui programs. This is how I achieved this.
On the server (computer having troubles) I made sure that openssh-server was installed in debian/ubuntu sudo apt-get install openssh-server
I then edited /etc/ssh/sshd_config as root with sudo nano /etc/ssh-sshd_config and change X11Forwarding no to X11Forwarding yes. Next I restarted the ssh process with sudo service ssh restart .
On the client I checked I could ssh to the server with ssh -X email@example.com , logged and ran mousepad just as a test , it worked. Now I knew that I could do that I wanted to stream line it by adding the program I wanted to run into the ssh command , it is done like this ssh -X firstname.lastname@example.org “mousepad” and was able to enter the password , this was great from terminal and I wanted to use the run command feature of xfce , however I wasn’t prompted for the password so I couldn’t work. The solution to this is to install ssh-askpass, then I was prompted for the password and it worked as expected. The other solution would have been to create ssh-keys without a password like I did here http://sneekygeekers.com/2012/09/11/how-to-connect-to-an-ssh-share-on-boot-using-sshfs. You might find that ssh-askpass looks a bit ugly so there are other better looking options ssh-askpass-gnome, ksshaskpass and razorqt-openssh-askpass, there could also be others I’m not thinking of.
You can even take this a step further by adding an entry to the menu by creating a .desktop file into ~/.local/share/applications/, an example of what the .desktop could look like for mousepad:
Name=Mousepad on Server
Exec=ssh -X email@example.com “mousepad”
I was not able to run anything that required 3d accelaration however as my client couldn’t handle that nor receive any sound , there is supposed to be a way to do so using pulseaudio however I never managed to get this working.