Re: run graphical programs from ssh
Note that is ForwardX11 yes is included in your ~/.ssh/config for that host (or in general for Host *) or -X is included in the command line, DISPLAY should automatically be set in the environment to forward X program output back through ssh unless disallowed by sshd_config or some other issue.
For example this is ssh from Ubuntu 12.04 to a very old SuSE 8.2 server (Celeron 300 cpu w/158 MB RAM):
DISPLAY=:0.0 would certainly be incorrect for a forwarded display.
efflandt@xps8100-1204:~$ ssh mainpc
Last login: Sat Oct 26 17:13:04 2013 from unknown78e40026b8ac.domain_not_set.invalid
Have a lot of fun...
efflandt@realhost:~> echo $DISPLAY
While most things work as expected, when I run mozilla on the remote, for some reason it runs my local firefox with its settings (defaulting to Ubuntu Google page).
efflandt@realhost:~> which mozilla
efflandt@realhost:~> mozilla &
i5 650 3.2 GHz, 8 GB, nvidia GTX 750 Ti, 32" 1080p | i7-4700MQ, 8 GB, Intel HD 4600/nvidia GTX 765M, 15.6" 1080p | etc.