Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
share|improve this question

3 Answers 3

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

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer
    
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 '12 at 16:47
    
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. –  Janus Troelsen May 11 '12 at 21:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.