Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 71776 - X only allows on vt7, fails on any other with ":0.0" refused by server
Summary: X only allows on vt7, fails on any other with ":0.0" refused by server
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-19 10:43 UTC by SI Reasoning
Modified: 2005-05-25 04:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
initial client xhost xsession (.xsession-errors-siway.home.network:0,14.32 KB, text/plain)
2004-11-19 10:57 UTC, SI Reasoning
Details
2nd client xsession errors (.xsession-errors-yoper.home.network:1,588 bytes, text/plain)
2004-11-19 10:58 UTC, SI Reasoning
Details
kdm log (kdm.log,373.98 KB, text/plain)
2004-11-19 11:06 UTC, SI Reasoning
Details
kdmrc file (kdmrc,1.61 KB, text/plain)
2004-11-19 11:15 UTC, SI Reasoning
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SI Reasoning 2004-11-19 10:43:34 UTC
After the latest run of batch upgrades (about a month's worth), My XDMCP network no longer allows more than one login into the XDMCP server. Not one person, not one login per person, not one login per client, not one login per xhost, but one login period. No other clients can login, regardless of the account (including root). It does not matter whether I use xdm, kdm or gdm and the setup worked prior to the upgrade. I do notice that when attempting to login to kde using the same account, whether on the same client or different xdmcp client, that a message pops up within the currently running kde session, saying that kde is already running. Also attempting to login to the gnome desktop with the same account on a different xhost while the kde desktop is up results in the gnome desktop being run ontop of the kde desktop on the 1st xhost while the 2nd xhosts screen is blank.

I have looked for anything that I could consider relevant in the logs but saw nothing obvious to me, but I have never run into this issue before so I don't really know what I am looking for.

I have cleared out the /tmp files, restarted the server, rebooted the pc, tailed /var/log/everything/current but to no avail.

Any ideas?

Reproducible: Always
Steps to Reproduce:
1. /etc/xinit.d/xdm restart (using kdm, gdm or xdm)
2. xdmcp login screen appears on client's xhost
3. attempt to login, 1st time succeeds
4. attempt to login, to 2nd xhost on client or a different client
Actual Results:  
on the 2nd xhost on the first client, or any xhost on a different client, the
login appears to be accepted but X quickly restarts and brings up the xdmcp
login screen on the attempted xhost. The initial working xhost is unaffected
unless the same account attempts to login, then either a message appears that
"kde is already running" appears on the initial xhost, or the requested desktop,
such as gnome, begins to run ontop of the initial kde desktop. The 2nd xhost
appears blank or restarts its xhost window and the xdmcp login screen appears.

This last bit, whether it immediately restarts the 2nd xhost or it tries to run
the 2nd xhosts requested desktop on the initial xhosts's desktop may be
inconsistent.

Expected Results:  
logged into the proper desktop running a seperate set of programs if using the
same account on a different xhost.

sczjd@gentoo sczjd $ emerge info
Portage 2.0.51-r3 (default-linux/x86/2004.0, gcc-3.3.4, glibc-2.3.4.20040808-r1,
2.4.26-gentoo-r11 i686)
=================================================================
System uname: 2.4.26-gentoo-r11 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.16
ccache version 2.2 [enabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.14.90.0.8-r1
Headers:  sys-kernel/linux-headers-2.4.21-r1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config
/usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X aalib acl alsa arts avi bindist bitmap-fonts bonobo cdr crypt cscope cups
curl dv dvdr encode esd evo f77 faad fam fastcgi ffmpeg flac flash foomaticdb
fortran freetds freetype fs gd gdbm ggi gif gnome gphoto2 gpm gstreamer gtk gtk2
gtkhtml guile hbci imagemagick imap imlib imlib2 java javascript jpeg kde lcms
libg++ libgda libwww mad maildir mbox mcal md5sum mdb memlimit mikmod mmx motif
mozilla moznocompose moznoirc moznomail mozsvg mpeg mpi mysql nas ncurses nls
odbc ofx oggvorbis oss pam parse-clocks passfile pdflib perl php pic png ppds
python qt quicktime readline samba sasl scanner sdl slang slp snmp spell sse ssl
svga tcltk tcpd threads tiff truetype type1 unicode usb wmf x86 xfs xml xml2
xmms xv xvid zlib"
Comment 1 SI Reasoning 2004-11-19 10:57:01 UTC
Created attachment 44302 [details]
initial client xhost xsession
Comment 2 SI Reasoning 2004-11-19 10:58:05 UTC
Created attachment 44303 [details]
2nd client xsession errors
Comment 3 SI Reasoning 2004-11-19 11:06:14 UTC
Created attachment 44305 [details]
kdm log

There is an interesting section here where it says:
Unrecognized option: tcp
use: X [:<display>] [option]

maybe this is where the issue is?
Comment 4 SI Reasoning 2004-11-19 11:12:49 UTC
regarding the error in kdm log, -nolisten tcp was changed to just tcp but it made no difference (and I think this is for the local xserver anyway)

sczjd@gentoo kdm $ cd /usr/kde/3.3/share/config/kdm
sczjd@gentoo kdm $ cat Xservers
# Xservers - local X-server list
#
# This file should contain an entry to start the server on the
# local display; if you have more than one display (not screen),
# you can add entries to the list (one per line).
# If you also have some X terminals connected which do not support XDMCP,
# you can add them here as well; you will want to leave those terminals
# on and connected to the network, else kdm will have a tougher time
# managing them. Each X terminal line should look like:
#       XTerminalName:0 foreign
#

:0 local@tty1 /usr/X11R6/bin/X tcp
#:1 local@tty2 reserve /usr/X11R6/bin/X -nolisten tcp :1
#:2 local@tty3 reserve /usr/X11R6/bin/X -nolisten tcp :2
#:3 local@tty4 reserve /usr/X11R6/bin/X -nolisten tcp :3
#:4 local@tty5 reserve /usr/X11R6/bin/X -nolisten tcp :4


### Don't change these two lines; they are hints for genkdmconf. ###
### Version 1.99 ###
Comment 5 SI Reasoning 2004-11-19 11:15:27 UTC
Created attachment 44306 [details]
kdmrc file

there is a new section called VTservers=-7 which I think was there to put it on
the virtual terminal 7 on the local machine but maybe it is a factor?
Comment 6 SI Reasoning 2004-12-08 02:11:54 UTC
This is not just a kdm issue. I have the same issue with gdm. The previous comment does not appear to be relevant.
Comment 7 SI Reasoning 2004-12-09 12:59:06 UTC
switched from XFree86 to xorg but it made no difference. One other piece of info....
I currently do not have the monitor plugged into the host server. Also, whenever X starts via kdm/gdm after a reboot local X is caught in a run condition. With kdm I have to /etc/init.d/xdm stop then kill X, with gdm stopping the xdm service will kill X. When I restart the xdm service for the 2nd time, it will work fine... except for the issue mentioned in this bug report.
Comment 8 SI Reasoning 2004-12-14 17:36:15 UTC
I have tried to ssh into this computer and run a program and it also fails. So I tried to do an xhost and this also fails:
sczjd@gentoo sczjd $ xhost+
-bash: xhost+: command not found
sczjd@gentoo sczjd $ xhost +
xhost:  unable to open display "192.168.1.210:0.0"
sczjd@gentoo sczjd $ ifconfig
-bash: ifconfig: command not found
sczjd@gentoo sczjd $ echo $DISPLAY
192.168.1.210:0.0
sczjd@gentoo sczjd $ xhost +192.168.1.210:0.0
xhost:  unable to open display "192.168.1.210:0.0"
sczjd@gentoo sczjd $ sudo xhost +192.168.1.210:0.0
xhost:  unable to open display "192.168.1.210:0.0"
Comment 9 SI Reasoning 2004-12-18 00:07:12 UTC
a few more things I have noticed:
I can only login remotely via xdmcp using vt7. Any attempt at logging in via xdmcp on any other vt (such as vt8) will fail with the following and then restart the local X:
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
  Auth name: MIT-MAGIC-COOKIE-1 ID: -1
Xlib: Invalid MIT-MAGIC-COOKIE-1 key

If I type xhost + on the xdmcp server, It will attempt to login with a different user on vt8 while the first user is logged in on vt7, it will not kick out but it will leave a blank screen. If I then switch over to vt7, it is now acting screwy with open windows slowly migrating upwards and other signs that show that the new login appears to try to be starting up in vt7 instead of vt8. This requires me to shut down X on both vt7 and vt8. If I then log into both vt7 and then vt8 with the same user, an error message stating that "kde appears to  already be running" will appear in vt7!

In both cases, it appears that the xdmcp server is not recognizing anything outside of vt7. What could cause this?

Comment 10 SI Reasoning 2004-12-26 23:06:32 UTC
hmmm
It seems that I can connect to xdmcp remotely via different clients, but only if I am using :0 (vt7). Something may have partially fixed this, but I was able to connect via cygwin when using :0
Comment 11 SI Reasoning 2004-12-29 14:25:38 UTC
still trying to track this down... any clues would be helpful....

I watched top while kde tried to load, it went through a series of kdeinit messages before it kicked out. I then tried XFCE4 and it loaded to a certain point and then kept trying to issue an error message. Unfortunately, I cannot see what this error message is since the thin-client terminal monitor is blue with no visual signs of any window manager activity. (The XDMCP login screen does come up and login seems to work fine).

both fluxbox and icewm kick out fast which means they get to the bad section faster. THis is driving me insane.... and I am considering trashing the whole install and starting over, but I would rather just get to the bottom of this.
Comment 12 Andrew Bevitt 2004-12-29 17:51:06 UTC
Comment out the ServerVTs section of kdmrc. If that doesnt work, try setting the value to 2 (ie not negative).

Furthermore, if you can try the following
# Whether KDM should lock the PID file to prevent having multiple KDM
# instances running at once. Don't change unless you're brave.
# Default is true
#LockPidFile=false

Set LockPidFile=false and you should be able to spawn more than one kdm session.
Comment 13 SI Reasoning 2004-12-30 02:20:01 UTC
I tried all three but they had no affect
Comment 14 SI Reasoning 2005-01-04 00:36:24 UTC
a few additional tests:
on the terminal server host, I tried to login via vt8 and it failed just as on the clients

THe ServersVt line in kdmrc had no effect, and it should not be a surprise since I have the exact same issue in gdm. However, one interesting thing was, that after I disabled the ServersVT line in kdmrc and rebooted the computer, I ran /etc/init.d/xdm start and it then properly put X in vt7. So at least it appears that the line was not even needed (I may go ahead and add xdm to init 5 again and disable the line to double check).

However this does beg the question, if it is an issue with both kdm & gdm, then maybe there is an X setting that is impropper that is causing it. Where there any changes to X that necessitated the need for the VTServers line? Where was that change made and what was the old setting? Maybe if I change it back and it works, then we have something to go on.
Comment 15 SI Reasoning 2005-01-20 15:51:55 UTC
I am changing the title since this is not limited to xdmcp but also on localhost:

I have tried several different ways and config changes such as recommended by the following link:
file:///var/tmp/kdecache-sczjd/krun/23727.0.blnewbie4_3_7.htm
however they fail with the same error.

I currently am using gdm, but have the same issue with kdm.
When I log into a session via gdm/kdm on any other vt besides vt7, whether localhost or xdmcp or xnest I get the following error message (if I am not already logged into a session on vt7):

#~/.xsession-errors
/etc/X11/gdm/PreSession/Default: Registering your session with wtmp and utmp
/etc/X11/gdm/PreSession/Default: running: /usr/bin/X11/sessreg -a -w /var/log/wtmp -u /var/run/utmp -x "/var/gdm/:1.Xservers" -h "" -l ":1" "sczjd"
/etc/X11/gdm/Xsession: Beginning session setup...
Agent pid 14254

KeyChain 2.5.1; http://www.gentoo.org/proj/en/keychain/
Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL

 * Found existing ssh-agent (13828)
 * Known ssh key: /home/sczjd/.ssh/id_rsa

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

xrdb: Can't open display ':0.0'
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

xmodmap:  unable to open display ':0.0'
/etc/X11/gdm/Xsession: Setup done, will execute: gnome-session
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified


(gnome-session:14233): Gtk-WARNING **: cannot open display:


-------------
Interestingly, after failing when trying to login via vt8, I then logged into vt7 successfully and received the following message via a window entitled "open displays":

There are some displays already open. You can select one from the list below or open a new one.

Username    Display
Nobody      Display :1 on virtual terminal 8

---------------
below is the ~/.xsession-errors for the successful vt7 login:

root@gentoo sczjd # cat .xsession-errors
/etc/X11/gdm/PreSession/Default: Registering your session with wtmp and utmp
/etc/X11/gdm/PreSession/Default: running: /usr/bin/X11/sessreg -a -w /var/log/wtmp -u /var/run/utmp -x "/var/gdm/:0.Xservers" -h "" -l ":0" "sczjd"
/etc/X11/gdm/Xsession: Beginning session setup...
Agent pid 14483

KeyChain 2.5.1; http://www.gentoo.org/proj/en/keychain/
Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL

 * Found existing ssh-agent (13828)
 * Known ssh key: /home/sczjd/.ssh/id_rsa

/etc/X11/gdm/Xsession: Setup done, will execute: gnome-session
SESSION_MANAGER=local/gentoo:/tmp/.ICE-unix/14462
esd: Esound sound daemon already running or stale UNIX socket
/tmp/.esd/socket
This socket already exists indicating esd is already running.
Exiting...
audio_alsa: no cards found!
audio_alsa: no cards found!
audio_alsa: no cards found!

** (gnome-session:14462): WARNING **: Esound failed to start.


(gnome-session:14462): Gtk-WARNING **: Unable to locate theme engine in module_path: "redmond95",

(gnome-session:14462): Gtk-WARNING **: Unable to locate theme engine in module_path: "redmond95",
Window manager warning: Log level 16: Unable to locate theme engine in module_path: "redmond95",
Window manager warning: Log level 16: Unable to locate theme engine in module_path: "redmond95",

(gdmflexiserver:15343): Gtk-WARNING **: Unable to locate theme engine in module_path: "redmond95",

(gdmflexiserver:15343): Gtk-WARNING **: Unable to locate theme engine in module_path: "redmond95",

(gnome-panel:15339): Gtk-WARNING **: Unable to locate theme engine in module_path: "redmond95",

(gnome-panel:15339): Gtk-WARNING **: Unable to locate theme engine in module_path: "redmond95",

(nautilus:15337): Gtk-WARNING **: Unable to locate theme engine in module_path: "redmond95",

(nautilus:15337): Gtk-WARNING **: Unable to locate theme engine in module_path: "redmond95",

(gnome-terminal:15341): Gtk-WARNING **: Unable to locate theme engine in module_path: "redmond95",

(gnome-terminal:15341): Gtk-WARNING **: Unable to locate theme engine in module_path: "redmond95",
audio_alsa: no cards found!
audio_alsa: no cards found!

-----------------------------
nothing obvious above but shown for comparisons sake.

Now the fun part, with a current session running on vt7, I login via vt8. Instead of instantly kicking me out, it instead tries to run on vt7.
~/.xsession-errors
root@gentoo sczjd # cat .xsession-errors
/etc/X11/gdm/PreSession/Default: Registering your session with wtmp and utmp
/etc/X11/gdm/PreSession/Default: running: /usr/bin/X11/sessreg -a -w /var/log/wtmp -u /var/run/utmp -x "/var/gdm/:1.Xservers" -h "" -l ":1" "sczjd"
/etc/X11/gdm/Xsession: Beginning session setup...
Agent pid 16074

KeyChain 2.5.1; http://www.gentoo.org/proj/en/keychain/
Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL

 * Found existing ssh-agent (13828)
 * Known ssh key: /home/sczjd/.ssh/id_rsa

/etc/X11/gdm/Xsession: Setup done, will execute: gnome-session
SESSION_MANAGER=local/gentoo:/tmp/.ICE-unix/16053
esd: Esound sound daemon already running or stale UNIX socket
/tmp/.esd/socket
This socket already exists indicating esd is already running.
Exiting...
audio_alsa: no cards found!
audio_alsa: no cards found!
audio_alsa: no cards found!

** (gnome-session:16053): WARNING **: Esound failed to start.


(gnome-session:16053): Gtk-WARNING **: Unable to locate theme engine in module_path: "redmond95",

(gnome-session:16053): Gtk-WARNING **: Unable to locate theme engine in module_path: "redmond95",
gnome-smproxy: already running on display :0.0
Window manager warning: Screen 0 on display ":0.0" already has a window manager; try using the --replace option to replace the current window manager.
Window manager warning: Screen 0 on display ":0.0" already has a window manager; try using the --replace option to replace the current window manager.
Window manager warning: Screen 0 on display ":0.0" already has a window manager; try using the --replace option to replace the current window manager.
Window manager warning: Screen 0 on display ":0.0" already has a window manager; try using the --replace option to replace the current window manager.

(gnome-panel:16429): Gtk-WARNING **: Unable to locate theme engine in module_path: "redmond95",

(gnome-panel:16429): Gtk-WARNING **: Unable to locate theme engine in module_path: "redmond95",

(gnome-panel:16429): Gtk-WARNING **: Ignoring the separator setting
Window manager warning: Screen 0 on display ":0.0" already has a window manager; try using the --replace option to replace the current window manager.
Window manager warning: Screen 0 on display ":0.0" already has a window manager; try using the --replace option to replace the current window manager.
Window manager warning: Screen 0 on display ":0.0" already has a window manager; try using the --replace option to replace the current window manager.
Window manager warning: Screen 0 on display ":0.0" already has a window manager; try using the --replace option to replace the current window manager.
Window manager warning: Screen 0 on display ":0.0" already has a window manager; try using the --replace option to replace the current window manager.

(nautilus:16431): Gtk-WARNING **: Unable to locate theme engine in module_path: "redmond95",

(nautilus:16431): Gtk-WARNING **: Unable to locate theme engine in module_path: "redmond95",

(gdmflexiserver:16441): Gtk-WARNING **: Unable to locate theme engine in module_path: "redmond95",

(gdmflexiserver:16441): Gtk-WARNING **: Unable to locate theme engine in module_path: "redmond95",
Window manager warning: Screen 0 on display ":0.0" already has a window manager; try using the --replace option to replace the current window manager.
Window manager warning: Screen 0 on display ":0.0" already has a window manager; try using the --replace option to replace the current window manager.
audio_alsa: no cards found!

Comment 16 SI Reasoning 2005-02-03 11:40:10 UTC
From another buglist discussion that dovetailed to this issue:

------- Additional Comment #23 From STefan  2005-02-03 03:10 PST -------

The prob in your other bugreport could come from xorg, I have also a problem with exporting applications since I installed xorg, xorg has a little bug which causes those $DISPLAY messages


------- Additional Comment #24 From SI Reasoning 2005-02-03 11:38 PST -------

I am not convinced that those error messages are the issue though. I was having the same issue reported in bug 71776 with XFree86 and it continued when I transferred to xorg. Now the error message may be an xorg issue, but I am not convinced that it is THE issue.

What might help is to have a list of configuration files that might affect the issue and a sample of each running on a system that does not have this problem. I could then run a diff and try to change a few configuration options to see if that is the issue.

Comment 17 SI Reasoning 2005-02-09 08:38:50 UTC
resolved!!!!
The issue is with app-misc/screen-4.0.2-r1
I found the following message and followed instructions and multi-user mode is working again:

 * Some dangerous key bindings have been removed or changed to more safe values.
 * For more info, please check /etc/screenrc
 *
 * screen is not installed as setuid root, which effectively disables multi-user
 * mode. To enable it, run:
 *
 *      chmod u+s /usr/bin/screen
 *      chmod go-w /var/run/screen

This was a pretty major change for such a little note that can often be missed on larger updates. It would be nice to have these notes a bit more easily accessed such as a file /var/log/emerge-warnings or something like that and have a message similar to the one for etc-update at the end of an emerge to check this file for special conditions....
Comment 18 Donnie Berkholz (RETIRED) gentoo-dev 2005-05-25 04:23:12 UTC
OK, thanks. Configuration problem.