You are not logged in.

#1 2019-03-10 00:55:29

_zethex
Member
Registered: 2019-01-30
Posts: 10

[SOLVED] Whenever a GUI program requires root privileges, ask for pass

I'm on the i3 window manager, say for example I want to run Gparted, when I bring up the run menu and type in Gparted, it doesn't open (because it requires root privileges to start). How can I get a prompt whenever a GUI program needs root privileges like Gparted? I would have to start it from terminal using sudo instead of run menu which leaves the terminal where I started it unusable and a waste of space until I resize the Gparted window so it overlaps it's terminal. Basically like gnome DE where whenever a program needs root privileges it would ask for a password. Another example is when I'm using Thunar and when try to mount a different partition it fails because it doesn't have root privileges unless it was started with sudo, I would like it whenever it requests root privileges (such as when it mounts a partition) it asks for password instead of fail.

Last edited by _zethex (2019-03-11 08:48:53)

Offline

#2 2019-03-10 01:05:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,427

Re: [SOLVED] Whenever a GUI program requires root privileges, ask for pass

You need a polkit authentication agent: https://wiki.archlinux.org/index.php/Po … ion_agents

Offline

#3 2019-03-10 05:22:02

_zethex
Member
Registered: 2019-01-30
Posts: 10

Re: [SOLVED] Whenever a GUI program requires root privileges, ask for pass

Thanks, I've found out how to get the agents with /bin/ in the directory name (such as lxsession & lxqt-policykit) but I can't find out how to get the ones with /lib/ in the directory name (such as gnome, mate & kde). I'm stuck on that. How do I get those ones to work? (They don't show up as a command I can type)

Offline

#4 2019-03-10 07:56:08

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,611

Re: [SOLVED] Whenever a GUI program requires root privileges, ask for pass

Just invoke them w/ the full path. It doesn't matter whether a binary is stored in your $PATH.

Online

#5 2019-03-10 11:09:51

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,427

Re: [SOLVED] Whenever a GUI program requires root privileges, ask for pass

And you really only need just one of those, in case that's unclear, you just have to decide for one.

Offline

#6 2019-03-10 14:27:26

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 205
Website

Re: [SOLVED] Whenever a GUI program requires root privileges, ask for pass

Add one of this lines to your ~/.config/i3/config file:

# for gnome:
exec_always --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1

# for deepin:
exec_always --no-startup-id /usr/lib/polkit-1-dde/dde-polkit-agent

for policykit of other desktop environments, check out https://wiki.archlinux.org/index.php/Po … ion_agents that V1del said.

Last edited by mmdamin (2019-03-10 19:36:05)

Offline

Board footer

Powered by FluxBB