Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
This question has been asked before with some answers (but none accepted):… – Stephen Ostermiller Feb 22 '13 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 '13 at 11:36

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 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

share|improve this answer
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 '13 at 22:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.