1

I used to be able to do so, but something as simple as this fails now:

gksudo gedit

and this also fails:

sudo gedit

I receive the error:

Cannot open display.

I haved checked this:

  • .Xauthority and .ICEauthority have my user as owner and also read/write permissions
  • As both files are binary, I cannot understand them and check if they are corrupted

Probably, I have some misconfiguration. I have read this before and many other guides before asking.

I'm using Ubuntu Precise 12.04 64-bit.

Eliah Kagan
  • 117,780
Sanete
  • 296

3 Answers3

0

You can try executing export DISPLAY=:0 before the command as a workaround.

Or, alternatively, use DISPLAY=:0 gksudo gedit.

int_ua
  • 8,574
0

the answers you are locking for are

Boris
  • 4,932
  • Thanks Boris, I've discovered new tricks. But in my case it doesn't work. Muy user has permissions to sudo. – Sanete Jul 26 '12 at 10:22
-1

Try this in a terminal:

su -

this will ask root password and give a root terminal session, this worked for me, I could run gedit without problems, for example.

Elias
  • 1