Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
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 ...
  1. #1
    Just Joined! champ_weller's Avatar
    Join Date
    Sep 2011
    Location
    ohio
    Posts
    90

    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

  2. #2
    Linux Guru
    Join Date
    May 2011
    Posts
    1,843
    try "ssh -Y root@blah". when you get to the remote shell, run this command:
    Code:
    echo $DISPLAY
    What do you get? you should see something like localhost:11.0

    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?

  3. #3
    Just Joined! champ_weller's Avatar
    Join Date
    Sep 2011
    Location
    ohio
    Posts
    90
    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

  4. #4
    Linux 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'?

  5. #5
    Just Joined! champ_weller's Avatar
    Join Date
    Sep 2011
    Location
    ohio
    Posts
    90
    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

  6. #6
    Just Joined! champ_weller's Avatar
    Join Date
    Sep 2011
    Location
    ohio
    Posts
    90
    :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

  7. #7
    Linux 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:

    Code:
    ssh -oForwardX11=yes -oForwardX11Trusted=yes <user>@<remote_pc>
    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.

    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):
    Code:
    ps auxww|grep -v grep|grep X
    The local session might need to allow the connection with xhost, too. On the local machine, do this:
    Code:
    xhost +
    You should see "access control disabled, clients can connect form any host" or something like that. Then try your remote ssh login.

  8. #8
    Just Joined! champ_weller's Avatar
    Join Date
    Sep 2011
    Location
    ohio
    Posts
    90
    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?

  9. #9
    Linux 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:
    Code:
    export DISPLAY=<OHIO_IP_ADDRESS>:0.0
    Now, if you echo the $DISPLAY variable in the terminal, you should get it echoed back to you. Now try gedit or whatever.

  10. #10
    Just Joined! champ_weller's Avatar
    Join Date
    Sep 2011
    Location
    ohio
    Posts
    90
    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

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...