开发者

Start Gnome-Application from SSH-Shell

开发者 https://www.devze.com 2023-01-15 00:29 出处:网络
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.

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 o开发者_如何学JAVAn the remote servers Gnome-Desktop?

Thanks a lot, Hacksteak25


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.


To support DBUS messaging, use:

ssh -Y remoteuser@remotehost dbus-launch -f gedit

The "-f" option starts the remote GUI application on the local desktop and returns, leaving the local terminal available for the next command.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号