[arch-general] gparted cant take root priviliges
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 ? -- Klearchos-Angelos Gkountras ========================= mail -> kag@grrlz.net xmpp -> kag@grrlz.net weblog -> http://jemadux.noblogs.org
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`.
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?
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.
Op 11 jul. 2014 12:37 schreef "Ralf Mardorf" <ralf.mardorf@rocketmail.com> het volgende: [...]
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.
I haven't tested it, but xhost seems a bit superfluous in combination with gksudo. Doesn't gksudo take care of setting the X auth itself? mvg, Guus
On Fri, 2014-07-11 at 16:57 +0200, Guus Snijders wrote:
I haven't tested it, but xhost seems a bit superfluous in combination with gksudo. Doesn't gksudo take care of setting the X auth itself?
It doesn't. [rocketmouse@archlinux ~]$ gksudo -u chuser qupzilla [rocketmouse@archlinux ~]$ xhost + ; gksudo -u chuser qupzilla access control disabled, clients can connect from any host QupZilla: 0 extensions loaded [rocketmouse@archlinux ~]$ xhost - access control enabled, only authorized clients can connect Regards, Ralf
Op 13 jul. 2014 10:12 schreef "Ralf Mardorf" <ralf.mardorf@rocketmail.com> het volgende:
On Fri, 2014-07-11 at 16:57 +0200, Guus Snijders wrote:
I haven't tested it, but xhost seems a bit superfluous in combination
with
gksudo. Doesn't gksudo take care of setting the X auth itself?
It doesn't.
[rocketmouse@archlinux ~]$ gksudo -u chuser qupzilla [rocketmouse@archlinux ~]$ xhost + ; gksudo -u chuser qupzilla access control disabled, clients can connect from any host QupZilla: 0 extensions loaded [rocketmouse@archlinux ~]$ xhost - access control enabled, only authorized clients can connect
Ok, so if you use gksudo and then launch an xterm, you get an display error? Sounds a bit odd, for a gui to sudo... (access control is more then just enabled/disabled ;-) ). mvg, Guus
On Sun, 2014-07-13 at 11:26 +0200, Guus Snijders wrote:
Op 13 jul. 2014 10:12 schreef "Ralf Mardorf" <ralf.mardorf@rocketmail.com> het volgende:
On Fri, 2014-07-11 at 16:57 +0200, Guus Snijders wrote:
I haven't tested it, but xhost seems a bit superfluous in combination with gksudo. Doesn't gksudo take care of setting the X auth itself?
It doesn't.
[rocketmouse@archlinux ~]$ gksudo -u chuser qupzilla [rocketmouse@archlinux ~]$ xhost + ; gksudo -u chuser qupzilla access control disabled, clients can connect from any host QupZilla: 0 extensions loaded [rocketmouse@archlinux ~]$ xhost - access control enabled, only authorized clients can connect
Ok, so if you use gksudo and then launch an xterm, you get an display error? Sounds a bit odd, for a gui to sudo... (access control is more then just enabled/disabled ;-) ).
You can use gksudo to launch xterm. [rocketmouse@archlinux ~]$ gksudo xterm Does open xterm with a root prompt. [rocketmouse@archlinux ~]$ gksudo -u chuser xterm Doesn't open xterm, no display error or any other output appears. [rocketmouse@archlinux ~]$ xhost + ; gksudo -u chuser xterm While running a X session by the user "rocketmouse" this will open xterm with a prompt for the user "chuser". Instead of xhost + you're free to use xhost a little bit smarter than I do.
Hi, should gksudo be able to open a GUI for another user without the need to take care about the client authentication? $ gksudo --help GKsu version 2.0.2 Usage: gksudo [-u <user>] [options] <command> [snip] --login, -l Make this a login shell. Beware this may cause problems with the Xauthority magic. Run xhost to allow the target user to open windows on your display! [snip] There's no "Xauthority magic". If I use gksudo _without_ the "login" option, there nevertheless is the need to use xhost. https://mailman.archlinux.org/pipermail/arch-general/2014-July/036833.html Regards, Ralf
On 2014-07-10 17:56, 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 ?
You need to install and run a polkit authentication agent.
As I see on archlinux polkit [1] there are some limitations .. I have add myself on wheel group and uncomment on sudoers file.. now what ? [1] https://wiki.archlinux.org/index.php/Polkit#Limitations On Thu, 10 Jul 2014 18:58:25 -0500 Doug Newgard <scimmia@archlinux.info> wrote:
On 2014-07-10 17:56, 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 ?
You need to install and run a polkit authentication agent.
-- Klearchos-Angelos Gkountras ========================= mail -> kag@grrlz.net xmpp -> kag@grrlz.net weblog -> http://jemadux.noblogs.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 07/10/2014 08:10 PM, Klearchos-Angelos Gkountras wrote:
As I see on archlinux polkit [1] there are some limitations .. I have add myself on wheel group and uncomment on sudoers file.. now what ?
[1] https://wiki.archlinux.org/index.php/Polkit#Limitations On Thu, 10 Jul 2014 18:58:25 -0500 Doug Newgard <scimmia@archlinux.info> wrote:
On 2014-07-10 17:56, 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 ?
You need to install and run a polkit authentication agent.
Salutations, Run : /usr/bin/gparted_polkit Regards, Mark -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iF4EAREIAAYFAlO/Nc8ACgkQZ/Z80n6+J/YxPQD8DLXk+NbEsLImlcDn2recg9jT 1JwH/MC6m/gt3Mdxv4gA/A+AByIV+kQ17BEE5yCFw3rqsdYdhllcMkx2HsyIfCi/ =o+Es -----END PGP SIGNATURE-----
On Thu, 2014-07-10 at 20:54 -0400, Mark Lee wrote:
Run : /usr/bin/gparted_polkit
JFTR the default command of the menu is /usr/sbin/gparted %f , so the menu entry has to be changed. Additionally the OP perhaps has to start something, that isn't automatically started for the used DE/WM. I e.g. use lightdm to start JWM. [rocketmouse@archlinux ~]$ cat .jwmrc <?xml version="1.0"?> <JWM> <!-- lxpolkit is needed when e.g. using "pkexec" instead of "gksudo" --> <!-- <StartupCommand>/usr/lib/lxpolkit/lxpolkit</StartupCommand> --> [snip] I add this line, but commented it out, so it results in [rocketmouse@archlinux ~]$ /usr/bin/gparted_polkit Error executing command as another user: No authentication agent found. [rocketmouse@archlinux ~]$ pkexec gparted ==== AUTHENTICATING FOR org.archlinux.pkexec.gparted === Authentication is required to run the GParted Partition Editor Multiple identities can be used for authentication: 1. rocketmouse 2. chuser Choose identity to authenticate as (1-2): rocketmouse Invalid response `rocketmouse'. ==== AUTHENTICATION CANCELED === Error executing command as another user: Not authorized This incident has been reported. [rocketmouse@archlinux ~]$ gksudo gparted ====================== libparted : 3.1 ====================== It works after starting lxpolkit. [rocketmouse@archlinux ~]$ /usr/lib/lxpolkit/lxpolkit [rocketmouse@archlinux ~]$ /usr/bin/gparted_polkit ====================== libparted : 3.1 ====================== [rocketmouse@archlinux ~]$ pkexec gparted ====================== libparted : 3.1 ====================== [rocketmouse@archlinux ~]$ cat /usr/bin/gparted_polkit #!/bin/bash if [ $(which pkexec) ]; then pkexec --disable-internal-agent "/usr/bin/gparted" "$@" else /usr/bin/gparted "$@" fi
On 2014-07-10 21:36, Ralf Mardorf wrote:
On Thu, 2014-07-10 at 20:54 -0400, Mark Lee wrote:
Run : /usr/bin/gparted_polkit
JFTR the default command of the menu is /usr/sbin/gparted %f , so the menu entry has to be changed.
No, it isn't. % cat /usr/share/applications/gparted.desktop | grep Exec Exec=/usr/bin/gparted_polkit %f
On Thu, 2014-07-10 at 23:00 -0500, Doug Newgard wrote:
On 2014-07-10 21:36, Ralf Mardorf wrote:
On Thu, 2014-07-10 at 20:54 -0400, Mark Lee wrote:
Run : /usr/bin/gparted_polkit
JFTR the default command of the menu is /usr/sbin/gparted %f , so the menu entry has to be changed.
No, it isn't.
% cat /usr/share/applications/gparted.desktop | grep Exec Exec=/usr/bin/gparted_polkit %f
[rocketmouse@archlinux ~]$ grep Exec /usr/share/applications/gparted.desktop Exec=/usr/bin/gparted_polkit %f But software as e.g. menulibre and cinnamon-menu-editor do show /usr/sbin/gparted %f, so assumed I would use xfce4-appfinder to launch gparted on JWM, it would launch /usr/sbin/gparted %f and _not_ /usr/bin/gparted_polkit %f. I kept the default, didn't edit this entry, it definitively is /usr/sbin/gparted %f . IOW the menu's default might be /usr/bin/gparted_polkit %f for the DE you're using, but for e.g. Xfce4 users (xfce4-popup-applicationsmenu and xfce4-popup-whiskermenu) it is /usr/sbin/gparted %f.
On 2014-07-11 00:07, Ralf Mardorf wrote:
On Thu, 2014-07-10 at 23:00 -0500, Doug Newgard wrote:
On 2014-07-10 21:36, Ralf Mardorf wrote:
On Thu, 2014-07-10 at 20:54 -0400, Mark Lee wrote:
Run : /usr/bin/gparted_polkit
JFTR the default command of the menu is /usr/sbin/gparted %f , so the menu entry has to be changed.
No, it isn't.
% cat /usr/share/applications/gparted.desktop | grep Exec Exec=/usr/bin/gparted_polkit %f
[rocketmouse@archlinux ~]$ grep Exec /usr/share/applications/gparted.desktop Exec=/usr/bin/gparted_polkit %f
But software as e.g. menulibre and cinnamon-menu-editor do show /usr/sbin/gparted %f, so assumed I would use xfce4-appfinder to launch gparted on JWM, it would launch /usr/sbin/gparted %f and _not_ /usr/bin/gparted_polkit %f. I kept the default, didn't edit this entry, it definitively is /usr/sbin/gparted %f . IOW the menu's default might be /usr/bin/gparted_polkit %f for the DE you're using, but for e.g. Xfce4 users (xfce4-popup-applicationsmenu and xfce4-popup-whiskermenu) it is /usr/sbin/gparted %f.
I just launched polkit from the xfce menu and it ran /usr/bin/gparted_polkit %f as expected. I wouldn't use anything who's authors decided to ignore the system and run whatever the hell they wanted.
On Fri, 2014-07-11 at 00:35 -0500, Doug Newgard wrote:
On 2014-07-11 00:07, Ralf Mardorf wrote:
But software as e.g. menulibre and cinnamon-menu-editor do show /usr/sbin/gparted %f, so assumed I would use xfce4-appfinder to launch gparted on JWM, it would launch /usr/sbin/gparted %f and _not_ /usr/bin/gparted_polkit %f. I kept the default, didn't edit this entry, it definitively is /usr/sbin/gparted %f . IOW the menu's default might be /usr/bin/gparted_polkit %f for the DE you're using, but for e.g. Xfce4 users (xfce4-popup-applicationsmenu and xfce4-popup-whiskermenu) it is /usr/sbin/gparted %f.
I just launched polkit from the xfce menu and it ran /usr/bin/gparted_polkit %f as expected. I wouldn't use anything who's authors decided to ignore the system and run whatever the hell they wanted.
My current Arch Linux + Xfce4 was installed in February 2013. It's up to date, but there were a few changes in the meanwhile (e.g. for the FHS). Perhaps there was a change from /usr/sbin/gparted %f to /usr/bin/gparted_polkit %f, but then the updates didn't modify an existing Xfce4 menu.
On 2014-07-10 19:10, Klearchos-Angelos Gkountras wrote:
As I see on archlinux polkit [1] there are some limitations .. I have add myself on wheel group and uncomment on sudoers file.. now what ?
You shouldn't need any of that, just the authentication agent as I already said. And please don't top post.
I have already installed polkit-gnome but I am using XFCE :D On Thu, 10 Jul 2014 20:22:29 -0500 Doug Newgard <scimmia@archlinux.info> wrote:
On 2014-07-10 19:10, Klearchos-Angelos Gkountras wrote:
As I see on archlinux polkit [1] there are some limitations .. I have add myself on wheel group and uncomment on sudoers file.. now what ?
You shouldn't need any of that, just the authentication agent as I already said.
And please don't top post.
-- Klearchos-Angelos Gkountras ========================= mail -> kag@grrlz.net xmpp -> kag@grrlz.net weblog -> http://jemadux.noblogs.org
On 2014-07-10 20:29, Klearchos-Angelos Gkountras wrote:
I have already installed polkit-gnome but I am using XFCE :D
Is it running? And again, please don't top post.
with lxpolikt working fine now thanks for your replies :) On 07/11/2014 04:22 AM, Doug Newgard wrote:
On 2014-07-10 19:10, Klearchos-Angelos Gkountras wrote:
As I see on archlinux polkit [1] there are some limitations .. I have add myself on wheel group and uncomment on sudoers file.. now what ?
You shouldn't need any of that, just the authentication agent as I already said.
And please don't top post.
-- Klearchos-Angelos Gkountras ---------------------------------------- weblog → http://jemadux.noblogs.org xmpp → kag@grrlz.net
Maybe add users if you havent done that. On Jul 10, 2014 5:57 PM, "Klearchos-Angelos Gkountras" <kag@grrlz.net> 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 ?
-- Klearchos-Angelos Gkountras ========================= mail -> kag@grrlz.net xmpp -> kag@grrlz.net weblog -> http://jemadux.noblogs.org
participants (8)
-
Daniel Micay
-
Doug Newgard
-
droe6
-
Guus Snijders
-
Klearchos-Angelos Gkountras
-
Mark Lee
-
Ralf Mardorf
-
Runiq