Find the answer to your Linux question:
Results 1 to 2 of 2
computerA is RedHat 4. from my box, I ssh as root into computerA when i try to run gedit (/usr/bin/gedit) , I get: Gtk-WARNING **: cannot open display: I set ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2006
    Posts
    26

    X Windows error


    computerA is RedHat 4.

    from my box, I ssh as root into computerA

    when i try to run gedit (/usr/bin/gedit) , I get:

    Gtk-WARNING **: cannot open display:

    I set my display to be localhost:10.0, and even my IP:0.0 and I did xhost + on my box.

    Now, I can get this to work with X forwarding:

    ssh -X root@computerA

    when I echo $DISPLAY after the X forwarding, I get localhost:10.0

    ----------------------------

    Why is this only working using X11 forwarding? how do I get X windows to work with just ssh ?

    thanks

    ----------------------------

    here's tail of /var/log/messages:
    Aug 17 14:20:01 tpx22 crond(pam_unix)[8322]: session opened for user root by (uid=0)
    Aug 17 14:20:01 tpx22 crond(pam_unix)[8322]: session closed for user root
    Aug 17 14:24:58 tpx22 sshd(pam_unix)[8331]: session opened for user root by root(uid=0)
    Aug 17 14:25:13 tpx22 gconfd (root-8366): starting (version 2.8.1), pid 8366 user 'root'
    Aug 17 14:25:13 tpx22 gconfd (root-8366): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only configuration source at position 0
    Aug 17 14:25:13 tpx22 gconfd (root-8366): Resolved address "xml:readwrite:/root/.gconf" to a writable configuration source at position 1
    Aug 17 14:25:13 tpx22 gconfd (root-8366): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only configuration source at position 2
    Aug 17 14:25:44 tpx22 sshd(pam_unix)[8375]: session opened for user root by root(uid=0)

  2. #2
    Linux Enthusiast KenJackson's Avatar
    Join Date
    Jun 2006
    Location
    Maryland, USA
    Posts
    510
    Put some or all of these lines, as desired, in either /etc/ssh/ssh_config or ~/.ssh/config on the client machine

    ForwardX11 yes
    ForwardX11Trusted yes
    ForwardAgent yes

Posting Permissions

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