Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 installed Ubuntu Linux (via VMWare).

I'm trying to install Sublime Text 2 on Ubuntu, so I entered these lines:

tar xf Sublime\ Text\ 2.0.1\ x64.tar.bz2
sudo mv Sublime\ Text\ 2 /opt/
sudo ln -s /opt/Sublime\ Text\ 2/sublime_text /usr/bin/sublime

Now, I need to do:

sudo sublime /usr/share/applications/sublime.desktop

but, when I executed it, I got an error:

(sublime:2331): Gtk-WARNING **: cannot open display:

Does someone know how to fix it?

share|improve this question

closed as off-topic by Braiam, Anthon, jimmij, Ramesh, slm Nov 10 '14 at 16:48

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Braiam, Anthon, jimmij, Ramesh, slm
If this question can be reworded to fit the rules in the help center, please edit the question.

Why don't you just use the PPA? – Seth Dec 17 '12 at 20:21
Does sublime have a GUI? If so, your problem is probably that root doesn't have access to your display. Try gksu or the like depending on your DE. – Kazark Dec 17 '12 at 20:35
I will exaplain you what I need, and if your answer is relevant, please explain me more. I want to view my folders of the application, like the "ett" command in mac (textmate). I want to create link: "sublime" just open the sublime with my app folder. thank you! – Alon Shmiel Dec 17 '12 at 21:08
Does it work if you run it without sudo? – Mikel Dec 17 '12 at 22:01
@Mikel, no, I got the same error :/ – Alon Shmiel Dec 18 '12 at 3:00

The error message suggests that for some reason, the sublime GUI can not be started. In the simplest case, the reason is that you are logging in over SSH into your virtual machine. If that is indeed the case, try logging in using the graphical login dialog. Otherwise, it would help to know if you can start any GUI applications (e.g. gedit) at all.

share|improve this answer
if you are going to copy things from other websites as rqna.net/qna/nuxyti-install-sublime-text-2-on-ubuntu.html Please provide reference. – vfbsilva Sep 1 '13 at 7:19
It's actually the other way around - I answered this question here on unix.stackexchange.com where it was asked; it seems www.rqna.net is copying contents. – ssc Sep 2 '13 at 12:37

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