Re: [Bulk] Re: gparted cant take root priviliges

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



On Fri, 2014-07-11 at 09:25 +0200, Runiq wrote:
> On 10.07.2014 18:59:17, Daniel Micay wrote:
> >On 10/07/14 06:56 PM, Klearchos-Angelos Gkountras wrote:
> >>In my new laptop, I install archlinux and works fine but also when I 
> >>try to use gparted not promont one dialog to have root priviliges...  
> >>how to fix that?
> >
> >I'm a bit unsure about what you're asking for. To avoid the error, you 
> >should run it with root privileges with a command like `pkexec 
> >gparted`.
> 
> What's the advantage of pkexec over sudo in this case?

I guess you mean what's the advantage of a graphical frontend for sudo,
e.g. gksudo over pkexec. The advantage of pkexec over sudo is that you
are prompted for the password by a GUI, so you can launch it e.g. from
the applications menu of a desktop environment, without the need to
start it in a terminal emulation.

If you want to run a GUI app, e.g. Firefox as user B, while you're in a
user A's X session, you need to do something like this:

xhost + ; gksudo -u B firefox

xhost + is a sledgehammer, I anyway use it that way, xhost could be used
smarter.

However, if you instead run

xhost + ; pkexec --user B firefox

you get "Error: no display specified", not to mention that you need to
launch /usr/lib/lxpolkit/lxpolkit or similar before you can use pkexec,
IOW IMO it's a disadvantage to preffer pkexec over gksudo, but it's
always mentioned that it should be better to use pkexec instead of
gksudo, some argue that xhost + isn't needed with pkexec, but without
xhost + I also get "Error: no display specified". Perhaps after writing
complicated polkit rules it would work.



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux