“xdg_runtime_dir not set in the environment” and pkexec doesn't work
问题 I try to execute the following line on ubuntu-server 14.04: $ sudo gedit /usr/local/svn/passwd-team and I get this error: error: XDG_RUNTIME_DIR not set in the environment. (gedit: 11805): Gtk-WARNING **: can not open display: I Googled for help and saw that I had to write: pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY gedit Then I got the following message: === AUTHENTICATING FOR org.freedesktop.policykit.exec === Authenticating is needed to run '/usr/bin/env' as the super user