Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start Gnome-Application from SSH-Shell

Tags:

linux

shell

gnome

my development server has a running Gnome-Desktop. I am connected to it by a ssh session. The Gnome-Session and the ssh session are running with the same user.

How to I start a Gnome-application (for example gedit) from the ssh remote session so that it appears on the remote servers Gnome-Desktop?

Thanks a lot, Hacksteak25

like image 216
hacksteak25 Avatar asked Oct 19 '25 01:10

hacksteak25


1 Answers

This would probably work:

Tcsh:

setenv DISPLAY :0
gedit

Bash:

export DISPLAY=:0
gedit

If you are not the user that is logged into the Gnome session, then you would need to do xhost + to disable the authentication.

If the above doesn't work, then instead of :0, try simply copying the DISPLAY environment variable to the ssh terminal.

like image 161
Bill Lynch Avatar answered Oct 21 '25 15:10

Bill Lynch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!