[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sudo in X-environment



On Fri, May 02, 2014 at 02:04:46PM +0200, Slavko wrote:
> > On Thu, May 01, 2014 at 07:29:08PM +0100, Tom Furie wrote:
> > > Here, have a wrapper script
> > > 
> > > --8x--------------------
> > > 
> > > #!/bin/sh
> > > 
> > > xhost + si:localuser:root
> > > sudo $@
> > > xhost - si:localuser:root
> > > 
> > > --8x--------------------
> 
> And what about gksu(do)?
> 
> ... and preserving environment when acting as a su frontend. It is
> useful to menu items or other graphical programs that need to ask a
> user's password to run another program as another user.

Context is all important. The code you quoted above was a quick response
to Артур saying 'xhost +si:localuser:root' was too long to type, which
came from me saying that if xhost *must* be used (i.e. there is no other
alternative) then at least fully qualify who is allowed to connect.

Of course using one of the "graphical sudos" would be the better choice
as they are much more complete solutions than the code above.

Cheers,
Tom

-- 
"Eat, drink, and be merry, for tomorrow you may work."

Attachment: signature.asc
Description: Digital signature


Reply to: