Gentoo Archives: gentoo-catalyst

From: "Kessler
To: gentoo-catalyst@l.g.o
Subject: RE: [gentoo-catalyst] Sudo Issues
Date: Fri, 23 Sep 2005 18:18:15
Message-Id: D130CB2CC962DD439C21FF1B23A2BD772B25B3@county.co.wabasha.mn.us
1 I was in the middle of doing just what you suggested and commenting out
2 that line. Wasn't sure if it was the answer but I have the time today to
3 find out. Your commenting is much better than mine, so cut and paste it
4 is!
5
6 On the other one, further digging shows that I should get that error if
7 I am trying to start another Xserver under the same display number. Just
8 odd, maybe it is another environmet issue that will be cleared up with
9 this edit.
10
11 -----Original Message-----
12 From: Andrew Gaffney [mailto:agaffney@g.o]
13 Sent: Friday, September 23, 2005 1:09 PM
14 To: gentoo-catalyst@l.g.o
15 Subject: Re: [gentoo-catalyst] Sudo Issues
16
17 Kessler, Paul wrote:
18 > I seem to be having two issues with sudo in it's default setup under
19 > catalyst. I'm not quite sure if this is a configuration problem or a
20 > known issue. If I start up terminal and from the command line type
21 sudo
22 > su - I get the following message:
23 >
24 >
25 > Fatal server error.
26 >
27 > Server is already active for display 0
28 >
29 > If this server is no longer running, remove /tmp/.X0-lock and start
30 again
31 >
32 >
33 > After a few seconds it drops me to the proper command prompt, after
34 that
35 > if I drop back to the regular user shell and try it again then there
36 is
37 > no error and it works fine.
38
39 No idea about this one.
40
41 > The second is if I try to launch any graphical application from a
42 > command line such as ethereal I get the following error:
43 >
44 >
45 > Gtk-WARNING **: cannot open display:
46 >
47 >
48 > But if I simply su to root and execute ethereal it works perfectly. I
49 > have searched several forums on this one, and most of the posts just
50 say
51 > "well some programs don't run right as root". Ethereal on the other
52 hand
53 > requires special permissions to handle the network interfaces and
54 should
55 > be run with sudo, so I doubt that is the problem.
56
57 This one I'm familiar with. The current default configuration of sudo
58 purposely
59 wipes out the existing environment before switching to root. You can
60 disable
61 this behavior by commenting out the "Defaults env_reset" line in
62 /etc/sudoers.
63 The following command in your fsscript should take care of that:
64
65 sed -e 's:^\(Defaults.\+env_reset\)$:# The following line is completely
66 fscking
67 stupid\n# \1:' /etc/sudoers
68
69 Alternatively, 'export DISPLAY=:0.0' after sudo'ing and before running
70 the app
71 will "solve" the problem.
72
73 --
74 Andrew Gaffney
75 http://dev.gentoo.org/~agaffney/
76 Gentoo Linux Developer Installer
77 Project
78
79 --
80 gentoo-catalyst@g.o mailing list
81
82
83 --
84 gentoo-catalyst@g.o mailing list

Replies

Subject Author
Re: [gentoo-catalyst] Sudo Issues Andrew Gaffney <agaffney@g.o>