i have a fresh ubuntu 12.04 installation with encrypted home partition.
i copied over my home folder from another computer.
when i try to launch graphical programs via sudo i get errors like the following.
nailor@macbuntu:~$ sudo synaptic
No protocol specified
No protocol specified
(synaptic:18080): Gtk-WARNING **: cannot open display: :0
or
nailor@macbuntu:~$ sudo gedit
No protocol specified
** (gedit:18085): WARNING **: Command line `dbus-launch --autolaunch=3122eb74fe95c3593833223f0000000c --binary-syntax --close-stderr' exited with non-zero exit status 1: No protocol specified\nNo protocol specified\nAutolaunch error: X11 initialization failed.\n
No protocol specified
Cannot open display:
Run 'gedit --help' to see a full list of available command line options.
or
nailor@macbuntu:~$ sudo xterm
No protocol specified
No protocol specified
Warning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm Xt error: Can't open display: %s
nailor@macbuntu:~$
what can i do to correct the situation?
ps: situation with gksudo
nailor@macbuntu:~$ gksudo xterm
Error copying '/home/nailor/.Xauthority' to '/tmp/libgksu-yRgesp': No such file or directorynailor@macbuntu:~$
/etc/hosts
and runhostname thenewname
. After editing/etc/hostname
and rebooting everything started to work correctly again. – pabouk - Ukraine stay strong Jul 19 '14 at 16:34