[SOLVED] Fluxbox no polkit? gparted not working due to ???
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
#!/bin/bash
if [ $(which pkexec) ]; then
pkexec --disable-internal-agent "/usr/sbin/gparted" "$@"
else
/usr/sbin/gparted "$@"
fi
this is what I get when I check which pkexec
Code:
(userx@slacko⚡️/usr/share/applications)>>$ echo "$(which pkexec)"
/usr/bin/pkexec
(userx@slacko⚡️/usr/share/applications)>>$ /usr/bin/pkexec
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is needed to run `/bin/bash' as the super user
Authenticating as: root
password:
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized
This incident has been reported.
it is not doing anything while trying to start gparted in fluxbox off the menu item in fluxbox menu.
So I am thinking now I got to find out how to setup polkit in slack-fluxbox.
and do not need it: a window pops up requesting my root password. This is in Slint not Slackware but I don't think that makes a difference. Anyway I am installing Slackware64-14.2 in a VM and will check. Stay tuned: this shouldn't take long, we are in the CONFIGURE step.
and do not need it: a window pops up requesting my root password. This is in Slint not Slackware but I don't think that makes a difference. Anyway I am installing Slackware64-14.2 in a VM and will check. Stay tuned: this shouldn't take long, we are in the CONFIGURE step.
yep that is what happens in xfce4 I get the login gui, just not in fluxbox... wait mode.. thanks
Sorry the typo was mine. It's /usr/sbin/gparted_polkit.
I am in Void Linux and decied to take a look at gparted in here, then I relised I had to install it first. (lol)
when I looked at how their gparted.desktop is written it is this.
Code:
Exec=/usr/bin/gparted-pkexec %f
Like this distro has a 'special' executable in bin and not sbin so that a normal user can use it, without having to use a script to redirect it
Code:
(userx@voider.org⚡️~)>>$ ls /usr/bin/gparted*
/usr/bin/gparted /usr/bin/gparted-pkexec /usr/bin/gpartedbin
I do have sudo no password so I do not get a login gui, I think that is the reason, seeings how gparted is a root user app.
interesting. Looks like it makes life a little easier, I do not have to edit fluxbox menu after re-generating it to comply with Void Linux apps with it being set up this way.
I wonder if I copy that over to Slackware and set it up the same way it will work in Slack...
experimentation time...
as soon as I get this one script set right I am working on of course.
:MOD:
well I just mounted my partition with slack, copied the file over into /usr/bin edited slack gparted,desktop. now when I get a chance to reboot into Slack all I have to do is re-generate the menu in Flux and see what happens when I select gparted.
well it seems that the path to gparted is hard coded in the executable to look in /usr/bin
a mod to the code maybe needed. got a look at it if I can find the source code for it.
Code:
(userx@slacko⚡️~)>>$ mmaker -f fluxbox
no terminal emulator specified; will use the default
(userx@slacko⚡️~)>>$ /usr/bin/gparted-pkexec
Error accessing /usr/bin/gparted: No such file or directory
(userx@slacko⚡️~)>>$ whereis gparted
gparted: /usr/sbin/gparted /usr/man/man8/gparted.8.gz
(userx@slacko⚡️~)>>$ ls /usr/bin/gparted*
/usr/bin/gparted-pkexec
(userx@slacko⚡️~)>>$ sudo mv -v /usr/bin/gparted-pkexec /usr/sbin/
'/usr/bin/gparted-pkexec' -> '/usr/sbin/gparted-pkexec'
(userx@slacko⚡️~)>>$ sudo nano /usr/share/applications/gparted.desktop
(userx@slacko⚡️~)>>$ mmaker -f fluxbox
no terminal emulator specified; will use the default
(userx@slacko⚡️~)>>$ /usr/sbin/gparted-pkexec
Error accessing /usr/bin/gparted: No such file or directory
(userx@slacko⚡️~)>>$
So I do suppose your fbautostart is a script somewhere in Slint? /usr/bin perhaps that is called in FB startup just before the exec fluxbox is called?
the path that gparted takes is gparted.desktop:exec=/usr/sbin/(script:gparted_polkit)
that checks to see who is who then runs a command to exec gparted accordingly.
where this gparted-pkexec too is just a wrapper that I modded in slack as such.
where you state it gets ran I'm thining in your fbautostart wrapper, whereas before your thought it did not need to get ran but finding out it does. as your last post indicates.
where I just ran that fbautostart in my cli and got all kinds of feedback (lol)
it even started my hp printer thingy as I can see its icon on my app tray now.
so you're saying and it looks to be true that all I need to do is add fbautostart to my startup in FB before exec FB and it looks to be starting dropbox, d-bus(if it wasn't already started?), PulseAudio, and you say nw-applet too, so I should be able to remove that line from my startup file too, along with /usr/libexec/polkit-gnome-authentication-agent-1 &
looks like the bluesman-applet line in startup I can remove too.
looking promising.. but as usual I am running a script, and I do not want to stop it to log in and out, just to see what takes place, but I probability will.
Quote:
fbautostart
Hello! I'll be your friendly XDG Autostarter today.
Here's what's on the menu:
* Desktop Environment: FLUXBOX
* Global XDG Directory: /etc/xdg:/etc/kde/xdg:/etc/kde/xdg
* Local XDG Directory: ~/.config
* Current exec Model: 0
- Chef Tagliamonte
& The Fluxbox Crew
Now Serving: AT-SPI D-Bus Bus
Attrinf: We're not in the OnlyShowIn. We must not execute.
Attrinf: GNOME;Unity;
Hidden: true
+-> (To be clear, I'm stopping here)
Now Serving: Certificate and Key Storage
Attrinf: We're not in the OnlyShowIn. We must not execute.
Attrinf: GNOME;Unity;MATE;
Hidden: true
+-> (To be clear, I'm stopping here)
Now Serving: Network
Hidden:
+-> (To be clear, I'm going to continue parsing)
Now Serving: PolicyKit Authentication Agent
Hidden:
+-> (To be clear, I'm going to continue parsing)
Now Serving: Xfsettingsd
Attrinf: We're not in the OnlyShowIn. We must not execute.
Attrinf: XFCE;
Hidden: true
+-> (To be clear, I'm stopping here)
Now Serving: PulseAudio Sound System
Hidden:
+-> (To be clear, I'm going to continue parsing)
Now Serving: Power Manager
Hidden:
+-> (To be clear, I'm going to continue parsing)
Now Serving: HP System Tray Service
Hidden:
+-> (To be clear, I'm going to continue parsing)
Now Serving: Clipman
Attrinf: We're not in the OnlyShowIn. We must not execute.
Attrinf: XFCE;
Hidden: true
+-> (To be clear, I'm stopping here)
Now Serving: GSettings Data Conversion
Attrinf: We're not in the OnlyShowIn. We must not execute.
Attrinf: GNOME;Unity;
Hidden: true
+-> (To be clear, I'm stopping here)
Now Serving: SSH Key Agent
Attrinf: We're not in the OnlyShowIn. We must not execute.
Attrinf: GNOME;Unity;MATE;
Hidden: true
+-> (To be clear, I'm stopping here)
Now Serving: Blueman Applet
Hidden:
+-> (To be clear, I'm going to continue parsing)
Now Serving: Print Queue Applet
Hidden:
+-> (To be clear, I'm going to continue parsing)
Now Serving: Secret Storage Service
Attrinf: We're not in the OnlyShowIn. We must not execute.
Attrinf: GNOME;Unity;MATE;
Hidden: true
+-> (To be clear, I'm stopping here)
Now Serving: GPG Password Agent
Attrinf: We're not in the OnlyShowIn. We must not execute.
Attrinf: GNOME;Unity;MATE;
Hidden: true
+-> (To be clear, I'm stopping here)
Now Serving: Screensaver
Attrinf: We're not in the OnlyShowIn. We must not execute.
Attrinf: XFCE;
Hidden: true
+-> (To be clear, I'm stopping here)
Now Serving: Dropbox
Hidden:
+-> (To be clear, I'm going to continue parsing)
** (polkit-gnome-authentication-agent-1:28959): WARNING **: Unable to register authentication agent: GDBus.Errorrg.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject
Cannot register authentication agent: GDBus.Errorrg.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject
system-config-printer-applet: failed to start NewPrinterNotification service
system-config-printer-applet: failed to start PrinterDriversInstaller service: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.102" is not allowed to own the service "com.redhat.PrinterDriversInstaller" due to security policies in the configuration file bluesman-applet version 2.0.4 starting
There is an instance already running
HP Linux Imaging and Printing System (ver. 3.16.11)
System Tray Status Service ver. 2.0
Copyright (c) 2001-15 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:127: RuntimeWarning: PyOS_InputHook is not available for interactive use of PyGTK
set_interactive(1)
HP Linux Imaging and Printing System (ver. 3.16.11)
HPLIP upgrade latest version ver. 1.0
Copyright (c) 2001-15 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.
HPLIP upgrade function is disabled in Slackware.
Not attempting to download upgrades.
^C
so you're saying and it looks to be true that all I need to do is add fbautostart to my startup in FB before exec FB and it looks to be starting dropbox, d-bus(if it wasn't already started?), PulseAudio, and you say nw-applet too, so I should be able to remove that line from my startup file too, along with /usr/libexec/polkit-gnome-authentication-agent-1 &
looks like the bluesman-applet line in startup I can remove too.
Yes.
Quote:
Originally Posted by BW-userx
added this line to FB startup due to dropbox being in separate place between distros;
Why not fix the exec path in /etc/xdg/autostart/dropbox.xdg, or copy this file as ~/.config/autostart/dropbox.xdg and fix the path there (will work as according to the specification the latter has priority over the former)
Last edited by Didier Spaier; 02-01-2017 at 12:34 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.