开发者

Start Gnome-Application from SSH-Shell

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜