I have neither gnome nor KDE. Gnome is installed but I do not use a session manager. I haven't tested with a session manager. My environment basically consists of emacs and xterms. If I log in as myself and su, with proper XAUTHORITY settings, I can run X clients as root without a problem. Even under these conditions, running printtool gives Xlib: connection to ":0.0" refused by server Xlib: Client is not authorized to connect to Server Traceback (innermost last): File "/usr/sbin/printconf-gui", line 2, in ? import gtk File "/usr/lib/python1.5/site-packages/gtk.py", line 29, in ? _gtk.gtk_init() RuntimeError: cannot open display If I xhost + and run printtool, I get the gnome printtool window. Clicking "New" results in *** Bad argument: #<subr aref>, 0, 2 *** Bad argument: #<subr aref>, 0, 2 *** Bad argument: #<subr aref>, 0, 2 *** Bad argument: #<subr aref>, 0, 2 *** Bad argument: #<subr aref>, 0, 2 as does just about anything else. I haven't actually gotten a printer configured. I'll probably just do it manually for now. I haven't investigated further.
We (Red Hat) should really try to fix this before next release.
What happens if you just run printconf-gui as yourself, and enter the root password when prompted?
I haven't tried but I will, but see also bug 26343 which reports that up2date does the same thing. I did run up2date as myself and entered the root password, but it failed in the same way. Only then did I try su first. It didn't occur to me to run printtool as myself since you could never do it that way before. :-) I'll try it next time I'm in front of my Fisher box. I will add a suitable comment to bug 26343.
Just verifying that running printconf-gui as myself and typing the root password when prompted also results in failure to access the display. Xlib: connection to ":0.0" refused by server Xlib: Client is not authorized to connect to Server Traceback (innermost last): File "/usr/sbin/printconf-gui", line 2, in ? import gtk File "/usr/lib/python1.5/site-packages/gtk.py", line 29, in ? _gtk.gtk_init() RuntimeError: cannot open display By the way, this is actually a usermode bug, not a printconf bug. Same with my up2date bug (bug 26343). If I run /usr/sbin/printconf-gui, it works. /usr/bin/printconf-gui is a link to consolehelper. Of course, there are other parts of this bug report that are probably specific to printconf-gui (the python Bad argument errors).
Okay -- I figured it out. Get rid of this line: session optional /lib/security/pam_xauth.so in /etc/pam.d/printconf-gui and the problem is solved. Note that this fixes only the display error. The python bugs I reported still apply. Too bad I didn't make them separate bug reports originally. I've also updated bug 26343.
This is the last comment I'm making here about the xauth problems. I think it may have to do with pam_xauth. Please see my comments in 26343 for details.
Following up on bug #26343. *** This bug has been marked as a duplicate of 26343 ***
There were actually two problems here, only one of which is a duplicate with 26343. I'm going to create a new bug containing just the other one since it has definitely gotten lost in the noise here.