Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an issue on all new installs of CentOS 6.2 on my network. Connecting to remote machines using X11 gui software fails for reasons associated with the xauth. I'm not sure how to diagnose but have narrowed it down to the following:

  • gdm can't properly authenticate with remote host
  • XAUTHORITY is set to a local path not available on the remote machine
  • there is no .Xauthority file in the local user home dir
  • missing MIT-MAGIC-COOKIE-1

Here are some logs:

/var/log/Xorg.0.log

[  9273.858] AUDIT: Mon Jun  4 14:41:21 2012: 7778: client 20 connected from local host (
uid=0 gid=0 pid=8800 )
  Auth name: MIT-MAGIC-COOKIE-1 ID: 496
[  9273.870] AUDIT: Mon Jun  4 14:41:21 2012: 7778: client 35 connected from local host (
uid=0 gid=0 pid=8800 )
  Auth name: MIT-MAGIC-COOKIE-1 ID: 496
[  9274.072] AUDIT: Mon Jun  4 14:41:21 2012: 7778: client 20 disconnected
[  9274.072] AUDIT: Mon Jun  4 14:41:21 2012: 7778: client 35 disconnected
[  9277.236] AUDIT: Mon Jun  4 14:41:25 2012: 7778: client 20 connected from local host (
uid=0 gid=0 pid=8804 )
  Auth name: MIT-MAGIC-COOKIE-1 ID: 496
[  9277.248] AUDIT: Mon Jun  4 14:41:25 2012: 7778: client 35 connected from local host (
uid=0 gid=0 pid=8804 )
  Auth name: MIT-MAGIC-COOKIE-1 ID: 496
[  9277.277] AUDIT: Mon Jun  4 14:41:25 2012: 7778: client 20 disconnected
[  9277.277] AUDIT: Mon Jun  4 14:41:25 2012: 7778: client 35 disconnected

/var/log/messages

Jun  4 14:41:21 myhostname abrt[8801]: saved core dump of pid 8800 (/usr/bin/perl) to /var/spo
ol/abrt/ccpp-2012-06-04-14:41:21-8800.new/coredump (18776064 bytes)
Jun  4 14:41:21 myhostname abrtd: Directory 'ccpp-2012-06-04-14:41:21-8800' creation detected
Jun  4 14:41:21 myhostname abrtd: Package 'clusterssh' isn't signed with proper key
Jun  4 14:41:21 myhostname abrtd: Corrupted or bad dump /var/spool/abrt/ccpp-2012-06-04-14:41:21-8800 (res:2), deleting

I'm sure this is an easy thing to address.

Things I tried that were unsuccessful:

  • sadly gdmsetup is not part of EL6
  • configured /etc/gdm/PostLogin to copy $XAUTHORITY to $HOME/.Xauthority (NFS mounted home directories)
  • explicitly created /etc/sysconfig/desktop with DISPLAYMANAGER=GNOME & DESKTOP=GNOME
  • tried different combinations of xinit and xauth

Hopefully someone can help diagnose and solve this problem. As visible in the logs, I'm without clusterssh as a result which is an unfortunate thing given I use it daily.

share|improve this question
    
Does it work after running the command xauth + 127.0.0.1 ? –  Jeremy W Jun 13 '12 at 18:06
    
No I have posted the solution below. It was tricky to track down but simple in the end. It's definitely one to remember for future installs. –  mogga Jun 14 '12 at 1:59
    
solution i posted was actually NOT the solution... but I've now posted the solution which was related to the system Xresources file. Operator error. –  mogga Oct 15 '12 at 16:45
add comment

3 Answers 3

up vote 0 down vote accepted

Actually the X11 access controls had nothing to do with the issues I was having. It was all because I had appended the solarized theme Xresources file in the system Xresources file. Removing those lines fixed the problem.

I was able to diagnose by running cssh -e hostname which showed that the color definitions were not understood by xterm. Removed the lines, restarted the X server and all is running smoothly.

share|improve this answer
add comment

The solution was, as expected, trivial and obscure-

With the vanilla install of CentOS 6.2 the X11 color definition file that is part of the xorg-x11-server-utils package (X.Org X11 X server utilities) is not resolved correctly by X11.

For some apps this results in warning messages but others fail with unrelated errors.

The solution was to add the following explicitly to the /etc/X11/xorg.conf file "Files" section:

Section "Files"
    RgbPath "/usr/share/X11/rgb.txt"
EndSection

With this in place, a simple logout/login to restart the X server fixed the problem.

This thread was what led me to find the working solution:

http://www.nntp.perl.org/group/perl.tcltk/2006/09/msg99.html

share|improve this answer
add comment

This excerpt might relate to your problem :

7.2. Why does Cygwin/X report AUDIT: client 1 rejected from IP remotehost?

The problem is most likely a wrong DNS (Network name resolution). Make sure your windows host has a hostname which is valid from linux too and an IP address which linux can resolve to that hostname.

If you add a line

192.168.26.1 myhost

to /etc/hosts on the XDMCP server with the IP address and the hostname of your windows host the name resolution should work.

share|improve this answer
    
All forward and reverse name resolution is resolving/working as expected. Thankfully there are no windows hosts on the network to complicate matters. We also already tried adding explicit hosts in the /etc/hosts file. –  mogga Jun 10 '12 at 14:59
    
confirmed that this is not a solution - all hosts are resolving correctly in both directions –  mogga Jun 11 '12 at 16:30
    
More info would be nice : What do you use for connecting? What error message do you receive? Have you tried without ClusterSSH? –  harrymc Jun 11 '12 at 17:29
    
1) ssh -X has the same result for anything that requires a local gui window 2) logs are part of the original question but if you'd like to see others let me know 3) I have had similar results with other apps but this cssh is the easiest/fastest way to reproduce the issue –  mogga Jun 11 '12 at 18:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.