M BUZZ CRAZE NEWS
// news

VirtualBox Ubuntu 12.04 cannot open display under Superuser

By Emma Johnson

Everytime I try to open a visual editor from the terminal as superuser, I get this error:

user:~$ sudo gedit
Cannot open display:
Run 'gedit --help' to see a full list of available command line options.

However, when I open it normally, it works just fine. Any ideas?

Edit: gsuko doesn't change this behaviour either

Edit:

user:~$ sudo kate
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
kate: cannot connect to X server 
5

1 Answer

Have you tried gksudo? That's for invoking graphical Applications as superuser. Although i think sudo should work as well in normal Ubuntu.

edit: vim and nano are editors working from inside the terminal. Ubuntu should have those installed by default.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy