Gentoo Archives: gentoo-user

From: Holly Bostick <motub@××××××.nl>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Gtk-WARNING **: cannot open display:
Date: Wed, 06 Jul 2005 09:18:53
Message-Id: 42CBA07D.40402@planet.nl
1 W.Kenworthy schreef:
2 > After an update (possibly pam related) a couple of weeks ago, I can no
3 > longer run so X apps under sudo (starting apps from a root logged in via
4 > su in an xterm work fine).
5 >
6 > In particular, I have some scripts using gtkdialog (which run as root)
7 > to ask "which network" for my laptop using a small gui before starting
8 > the correct network. However, any attempt to open a dialog generates an
9 > error "(gtkdialog:18408): Gtk-WARNING **: cannot open display:" xhost +
10 > doesnt help so its probably another PAM problem - can someone recommend
11 > where to look?
12 >
13 > BillK
14 >
15 >
16
17 I had the same problem, but it was *not* PAM-related (I don't use PAM).
18 Found an answer on the forums (sorry, no link this time, maybe later)--
19 adding the following to sudoers (using visudo) worked for me:
20
21 # Allow users in group users to export specific variables
22 # Defaults:%users env_keep=TZ
23 Defaults:%users env_keep=DISPLAY
24
25 (the uncommented line is the additional line in question)
26
27 Hope this helps,
28 Holly
29 --
30 gentoo-user@g.o mailing list