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

I've simply been trying to get Sublime Text 2 running on Ubuntu Server 14.04 LTS on a Virtual Machine but also get the same error trying to run gedit so this leads me to believe it's an environment config issue.

Gtk-WARNING **: cannot open display:

I've installed gksu and tried gksu gedit with the same result.

It's really starting to hurt my head. Any suggestions/help much appreciated?

share|improve this question
up vote 4 down vote accepted

Did you install xserver or a display server like unity,cinnamon, or gnome?

gedit or any graphical programs need a display server to be able to run.

share|improve this answer
See also: You can also use nano instead of of gedit if you just have a command line. – Wilf May 25 '14 at 14:55
Thanks guys, some great feedback and it's making more sense now. The desktop is effectively run as a server which isn't installed as standard on the Server Install. Thanks @Wilf, I already had Nano running but I really wanted Sublime for an article I'm following on Ruby on Rails. Thats an interesting link and some great options. The next task is to decide which display server. The long term plan is to have Ruby on Rails running on Ubuntu Server, are there merits/benefits to any these options? – Wayne Phipps May 25 '14 at 16:05

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.