You are not logged in.

#1 2020-06-02 15:47:58

Lizzi
Member
Registered: 2016-05-15
Posts: 40

how does arch feel about using pkexec for running guis as root?

I've not had much luck with it

pkexec --user root env DISPLAY=:0 dbus-launch geany
No protocol specified
Unable to init server: Could not connect: Connection refused

Geany: cannot open display


BTW, I also use arch, gentoo, artix & manjaro

Offline

#2 2020-06-02 18:33:13

mxfm
Member
Registered: 2015-10-23
Posts: 166

Re: how does arch feel about using pkexec for running guis as root?

Some time ago I have found solution - use policy kit configuration files (policy or action) which have the option 'allow_gui' enabled. Example of such file can be found in gparted package. According to google, the direct method does not work because by default pkexec does not launch gui apps.

Offline

#3 2020-06-02 19:47:03

Lizzi
Member
Registered: 2016-05-15
Posts: 40

Re: how does arch feel about using pkexec for running guis as root?

mxfm wrote:

Some time ago I have found solution - use policy kit configuration files (policy or action) which have the option 'allow_gui' enabled. Example of such file can be found in gparted package. According to google, the direct method does not work because by default pkexec does not launch gui apps.


OH!  SMACK!  Thanks


@mxfm care to share your solution in greater detail?   nudge.. nudge..

Last edited by Lizzi (2020-06-02 19:58:27)


BTW, I also use arch, gentoo, artix & manjaro

Offline

#4 2020-06-02 20:07:12

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: how does arch feel about using pkexec for running guis as root?

Why do you want to run geany as root?

To edit system files with a GUI use a text editor that supports the GVFS admin:// backend: https://wiki.archlinux.org/index.php/Ru … _root#GVFS

But sudoedit is probably the best approach.


Jin, Jîyan, Azadî

Offline

#5 2020-06-02 22:37:32

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: how does arch feel about using pkexec for running guis as root?

Lizzi, I am not sure what your actual question is here. "How does Arch feel... " about anything really, doesn't make any sense.

Are you asking "Should I run geany as root with pkexec?" or "How do I run geany as root with pkexec"? or something else? Please change your topic title to reflect your actual question or issue.

In any event, see the warning and the first paragraph at the top of this section: https://wiki.archlinux.org/index.php/Ru … ns_as_root

Offline

#6 2020-06-02 23:59:37

Lizzi
Member
Registered: 2016-05-15
Posts: 40

Re: how does arch feel about using pkexec for running guis as root?

Head_on_a_Stick wrote:

Why do you want to run geany as root?

To edit system files with a GUI use a text editor that supports the GVFS admin:// backend: https://wiki.archlinux.org/index.php/Ru … _root#GVFS

But sudoedit is probably the best approach.


Sudoedit is what i went with too..

SUDO_EDITOR=geany sudo -e /etc/fuse.conf



it's how i edited my conf file to get my android phone to mount in userspace

and anyway, i like geany...  works perfectly fine as a text editor.

Last edited by Lizzi (2020-06-03 00:00:13)


BTW, I also use arch, gentoo, artix & manjaro

Offline

#7 2020-06-03 00:33:43

Lizzi
Member
Registered: 2016-05-15
Posts: 40

Re: how does arch feel about using pkexec for running guis as root?

2ManyDogs wrote:

Lizzi, I am not sure what your actual question is here. "How does Arch feel... " about anything really, doesn't make any sense.

Are you asking "Should I run geany as root with pkexec?" or "How do I run geany as root with pkexec"? or something else? Please change your topic title to reflect your actual question or issue.

In any event, see the warning and the first paragraph at the top of this section: https://wiki.archlinux.org/index.php/Ru … ns_as_root


looks like we cross posted because i dont recall seeing your post when i made my other one above...  I had also previously read that page as well.  Thanks for the input.  The topic accurately reflect my question and you have all give answers that have been useful.  Have a great day.


BTW, I also use arch, gentoo, artix & manjaro

Offline

Board footer

Powered by FluxBB