Results 1 to 10 of 16
i ran ssh -X root@xipadderss and yes i used a capital X now i type in gedit to see if the -X forwarding work but i got this
cannot open ...
- 09-28-2011 #1
centos ssh server -X forwarding gedit
i ran ssh -X root@xipadderss and yes i used a capital X now i type in gedit to see if the -X forwarding work but i got this
cannot open display:
Run 'gedit --help' to see a full list of available command line options.
i was hping to see gedit to pop up on my screen but it didnt am i doing something wrong how do i take advantage of -X forwarding
- 09-29-2011 #2Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
try "ssh -Y root@blah". when you get to the remote shell, run this command:
What do you get? you should see something like localhost:11.0Code:echo $DISPLAY
Also, I assume you are logged into an X session (Gnome, KDE, etc.) on the local machine? And running the ssh command from a terminal window as the same user logged into the desktop?
- 09-29-2011 #3
i typed in the command exactly as you said "echo $DISPLAY" the terminal skipped a line it didnt say anything about localhost:11.0 and then appeared root@scott like it was suppose to i typed in firefox and got the same error: no display specified
- 09-30-2011 #4Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
Try the same command in the terminal on the local system, as in, before you ssh into the remote PC. You should definitely get something there. Report what that says and we'll go from there.
Did you try 'ssh -Y'?
- 10-02-2011 #5
oh ok sorry i misunderstood and sorry i havent been able to post in a while i dont want you to think this is a dead topic but i sent you a pm explaining lol ill log on tomorrow and tell you my results if thats ok
- 10-02-2011 #6
:0.0
that is the result i recieved after the command echo $DISPLAY on my local pc
and i did try the ssh -Y still get the error: no display specified
- 10-03-2011 #7Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
Okay, the DISPLAY env var is not getting set on the remote host, for some reason. The -X or -Y should be doing that. Try the ssh_config method of forwarding X11:
You might want to tack on the -'v' flag to the ssh command, so you can get more output, to help trouble shoot the problem.Code:ssh -oForwardX11=yes -oForwardX11Trusted=yes <user>@<remote_pc>
It's possible your local X server is not allow TCP connections (-nolisten tcp), but I don't think that's it. You can check how X is running by doing this (on the local pc):
The local session might need to allow the connection with xhost, too. On the local machine, do this:Code:ps auxww|grep -v grep|grep X
You should see "access control disabled, clients can connect form any host" or something like that. Then try your remote ssh login.Code:xhost +
- 10-03-2011 #8
when i ran this command: ps auxww|grep -v grep|grep X i got this message.
root 1002 8.0 12.9 78060 61372 tty7 Ss+ 17:59 1:26 /usr/bin/X :0 -nr -verbose -auth /var/run/gdm/auth-for-gdm-m6wZYJ/database -nolisten tcp vt7
i ran the command: xhost + got the message you said and it wouldn't work with either -X or -Y. this is the server i am training on it is located in texas i am in ohio. is it possible the person who install it onto the machine did not install a window manager?
- 10-04-2011 #9Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
Did you run that 'ps auxww' command locally (Ohio)?
The remote server (Texas) does not need a window manager installed, or even X for that matter. Just an X app that you wish to export to your local display.
You can try setting the DISPLAY env var manually, though that way is somewhat deprecated these days. First figure out the ip address of your Ohio server (and if it has multiple ips, use the one that communicates with Texas). Then ssh into Texas. Once at a terminal in Texas, set your display env var like this:
Now, if you echo the $DISPLAY variable in the terminal, you should get it echoed back to you. Now try gedit or whatever.Code:export DISPLAY=<OHIO_IP_ADDRESS>:0.0
- 10-07-2011 #10
Sorry i am such a noob at this and reply very slow i am busy anywho, i tried export DISPLAY=192.168.1.5 tried to run an application and got this mesage Error: cannot open display: 192.168.1.5:0.0
well i tried again but a different ip address 127.0.0.1 and recieved the same error message.
i got this info from doing a ifconfig on my local machine i found the 192.168.1.5 under the wlan0 section because my machine is connected to my router via wireless usb adapter. in the lo section i found 127.0.0.1
thank you for being patient with me


Reply With Quote