Gentoo Archives: gentoo-catalyst

From: Andrew Gaffney <agaffney@g.o>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] Sudo Issues
Date: Fri, 23 Sep 2005 18:12:22
Message-Id: 433444B3.2070909@gentoo.org
In Reply to: [gentoo-catalyst] Sudo Issues by "Kessler
1 Kessler, Paul wrote:
2 > I seem to be having two issues with sudo in it’s default setup under
3 > catalyst. I’m not quite sure if this is a configuration problem or a
4 > known issue. If I start up terminal and from the command line type sudo
5 > su – I get the following message:
6 >
7 >
8 > Fatal server error.
9 >
10 > Server is already active for display 0
11 >
12 > If this server is no longer running, remove /tmp/.X0-lock and start again
13 >
14 >
15 > After a few seconds it drops me to the proper command prompt, after that
16 > if I drop back to the regular user shell and try it again then there is
17 > no error and it works fine.
18
19 No idea about this one.
20
21 > The second is if I try to launch any graphical application from a
22 > command line such as ethereal I get the following error:
23 >
24 >
25 > Gtk-WARNING **: cannot open display:
26 >
27 >
28 > But if I simply su to root and execute ethereal it works perfectly. I
29 > have searched several forums on this one, and most of the posts just say
30 > “well some programs don’t run right as root”. Ethereal on the other hand
31 > requires special permissions to handle the network interfaces and should
32 > be run with sudo, so I doubt that is the problem.
33
34 This one I'm familiar with. The current default configuration of sudo purposely
35 wipes out the existing environment before switching to root. You can disable
36 this behavior by commenting out the "Defaults env_reset" line in /etc/sudoers.
37 The following command in your fsscript should take care of that:
38
39 sed -e 's:^\(Defaults.\+env_reset\)$:# The following line is completely fscking
40 stupid\n# \1:' /etc/sudoers
41
42 Alternatively, 'export DISPLAY=:0.0' after sudo'ing and before running the app
43 will "solve" the problem.
44
45 --
46 Andrew Gaffney http://dev.gentoo.org/~agaffney/
47 Gentoo Linux Developer Installer Project
48
49 --
50 gentoo-catalyst@g.o mailing list

Replies

Subject Author
Re: [gentoo-catalyst] Sudo Issues Chris Gianelloni <wolf31o2@g.o>