Bug#464893: /usr/bin/gksu: connection refused to X display for subprocesses

Alain Kalker miki at dds.nl
Sat Feb 9 17:25:11 UTC 2008


Package: gksu
Version: 2.0.0-5
Severity: critical
File: /usr/bin/gksu
Justification: breaks unrelated software


When gksu doesn't ask for a password because the sudo timestamp is 
still valid, the command which gksu executes has access to the X 
display but any subprocesses started do not.
So far I have experienced problems using synaptic to do installs or 
upgrades of packages that use debconf to ask questions, and also while 
using gkdebconf to reconfigure packages, in both cases using debconf's 
Gnome frontend.

A snippet of /var/log/apt/term.log:
---[cut here]---
Setting up debconf (1.5.18) ...
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Gtk-WARNING **: cannot open display: :0.0 at 
/usr/share/perl5/Debconf/FrontEnd/Gnome.pm line 54.
debconf: unable to initialize frontend: Gnome
debconf: (DISPLAY problem?)
debconf: falling back to frontend: Dialog
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs 
shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
---[cut here]---

While trying to find the source of the problem, I found this simple way 
to reproduce it:

---[cut here]---
---[in user's terminal window]---
$ sudo -k # Invalidate sudo's timestamp, so gksu will ask for a password
$ gksu xterm
---[gksu asks for password]---
---[in root xterm]---
# xterm
---[another xterm opens, close it]---
# xauth list
miki/unix:0  MIT-MAGIC-COOKIE-1  <snip>
localhost.localdomain/unix:0  MIT-MAGIC-COOKIE-1  <snip>
# ^D
---[back in user's terminal window]---
$ gksu xterm # Do it again...within 15 minutes
---[gksu doesn't ask for password, timestamp still valid]---
---[in root xterm]---
# xterm
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
<snip>
# xauth list
xauth:  error in locking authority file /tmp/libgksu-oJv8Wm/.Xauthority
# ls -l /tmp/libgksu-oJv8Wm/.Xauthority
ls: cannot access /tmp/libgksu-oJv8Wm/.Xauthority: No such file or 
directory
# ^D
---[cut here]---

Regards,

Alain

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gksu depends on:
ii  gnome-keyring              2.20.3-1      GNOME keyring services (daemon and
ii  libatk1.0-0                1.20.0-1      The ATK accessibility toolkit
ii  libc6                      2.7-6         GNU C Library: Shared libraries
ii  libcairo2                  1.4.14-1      The Cairo 2D vector graphics libra
ii  libgconf2-4                2.20.1-2+b1   GNOME configuration database syste
ii  libgksu2-0                 2.0.5-2       library providing su and sudo func
ii  libglib2.0-0               2.14.6-1      The GLib library of C routines
ii  libgnome-keyring0          2.20.3-1      GNOME keyring services library
ii  libgtk2.0-0                2.12.7-1      The GTK+ graphical user interface 
ii  liborbit2                  1:2.14.10-0.1 libraries for ORBit2 - a CORBA ORB
ii  libpango1.0-0              1.18.4-1      Layout and rendering of internatio
ii  libstartup-notification0   0.9-1         library for program launch feedbac
ii  sudo                       1.6.9p11-2    Provide limited super user privile

gksu recommends no packages.

-- no debconf information






More information about the pkg-gnome-maintainers mailing list