Intrepid X11 Forwarding Not Working

Asked by Ben

Binary package hint: ssh

I'm using the Intrepid Release Candidate CD. The exact problem detailed below also exists on 8.04, 8.04.1, and all of the Intrepid Alpha releases. The problem described below does NOT exist on 7.10 (Gutsy).

I've been using Gutsy for almost a year to connect to a Solaris 10 box running an X server. I type 'xhost +' then 'ssh -X user@server'. When I type 'echo $DISPLAY' in the SSH session, it shows 192.168.1.1:0.0. I can then type 'firefox' and after a few seconds, a firefox X11 window will pop up. This is just one example, I use it for several X programs on the Solaris server. When I use my Gutsy laptop to connect to the Solaris server, everything works as expected. I can also connect from CygWin and MING clients on Windows.

I am now booting into a fresh Intrepid Release Candidate installation. I type 'xhost +' then 'ssh -X user@server'. I check my display variable in the SSH session and it's fine, the same as on the Gutsy server. However, when I go to run an X program, I get an X11 error. The actual error varies depending on the program I run, but they all boil down to the same root message: "Gtk-WARNING **: cannot open display:" or "Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using '192.168.1.1:0.0' as the value of the DISPLAY variable."

Ive tried changing the display variable to:

--localhost:0.0
--localhost:10.0
--192.168.1.1:10.0

nothing seems to work. Any thoughts on how to fix this in Intrepid? Any idea what broke going from Gutsy to Intrepid (well, it broke first in Hardy, but continues to be broken in Intrepid)?

I will attach several outputs. I have attached a log of my SSH session to this post. It shows what happens when I run:

xhost +
ssh -vvvX user@server
<login with user and pass>
/path/to/X11/program.sh
<x11 forwarding error>

the same exact process on Gutsy will start the X11 program.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu openssh Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Ben (pumrum) said :
#1
Revision history for this message
Ben (pumrum) said :
#2
Revision history for this message
Ben (pumrum) said :
#3
Revision history for this message
Ben (pumrum) said :
#4

xauth> info
Authority file: /home/mylaptopuser/.Xauthority
File new: no
File locked: no
Number of entries: 2
Changes honored: yes
Changes made: no
Current input: (stdin):4
xauth> list
mylaptop/unix:0 MIT-MAGIC-COOKIE-1 e24980098a8be905613e5475c9874c7a
localhost.localdomain/unix:0 MIT-MAGIC-COOKIE-1 e24980098a8be905613e5475c9874c7a
xauth>

Revision history for this message
Ben (pumrum) said :
#5

I have solved my problem, and will post the steps here. I'm not sure if this should be considered a 'wishlist' item, or if this is just how the operating system is supposed to work -- but it's very frustrating that this option is buried. I've posted the related steps to the Ubuntu forums and hopefully others looking to forward X11 sessions to their Hardy/Intrepid guests will find this information useful.

For those of you struggling with this in Hardy or Intrepid (I'm pretty sure this isn't necessary in Gutsy):

The default install of both Hardy and Gutsy are almost completely ready to act as X11 guests (that is, you log into a *nix server from your Ubuntu desktop, run a command, and a GUI program appears on your Ubuntu machine).

The only steps needed are:

[B]Enable TCP connections to Xserver (only need to do this once)
-System > Administration > Login Window
-Click the Security tab
-Uncheck 'Deny TCP connections to Xserver'
-Restart the Ubuntu computer[/B]

Enable xauth forwarding (do this only once per Ubuntu session)
-Open a terminal
-Type 'xhost +' and press Enter

Connect to the server (do this for every SSH session, obviously)
-Open a terminal
-Type 'ssh -X <email address hidden>' and press Enter

Hope this saves some frustration!

Revision history for this message
Ben (pumrum) said :
#6

I originally submitted this as a bug because I'm pretty sure the login window process wasn't necessary in Gutsy, but is now required in Hardy/Intrepid.

I still feel that this process needs attention, or at least some official documentation that can be Google'd. Anyone looking to enable X11 forwarding and use their Hardy/Intrepid machine as a guest for X11 sessions would be hard pressed to find the checkbox buried in "system > administration > login screen > security".

Revision history for this message
Launchpad Janitor (janitor) said :
#7

This question was expired because it remained in the 'Open' state without activity for the last 15 days.