Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

I run ubuntu 10.04 and I'm trying to disable suspend and hibernate mode so I typed this: Code:

sudo gedit /usr/share/polkit-1/actions/org.freedesktop.upower.policy

but I get this error: Code:

Gtk-WARNING **: cannot open display:

Anyone know what the problem is?

share|improve this question
... does gksudo gedit... make a difference? – fossfreedom Feb 12 '12 at 23:12

for graphical applications, such as gedit, you should use gksu

gksu gedit /usr/share/polkit-1/actions/org.freedesktop.upower.policy

alternately, you can try nano

sudo nano /usr/share/polkit-1/actions/org.freedesktop.upower.policy
share|improve this answer

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.