When I am running some software using sudo
command it showing error like
cannot connect to X server
For example if I run the following command:
$ sudo gedit /etc/profile
I am getting following command
(gedit:6758): WARNING **: Command line `dbus-launch --autolaunch=84b871d735f31ffe014dc9ba00000009 --binary-syntax --close-stderr'
exited with non-zero exit status 1:
Autolaunch error: X11 initialization failed.
Cannot open display:
Run 'gedit --help' to see a full list of available command line options.
Or if I am running super-boot-manager
I am getting following error
buc: cannot connect to X server
Please help.
super-boot-manger
from?super-boot-manager
directly from unity luncher, it did not worked. Then I have tried it from terminal, then I got those error massage.echo $DISPLAY
say? You should run it withoutsudo
assuper-boot-manager
runssudo
internally.echo $DISPLAY
is giving:0.0
. And I am not runningsuper-boot-manager
assudo
. I am running just using commandsuper-boot-manager
from terminal.Defaults env_keep="DISPLAY XAUTHORITY"
at the end ofvisudo
. Thanks to all, specially @Thor for kind help.