Lunux: start X application from ssh

To start any X application on the active display using ssh session fist you are need export environment variable with display number and the execute application binary.

$ export DISPLAY=:0
$ firefox

Pay attention, display not always has number 0, try 1 or more if it doesn’t work. And of course, you must run it from a user that have an active X session.

One line variant.

DISPLAY=:0 nohup gedit

 

Leave a Reply

Your email address will not be published. Required fields are marked *