Another reason to prefer a real root over sudo
Chris G
cl at isbd.net
Mon Feb 2 17:28:33 UTC 2009
On Mon, Feb 02, 2009 at 09:20:14AM -0800, Bruce Ferrell wrote:
> Chris G wrote:
> > On Mon, Feb 02, 2009 at 10:45:36AM -0600, Jeff Henson wrote:
> >> On Mon, Feb 2, 2009 at 9:52 AM, Jeff Henson <jeff at jhenson.net> wrote:
> >>> On Mon, Feb 2, 2009 at 9:10 AM, Pierre Frenkiel
> >>> <pierre.frenkiel at laposte.net> wrote:
> >>>> On Mon, 2 Feb 2009, Robert Parker wrote:
> >>>>> You can 'sudo su -'
> >>>> then, X11 doesn't work
> >>> You should be able to use 'su -p username'. I'm at work and can't test
> >>> it right now though.
> >>>
> >> Was just able to test it and it doesn't work the way I thought.
> >>
> > Exactly! It's a right royal pain.
> >
> > The only sane ways to run something like synaptic in this situation
> > are (as I see it):-
> >
> > Log out of X and log back in as the sudo privileged user.
> >
> > Have a root account (in which case synaptic asks for the root
> > password rather than the user's password).
> >
> > Do the work on the command line in a terminal (but then it's not
> > synaptic).
> >
>
> This works:
>
> as the first user: xhost +
>
> sudo su -
>
> export DISPLAY=:0
>
> synaptic
>
>
Thanks, it does too, very useful. I actually needed to do the
following:-
xhost +
su - <sudo privileged user>
export DISPLAY=:0
sudo synaptic
That's actually a useful sequence for other sudo/root requiring
applications in certain circumstances.
It's going in my little 'notebook' of useful workarounds.
--
Chris Green
More information about the ubuntu-users
mailing list