Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot connect to X server after upgrading [solved]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
leo
n00b
n00b


Joined: 25 Feb 2003
Posts: 70
Location: Milano - Italy

PostPosted: Mon Jun 07, 2004 9:27 am    Post subject: Cannot connect to X server after upgrading [solved] Reply with quote

Hi all,

after a complete upgrading of the system I cannot export the display of my system over the network via ssh.

Code:

leo@lupin$ ssh gleo@martini
gleo@martini's password:
Last login: etc etc
gleo@martini:~> emacs
emacs: Cannot connect to X server lupin:0.0.
Check the DISPLAY environment variable or use `-d'.
Also use the `xhost' program to verify that it is set to permit
connections from your machine.


On my system I can use X11 both as user and root.

/etc/ssh/ssh_config contains

Code:

 Host *
   ForwardAgent yes
   ForwardX11 yes


/etc/ssh/sshd_config

Code:

X11Forwarding yes


Can anyone help?

Thank you

Leo


Last edited by leo on Mon Jun 07, 2004 10:09 am; edited 1 time in total
Back to top
View user's profile Send private message
kiezpro
Tux's lil' helper
Tux's lil' helper


Joined: 13 May 2004
Posts: 126
Location: Yes

PostPosted: Mon Jun 07, 2004 10:03 am    Post subject: Reply with quote

It's a new security feature... you should edit /usr/X11/bin/startx and look for the line that says

Code:
defaultserverargs="-nolisten tcp"


Just comment it out or, better, comment it out and add

Code:
defaultserverargs=""


in the next line. Then restart X and you'll be able to connect over the network again.
Back to top
View user's profile Send private message
leo
n00b
n00b


Joined: 25 Feb 2003
Posts: 70
Location: Milano - Italy

PostPosted: Mon Jun 07, 2004 10:08 am    Post subject: Reply with quote

Thank you very much, it works.

Now I can use ssh forwarding: the problem was that the DISPLAY variable was set into .bashrc and interfered with ssh settings.

Thank you again.
Back to top
View user's profile Send private message
korny
n00b
n00b


Joined: 20 Feb 2003
Posts: 23

PostPosted: Tue Jun 08, 2004 2:42 am    Post subject: RE: Reply with quote

In case someone is looking at this post and running gdm...gdm does not use startx. Instead, to resolve the issue above, you have to edit the /etc/X11/gdm/gdm.conf file and specifically imply the DisallowTCP directive..

Code:
# If true this will basically append -nolisten tcp to every X command line,
# a good default to have (why is this a "negative" setting? because if
# it is false, you could still not allow it by setting command line of
# any particular server).  It's probably better to ship with this on
# since most users will not need this and it's more of a security risk
# then anything else.
# Note: Anytime we find a -query or -indirect on the command line we do
# not add a "-nolisten tcp", as then the query just wouldn't work, so
# this setting only affects truly local sessions.
#DisallowTCP=true


Notice, the DissallowTCP directive is commented out. Also, the default value is TRUE, so we must uncomment the line and change the value to FALSE.

Code:
DisallowTCP=false

_________________
Ugh, it's like there's a party in my mouth and everyone's throwing up. -Fry
Back to top
View user's profile Send private message
Acrid
n00b
n00b


Joined: 07 Feb 2003
Posts: 13
Location: Citrus Heights, Ca, USA

PostPosted: Tue Jun 08, 2004 4:05 pm    Post subject: Thanks Reply with quote

Thanks for the info. It seems like every time I upgrade my X or GDM or something, it breaks external connections. I use them all the time with all my systems, but it is so frustrating when I have to hunt down a new place that somebody stuck "-nolisten tcp" and figure out how to disable that. Is there any place that this kind of information is regularly posted? I didn't see any warnings in the ebuilds either.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum