Re: Unable to use "Run command as root"

  • From: Charles A Edwards <CAE@xxxxxxxxxxx>
  • To: emelfm2@xxxxxxxxxxxxx
  • Date: Wed, 2 Jul 2014 05:42:20 -0400

On Wed, 2 Jul 2014 19:15:30 +1000
tpgww@xxxxxxxxxxx wrote:

> > Trying to run gedit as root produces following output:
> >   
> >  >what  gedit  (3079)  
> > error: XDG_RUNTIME_DIR not set in the environment.
> > Unable to init server: Could not connect: Connection refused
> > 
> > (gedit:3079): Gtk-WARNING **: cannot open display:  
> >  >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'


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
----------------------

Attachment: signature.asc
Description: PGP signature

Other related posts: