Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Main Support Categories > General Help
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

General Help
All your general support questions for Ubuntu, Kubuntu, Edubuntu and Xubuntu.

 
Thread Tools Display Modes
Old November 12th, 2009   #1
subuta
First Cup of Ubuntu
 
Join Date: Nov 2008
Beans: 12
Help with X Remote Display Please - 3rd Request

Hello,

Since I upgraded my main Ubuntu host to 9.10:

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.10
DISTRIB_CODENAME=karmic
DISTRIB_DESCRIPTION="Ubuntu 9.10"

I am no longer able to display X applications running on other machines. In the past I did this with xhost, but it no longer works:

connect scapps1 port 6000: connection refused

I will also need to run X forwarding over SSH. That too is is not working. I have searched the web and fiddled with the various configuration settings, although I have not been able to change the setting in Gnome System->Administration-Login Screen ->Security because my login administration screen doesn't have any tabs(! - I haven't been able to find any help for that issue).

Note that my x server is starting with tcp nolisten turned on:

root 1422 1416 0 09:33 tty7 00:00:13 /usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-gdm-BpQqZZ/database -nolisten tcp vt7

I have not been able to change this regardless of the settings in /etc/X11/xinit/xserverrc:

$ more /etc/X11/xinit/xserverrc
#!/bin/sh

# $Id: xserverrc 189 2005-06-11 00:04:27Z branden $

#exec /usr/bin/X11/X -nolisten tcp
exec /usr/bin/X11/X

or in /etc/gdm/gdm.conf:

$ grep TCP /etc/gdm/gdm.conf
DisallowTCP=false


Thanks for your help.

-Dan

Last edited by subuta; November 12th, 2009 at 06:18 AM..
subuta is offline   Reply With Quote
Old November 12th, 2009   #2
kjohri
Just Give Me the Beans!
 
Join Date: Dec 2008
Location: Ghaziabad, India
Beans: 57
Ubuntu 9.10 Karmic Koala
Send a message via AIM to kjohri Send a message via Skype™ to kjohri
Re: Help with X Remote Display Please - 3rd Request

Try this link

http://www.softprayog.in/troubleshoo...-display.shtml
kjohri is offline   Reply With Quote
Old November 12th, 2009   #3
sainth
First Cup of Ubuntu
 
Join Date: Nov 2009
Beans: 1
Re: Help with X Remote Display Please - 3rd Request

It used to be you could use the gdmsetup GUI to make the change, but it seems with 9.10 you have to do it manually. Only two things need to be done.

First add to /etc/gdm/custom.conf:
Code:
[security]
DisallowTCP=false
Then restart GDM:
Code:
sudo /etc/init.d/gdm restart
You should be able to open a terminal and run:
Code:
ssh -X (REMOTE)
And then run any X application which should display on your local desktop.

Last edited by sainth; November 12th, 2009 at 01:20 PM..
sainth is offline   Reply With Quote
Old November 13th, 2009   #4
subuta
First Cup of Ubuntu
 
Join Date: Nov 2008
Beans: 12
Re: Help with X Remote Display Please - 3rd Request

Hi Kjhori and Sainth,

Thank you both very much for your replies. Although the problem is not yet resolved, I sincerely appreciate your efforts.

Kjhori, I had already taken the steps recommended in the "X Forwarding" section of the excellent article for which you sent a link.

Sainth, I was full of optimism when I saw your suggestion but, unfortunately it has not resolved the problem.

The situation is still this:

If I try to run an xterm from a terminal on another machine with DISPLAY set to my 9.10 machine's display I get "Can't open display scapps:0.0" This is a procedure that I used routinely prior to the upgrade.

If I use ssh -X (or Y) from my 9.10 machine to another host, then try to run an xterm I get the same error. If I unset the value of DISPLAY in the ssh shell before I try to run xterm then I get

$ xterm
xterm Xt error: Can't open display:
xterm: DISPLAY is not set

I note that the x server on my 9.10 machine is still started with nolisten tcp:

root 1446 1435 1 07:41 tty7 00:00:30 /usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-gdm-rveJrz/database -nolisten tcp vt7

which I think would prevent the xhost method from working but not the x forwarding.

So it seems that the formerly reliable xhost capability is lost, and I am unable to activate the new (to me) X forwarding feature of ssh.

If you have any additional suggestions I would be most grateful.

-Dan
subuta is offline   Reply With Quote
Old November 18th, 2009   #5
pvravi
Just Give Me the Beans!
 
Join Date: Feb 2007
Beans: 46
Re: Help with X Remote Display Please - 3rd Request

Bump. I need this functionality as well.
pvravi is offline   Reply With Quote
Old November 18th, 2009   #6
JBAlaska
Dipped in Ubuntu
 
JBAlaska's Avatar
 
Join Date: Aug 2007
Location: Off the Alaskan Coast
Beans: 573
Ubuntu Development Release
Re: Help with X Remote Display Please - 3rd Request

Did you update your ssh key after you upgraded to 9.10?
__________________
FIC K8-800T AMD64 3200+ 2GB PC3200 GeForce 6800GT Mandriva 2010 KDE+Compiz+Emerald
MSI K9N2GM AMD 9950BE 4GB DDR2-800 GeForce 8200 10.04 Alpha-1 WUSB600N
Acer 6920 Core 2 Duo 4GB GeForce 9500GS Karmic 9.10 Ubuntu User #17586
JBAlaska is offline   Reply With Quote
Old November 18th, 2009   #7
Giblet5
May the Ubuntu Be With You!
 
Giblet5's Avatar
 
Join Date: Sep 2006
Beans: 1,610
Ubuntu 9.10 Karmic Koala
Re: Help with X Remote Display Please - 3rd Request

Are you setting a DISPLAY variable out of .bashrc on the remote system? Don't do that. It will break ssh's X11-Forward capability.

Do an ssh -X to open an interactive shell on the remote and enter
Code:
echo $DISPLAY
If it says anything other than
Code:
localhost:10.0
then you broke it. Find where you're defining your broken DISPLAY variable and remove it.

A workaround that will make it work "your way" is to open a terminal on the local machine and enter:
Code:
xhost +
Now, anyone in the world can connect to your X server. Including me.

No, click the other button. Yes! Now enter your password. Wow, "password" is a really bad password. I'll be right back after I [strike]empty your bank account[/strike] get some coffee.



Pro tip:

Add entries to your ~/.ssh/config file like
Code:
Host websrv
  ForwardX11 yes
Host larry
  ForwardX11 yes
Host curly
  ForwardX11 yes
Host mo
  ForwardX11 yes
And you can do stuff like
Code:
ssh curly amarok
and blow curly's eardrums with Celine Dionne music.
__________________
sı ɯǝ1qoɹd ɹnoʎ ʇɐɥʍ ǝǝs ı ʞuıɥʇ ı

Last edited by Giblet5; November 18th, 2009 at 05:24 PM.. Reason: you know me...
Giblet5 is offline   Reply With Quote
Old November 19th, 2009   #8
subuta
First Cup of Ubuntu
 
Join Date: Nov 2008
Beans: 12
Re: Help with X Remote Display Please - 3rd Request

Resolved!

Sainth, I went back and reviewed my work and found that I had made a mistake when trying to follow your advice. I corrected my error and now the problem is resolved.

As near as I can tell, the upgrade to 9.10 resets X/GDM(?) to disallow X clients from other hosts. It also appears to have removed the tab from the Security admin program that would have allowed me to set it back. Sainth's suggestion of adding DisallowTCP=false to the custom.conf file (see his/her post for correct syntax and filename) fixes the problem.

Many thanks to all who tried to help out.

-Dan
subuta is offline   Reply With Quote

Bookmarks

Tags
9.10, remote, x server

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:08 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry