2

I know -X -Y options in ssh for X11 forwarding.But these options open the gui apps on my pc.But I want to open a gui application "exactly" on target machine. So please help me with this. I tried this but ended up with the following error.

No protocol specified
No protocol specified
No protocol specified
Error: cannot open display: :0

3 Answers 3

1

You need to run xhost to allow connections from that user. The following will allow anybody to open windows on that machine:

xhost +

Note that this needs to be run in a terminal that is running on the X server. See the xhost manpage for more information.

1

If you want to see the screen of the machine you're connecting to, use VNC. This will make everything you do appear as if you did it on the target machine's desktop. sudo apt-get install x11vnc and then start x11vnc from the command line.

If you want to start applications on an invisible screen that you can connect to and display from any location, use xpra. You can even show the "virtual screen" on one machine, then disconnect, and connect from another machine (over SSH) and show the same screen, all without terminating the session.

2
  • I don't think either of these is what he was asking for. It sounds like he wants to open an application on the local display while logged in remotely over ssh. You don't need any extra applications to accomplish this (see my answer below).
    – pestilence
    May 11, 2012 at 16:47
  • 1
    he should make sure the question is clear. :P maybe this is what he wants, maybe he wants what you said. xpra will work for him even if X forwarding over SSH would have been enough. May 11, 2012 at 21:04
1

I assume that the x-server is already running on the machine you connect to. Before you execute the command on the remote machine run the following command:

export DISPLAY=:0

Now you can start your x-application, should pop up on the display 0.

br

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .