Discussion:
Unable to use "Run command as root"
Erik P. Olsen
2014-07-01 20:35:38 UTC
Permalink
pkexec gedit (3079)
error: XDG_RUNTIME_DIR not set in the environment.
Unable to init server: Could not connect: Connection refused
pkexec gedit (3079) returned '1'
Am I missing something?
--
Erik
t***@onepost.net
2014-07-02 09:15:30 UTC
Permalink
On Tue, 01 Jul 2014 22:35:38 +0200
Post by Erik P. Olsen
pkexec gedit (3079)
error: XDG_RUNTIME_DIR not set in the environment.
Unable to init server: Could not connect: Connection refused
pkexec gedit (3079) returned '1'
Am I missing something?
Erik,

When I try to run here pkexec <something>
in a terminal, I currently get the same error message. Before my last system upgrade, pkexec worked sometimes, IIRC. I've concluded it's just unreliable. Not an emelfm2 thing.

One guess that the desktop environment's establishment process is missing

XDG_RUNTIME_DIR = whatever

Or maybe it's a more significant bug.

I seem to recall there are some constraints on the approach pkexec takes when setting up a 'transitory' root-like context, and the xserver permissions figure prominently in there.

Maybe worth reverting to the old pre-pkexec approach, something like

xterm -e 'su -c "%{(root-commands)@Enter command:}";echo -n "Done. Press enter ";read'

Regards
Tom
Charles A Edwards
2014-07-02 09:42:20 UTC
Permalink
On Wed, 2 Jul 2014 19:15:30 +1000
Post by t***@onepost.net
Post by Erik P. Olsen
what gedit (3079)
error: XDG_RUNTIME_DIR not set in the environment.
Unable to init server: Could not connect: Connection refused
pkexec gedit (3079) returned '1'
Am I missing something?
Erik,
When I try to run here pkexec <something>
in a terminal, I currently get the same error message. Before my last
system upgrade, pkexec worked sometimes, IIRC. I've concluded it's
just unreliable. Not an emelfm2 thing.
One guess that the desktop environment's establishment process is missing
XDG_RUNTIME_DIR = whatever
Or maybe it's a more significant bug.
I seem to recall there are some constraints on the approach pkexec
takes when setting up a 'transitory' root-like context, and the
xserver permissions figure prominently in there.
Maybe worth reverting to the old pre-pkexec approach, something like
Another work around is to use beesu and not worry with polkit which is
what is used by pkexec.

I know it is available in mageia and is probably also in Erik's distro.



Charles
--
Some people need a good imaginary cure for their painful imaginary
ailment. ----------------------
Mageia release 5 (Cauldron) for x86_64$
On SuperSize....http://www.eslrahc.com
Registered Linux user #182463
3.15.2-server-2.mga5 x86_64
----------------------
Loading...