sudo not working in ubuntu
Bug #1330154 reported by
Arghya Basak
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pam-xdg-support (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
when I try sudo gedit the command does not work.
following is a sample output in terminal
arghya@arg-u2:~$ sudo gedit /etc/hosts
[sudo] password for arghya:
error: XDG_RUNTIME_DIR not set in the environment.
(gedit:11805): Gtk-WARNING **: cannot open display:
arghya@arg-u2:~$
pardon me for being a linux newbie.
To post a comment you must log in.
It's not a bug. SuperUser has no XDG_RUNTIME_DIR variable set. To fix it, replace sudo gedit call with $XAUTHORITY gedit
pkexec env DISPLAY=$DISPLAY XAUTHORITY=