LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   X11 over SSH: $DISPLAY not being set (https://www.linuxquestions.org/questions/linux-networking-3/x11-over-ssh-%24display-not-being-set-573737/)

Dria 07-31-2007 02:18 PM

X11 over SSH: $DISPLAY not being set
 
I'm trying to get X11 over SSH working, from my laptop to my desktop. Both are running Slackware 11. The instructions and tutorials all claim it works automagically -- configure ssh_config and sshd_config, ssh -X user@remotebox, and you're gold. However, $DISPLAY is not being set when I SSH in, where any recent post on the topic says it should be. I've checked /etc/profile on the remote box, and it's not doing anything to $DISPLAY; the only two files in my home directory are .bash_history and an empty .Xauthority. This is new to me, so if there's something I might have overlooked, please tell me.

Thanks :)

Matir 07-31-2007 02:50 PM

So, "echo $DISPLAY" returns nothing? Try using -Y for trusted X11 forwarding (like -X, but not concerned about Authority)

Dria 07-31-2007 05:03 PM

Still nothing from using -Y.

johndoe32102002 09-23-2010 04:54 PM

I have gotten this same error. I have X11 running fine on the remote computer on DISPLAY :10, and when I try to ssh with -Y or -X, I can ssh in, but have no display. When I type echo $DISPLAY in ssh, I get nothing back. I have also tried logging in to ssh as root with -Y and -X, and I get the same scenario. I am running Ubuntu 10.04 x64 on the remote computer and openssh (Maemo ARM) on the client.

ddbtek 10-25-2010 01:47 PM

ssh -Y or -X not working...
 
Hello,

I will use the term "server" and "client", knowing that X is Server<->Server architecture and server/client is a misnomer but it helps facilitate a discussion. There are several things that can cause this. You've ruled out the simple ones:
  1. DISPLAY is not set on client (you explicitly set it)
  2. xhost + (not needed with SSH tunneling)
  3. SSH supports X forwarding (make sure /etc/ssh/sshd_config is set to allow this)
  4. Make sure your SSH on the "server" was compiled to to allow X (most RPM and YUM available packages are)
  5. etc
The other factor could be a missing library or something on your "server" related to X.

I solved this problem by installing my missing X subsystem via yum:
  1. Code:

    yum install xorg-x11-server-Xdmx.x86_64
  2. Code:

    yum install xterm.x86_64
  3. Code:

    yum install xorg-x11-xinit.x86_64

Then when I rebooted the server (I could have started everything manually) it worked. I could
Code:

ssh -Y -l me abc.com
or
Code:

ssh -X -l me abc.com
.

Good luck,
David


All times are GMT -5. The time now is 07:16 PM.