Re: sudo in X-environment
On Sat, May 3, 2014 at 3:21 AM, Ralf Mardorf <ralf.mardorf@alice-dsl.net> wrote:
>
> Btw. xhost is needed when using gksudo:
>
> $ chuser firefox
> No protocol specified
> No protocol specified
> Error: cannot open display: :0
> size == 0' failed
> $ cat /usr/local/bin/chuser
> #!/bin/sh
>
> # /usr/local/bin/chuser -> /.chuser/bin/chuser
>
> #xhost +
> gksudo -u chuser "$*"
> #xhost -
> exit
>
> $ sudo nano /usr/local/bin/chuser
> $ chuser firefox
> access control disabled, clients can connect from any host
> access control enabled, only authorized clients can connect
> $ cat /usr/local/bin/chuser
> #!/bin/sh
>
> # /usr/local/bin/chuser -> /.chuser/bin/chuser
>
> xhost +
> gksudo -u chuser "$*"
> xhost -
> exit
Thanks. As I said earlier, I consider this a bug. What's the point of
using gksu/gksudo if you have do use a wrapper that you could use
around su/sudo?
Maybe pkexec is the solution?
Reply to: