Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-31-2007, 02:18 PM   #1
LQ Newbie
Registered: Oct 2006
Distribution: Slackware, Mandriva, and Fedora when I must
Posts: 27

Rep: Reputation: 15
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.

Old 07-31-2007, 02:50 PM   #2
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 124Reputation: 124
So, "echo $DISPLAY" returns nothing? Try using -Y for trusted X11 forwarding (like -X, but not concerned about Authority)
Old 07-31-2007, 05:03 PM   #3
LQ Newbie
Registered: Oct 2006
Distribution: Slackware, Mandriva, and Fedora when I must
Posts: 27

Original Poster
Rep: Reputation: 15
Still nothing from using -Y.
Old 09-23-2010, 04:54 PM   #4
LQ Newbie
Registered: Sep 2010
Posts: 1

Rep: Reputation: 0
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.
Old 10-25-2010, 01:47 PM   #5
LQ Newbie
Registered: Oct 2010
Location: United States of America
Distribution: rhel, suse, centos, etc.
Posts: 3

Rep: Reputation: 0
ssh -Y or -X not working...


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
ssh -Y -l me
ssh -X -l me

Good luck,


display, forwarding, ssh, tunneling, x11

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
No X11 DISPLAY variable was set, but this program performed an operation which requir ernestkok Fedora 1 04-04-2007 07:10 PM
mplayer -vo x11, how do I specify which display? lukebeales Linux - Software 2 09-17-2004 09:35 AM
Correct X11 display??? s1lv1a9999 Linux - Software 2 05-03-2004 01:39 AM
Problems exporting X11 display fskdjvdw Debian 1 01-13-2004 06:28 AM
X11 display failed logins rangerx Linux - Security 0 09-19-2002 10:39 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:04 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration