FedoraForum.org - Fedora Support Forums and Community
Results 1 to 11 of 11
  1. #1
    Join Date
    Nov 2017
    Location
    Reykjavík
    Posts
    5

    $DISPLAY not working

    Hi all - first post here! I'm a longtime Linux user, and am actually surprised to be encountering an issue on what should be a trivial problem. I'm simply trying to run a GUI program (for now, just trying with xterm!) on a remote host. Simple, right? It's slightly more complicated than usual in that I'm running it from a docker session inside a screen session, so I can't just "ssh -Y" in; I need to manually set $DISPLAY. Which should be simple. But it's just not working. More to the point, it doesn't work outside the docker session either, so it clearly has nothing to do with docker (although I ultimately need to get it to work in docker, of course!).

    Local host: 192.168.1.68
    Remote host: chmmr

    If I do:

    ssh -Y chmmr

    .... then I can run xterm just fine. DISPLAY is set to "localhost:13.0", which I find a bit odd (13? I only have one X session open on 192.168.1.68, but okay). If I however run:

    ssh chmmr

    ... then nothing I do seems to work to not get a "xterm: Xt error: Can't open display:" error. Each export display starts "export DISPLAY=192.168.1.68:"; after that I've tried pretty much everything. "", "0", "0.", "0.0", ".0", "13", "13.", "13.0", etc. I can ssh just fine from chmmr back to 192.168.1.68. I've run "xhost +" on 192.168.1.68. I've shut off iptables on 192.168.1.68. But nothing ever works.

    Thoughts?

  2. #2
    Join Date
    Feb 2005
    Location
    London, UK
    Posts
    566

    Re: $DISPLAY not working

    Are you using Wayland?

  3. #3
    Join Date
    Nov 2017
    Location
    Reykjavík
    Posts
    5

    Re: $DISPLAY not working

    chmmr:
    Linux version 4.11.6-301.fc26.x86_64 (mockbuild@bkernel01.phx2.fedoraproject.org) (gcc version 7.1.1 20170526 (Red Hat 7.1.1-2) (GCC) ) #1 SMP Tue Jun 20 16:17:33 UTC 2017

    192.168.1.68: Linux version
    4.11.12-100.fc24.x86_64 (mockbuild@bkernel02.phx2.fedoraproject.org) (gcc version 6.3.1 20161221 (Red Hat 6.3.1-1) (GCC) ) #1 SMP Fri Jul 21 17:35:20 UTC 2017

  4. #4
    Join Date
    Feb 2005
    Location
    London, UK
    Posts
    566

    Re: $DISPLAY not working

    These days Fedora uses Wayland by default, this is a replacement for X11/Xorg. As $DISPLAY is an X11 specific thing I wouldn't expect it to work in Wayland. You can tell if you're running wayland by running "loginctl" from the command line to list sessions and then "loginctl show-session <N> -p Type" where <N> is the session number from the first command.

  5. #5
    Join Date
    Dec 2012
    Location
    santa barbara, CA
    Posts
    447

    Re: $DISPLAY not working

    If you want to switch back to Xorg, I suggest [yum group install "Xfce Desktop"] , then when logging in, choose that from the session list instead of GNOME.

    Oh, but also, do this:
    systemctl disable gdm
    systemctl enable lightdm

    then reboot.
    "monsters John ... monsters from the ID..."
    "ma vule teva maar gul nol naya"

  6. #6
    Join Date
    Feb 2005
    Location
    London, UK
    Posts
    566

    Re: $DISPLAY not working

    Quote Originally Posted by bobx001
    If you want to switch back to Xorg, I suggest [yum group install "Xfce Desktop"] , then when logging in, choose that from the session list instead of GNOME.
    Suggesting to stop using Gnome is a bit drastic, there is a Gnome-classic (i.e: xorg) session available... I'm a Window Maker user myself but I wouldn't recommend it for most users. Editing /etc/gdm.custom.conf will allow gdm to be used without Wayland, although lxdm is another option as well.

  7. #7
    Join Date
    Oct 2011
    Posts
    1,632

    Re: $DISPLAY not working

    There is `GNOME Classic` but there is also a `GNOME on Xorg` session. Two different things. I am not sure on what Gnome Classic runs on thought.


  8. #8
    Join Date
    Nov 2017
    Location
    Reykjavík
    Posts
    5

    Re: $DISPLAY not working

    Wow, okay, I just assumed Wayland was a Fedora release name - I had no clue that it was an xorg branch. Lol, I began with X long before it was xorg, I really need to keep up with these things better

    On both chmmr and 192.168.1.68, it says Type=x11. So that means xorg, no?

    Re, Gnome / xfce: LOL, no way I'm switching desktops (I use KDE), but thanks

    I should probably reiterate: if I do "ssh -Y chmmr" I can run GUI programs (like, say, xterm) just fine. So it clearly is possible. I just can't get it to work by hand-tweaking the $DISPLAY variable, which seems to be what would be needed for running a GUI program in the docker session.,
    Last edited by KarenRei; 1st December 2017 at 10:34 PM.

  9. #9
    Join Date
    Nov 2017
    Location
    Reykjavík
    Posts
    5

    Re: $DISPLAY not working

    No ideas?

  10. #10
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    2,708

    Re: $DISPLAY not working

    While it used to be possible to simply set the DISPLAY to your workstation's display, that is now a bit more difficult with the security protocols.
    Quoting from the man page for ssh X11 forwarding:
    The DISPLAY value set by ssh will point to the server machine, but with a display number greater than
    zero. This is normal, and happens because ssh creates a “proxy” X server on the server machine for
    forwarding the connections over the encrypted channel.

    ssh will also automatically set up Xauthority data on the server machine. For this purpose, it will
    generate a random authorization cookie, store it in Xauthority on the server, and verify that any for‐
    warded connections carry this cookie and replace it by the real cookie when the connection is opened.
    The real authentication cookie is never sent to the server machine (and no cookies are sent in the
    plain).
    I think you will need to study the X security stuff: "man Xsecurity" should get you started.

  11. #11
    Join Date
    Nov 2017
    Location
    Reykjavík
    Posts
    5

    Re: $DISPLAY not working

    I'm just going to have to try to find another way to work around this. I can't believe something that used to be so simple has been made so complicated :Ţ That's not progress.

Similar Threads

  1. Replies: 0
    Last Post: 17th June 2010, 12:32 PM
  2. can't get remote display working
    By hvniekerk in forum Servers & Networking
    Replies: 15
    Last Post: 28th November 2007, 04:45 PM
  3. on screen display not working on ibm t41
    By ruxbo in forum Hardware & Laptops
    Replies: 0
    Last Post: 16th November 2007, 09:03 AM
  4. fix for non working display's in FC5!
    By steve941 in forum Using Fedora
    Replies: 0
    Last Post: 23rd March 2006, 04:52 PM
  5. T20 IBM with Savage 1X-MV Display not working.
    By Dastekcom in forum Installation, Upgrades and Live Media
    Replies: 0
    Last Post: 23rd March 2006, 02:37 AM

Posting Permissions

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