Intrepid X11 Forwarding Process Not Obvious to Enable

Bug #290747 reported by Ben

This bug report was converted into a question: question #49389: Intrepid X11 Forwarding Not Working.

6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openssh (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

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.

Revision history for this message
Ben (pumrum) wrote :
Revision history for this message
Ben (pumrum) wrote :
Revision history for this message
Ben (pumrum) wrote :
Revision history for this message
Ben (pumrum) wrote :

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) wrote :

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) wrote :

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".

Changed in openssh:
status: New → Invalid
Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 290747] Re: Intrepid X11 Forwarding Not Working

Ben-

I cannot reproduce this problem.

I'm able to simply "ssh -X user@host" into either an Intrepid or a
Hardy default installation and launch a program (such as xcalc)
without a problem.

:-Dustin

Revision history for this message
Ben (pumrum) wrote :

Dustin-

Thank you for the reply. I'm using Hardy/Intrepid as the guest, not the host. So the scenario is you open a terminal on the Intrepid machine, run 'ssh -X user@host' on the Intrepid machine, where 'host' is another Unix server (in my case Solaris 10).

What I originally thought was a bug or deprecation of behavior is actually a setting that's buried in the Login Window security settings. By default, on a new installation, Hardy and Intrepid have the "Deny TCP connections to Xserver" setting checked. This prevents X11 programs on a foreign Unix host from appearing on your Ubuntu guest.

The only reason I didn't ask to have this closed is after extensive googling, it is not obvious that this is the setting required to allow X11 sessions to be passed in to the Ubuntu guest. Once you unhceck this option, everything works as expected. I'm just hoping that documentation is updated (even if it is just people finding this bug report) that makes this setting more visible.

I have also posted the steps on a related forum post here:

http://ubuntuforums.org/showthread.php?t=778860&page=3

thanks again!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.