In my Ubuntu 12.04.2 with GNOME-Shell I'm not able anymore to run any graphical programs with gksudo or sudo.

I always get an error like cannot open display

I don't remember any particular changes I've done manually apart of the regular updates. I use also GNOME3 PPA and Q-series LTS Backport PPA.

I noticed also that I'm not able anymore to install extensions from the website, but I think it's not related, of course I'm not sure too :)

I've already spent time and effort searching the topic everywhere and the few I found didn't give any solution for me. I don't want to reinstall.

  • This question has been asked before with some answers (but none accepted): askubuntu.com/questions/163384/… Feb 22, 2013 at 23:13
  • Thanks, already checked that's why I'm asking again. Anyway all the xorg packages was reinstalled under the xserver-xorg-renamed package so now every xorg package name end with a -lts-quantal . Of course I can't going back to the previous packages.
    – user134725
    Feb 23, 2013 at 11:36

1 Answer 1


What does:

not able anymore to run any graphical programs with gksudo or sudo


If you see:

username is not in the sudoers file. This incident will be reported

While trying to "sudo" smth, instructions from psychocats.net/ubuntu/fixsudo might be helpful to you.

Generally, you need to have root shell to check and, if necessary, modify /etc/sudoers file. You should also be in admin group:

usermod -a -G admin username #from the root shell

  • thanks amdenis. simply the terminal says "cannot open display", and even absolutely nothing if for example I use gksudo to open nautilus. /etc/sudoers/ is ok, and sudo in terminal is working perfectly. I mean sudo nano is working, sudo gedit is not working, gedit is working
    – user134725
    Feb 22, 2013 at 22:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .