Originally Posted by
zika
You've made me play with
pkexec (Trusty is the onla version I have at hand here where i am) and:
Code:
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY gedit /etc/rc.local
works where else I get
Code:
~$ pkexec gedit /etc/rc.local
error: XDG_RUNTIME_DIR not set in the environment.
Unable to init server: Could not connect: Connection refused
(gedit:30178): Gtk-WARNING **: cannot open display:
...
Will investigate further, working line I derived from reading manual...
Update₁:
Alias:
Code:
alias pkx='pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY $i'
works nicely[code]
Oh... so does the above assign pkx to pkexec (I would assume)? If I understand you correctly, I would not need to make a shell script then.
Regards..
Edit:
Ok.. yes .. very kewl zika !
Code:
ventrical@ventrical-desktop:~$ pkx gedit
ventrical@ventrical-desktop:~$ pkx nautilus
(nautilus:4221): Gtk-WARNING **: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
Nautilus-Share-Message: Called "net usershare info" but it failed: 'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error No such file or directory
Please ask your system administrator to enable user sharing.
^C
ventrical@ventrical-desktop:~$