Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
1  
Why don't you just use the PPA? –  Seth Dec 17 '12 at 20:21
4  
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
1  
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
show 3 more comments

2 Answers 2

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
1  
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
add comment

Sublime text PPA is made available by webupd8.org.

You can very easily install it in using apt-get. Here is the solution.

share|improve this answer
add comment

Your Answer

 
discard

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.