View previous topic :: View next topic |
Author |
Message |
leo n00b


Joined: 25 Feb 2003 Posts: 70 Location: Milano - Italy
|
Posted: Mon Jun 07, 2004 9:27 am Post subject: Cannot connect to X server after upgrading [solved] |
|
|
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
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 |
|
 |
kiezpro Tux's lil' helper


Joined: 13 May 2004 Posts: 126 Location: Yes
|
Posted: Mon Jun 07, 2004 10:03 am Post subject: |
|
|
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 |
|
 |
leo n00b


Joined: 25 Feb 2003 Posts: 70 Location: Milano - Italy
|
Posted: Mon Jun 07, 2004 10:08 am Post subject: |
|
|
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 |
|
 |
korny n00b


Joined: 20 Feb 2003 Posts: 23
|
Posted: Tue Jun 08, 2004 2:42 am Post subject: RE: |
|
|
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.
_________________ Ugh, it's like there's a party in my mouth and everyone's throwing up. -Fry |
|
Back to top |
|
 |
Acrid n00b


Joined: 07 Feb 2003 Posts: 13 Location: Citrus Heights, Ca, USA
|
Posted: Tue Jun 08, 2004 4:05 pm Post subject: Thanks |
|
|
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 |
|
 |
|