1

If I start sublime-text with

sudo sublime

I see package control and can access packages.

If I start sublime-text with

sublime

Output of ls -la on directory:

ls -la /opt/sublime_text
insgesamt 11980
drwxr-xr-x 5 root root    4096 Aug 20 16:30 .
drwxr-xr-x 8 root root    4096 Aug 20 16:17 ..
-rw-r--r-- 1 root root   20504 Aug 17 21:56 changelog.txt
-rwxr-xr-x 1 root root  189552 Aug 17 21:56 crash_reporter
drwxr-xr-x 7 root root    4096 Aug 17 21:56 Icon
drwxr-xr-x 2 root root    4096 Aug 17 21:56 Packages
-rwxr-xr-x 1 root root 4271136 Aug 17 21:56 plugin_host
-rw-r--r-- 1 root root 2649206 Aug 17 21:56 python3.3.zip
drwxrwxrwx 2 root root    4096 Aug 20 16:30 Rainbowth
-rw-r--r-- 1 root root   19351 Aug 17 21:56 sublime_plugin.py
-rw-r--r-- 1 root root   32202 Aug 17 21:56 sublime.py
-rwxr-xr-x 1 root root 5046304 Aug 17 21:56 sublime_text
-rw-r--r-- 1 root root     532 Aug 17 21:56 sublime_text.desktop

I can't. Why is that?

Sublime-text has been installed in opt/sublime_text where I can't write to by default.

4
  • which method did you follow to install sublime? and what does ls -la /opt/sublime_text say
    – Ron
    Aug 20, 2015 at 15:06
  • Output above. I guess I ussed this: askubuntu.com/questions/172698/… that is the cmd command in the first post.
    – empedokles
    Aug 20, 2015 at 15:14
  • if you followed 'download from sublime site" in that link, do sudo ln -s /opt/Sublime\ Text\ 2/sublime_text /usr/bin/sublime.
    – Ron
    Aug 20, 2015 at 16:04
  • I used this: sudo add-apt-repository ppa:webupd8team/sublime-text-3 sudo apt-get update sudo apt-get install sublime-text-installer I'm using sublime text 3
    – empedokles
    Aug 20, 2015 at 16:20

2 Answers 2

2

Create a symbolic link to use at the command line:

sudo ln -s /opt/sublime_text/sublime_text /usr/bin/sublime

Now, change the ownership of /usr/bin/sublime and ~/.config/sublime-text-3 from root to you:

sudo chown username:username /usr/bin/sublime
sudo chown -R username:username /home/username/.config/sublime-text-3/

Replace username with your actual username.

Now, you should be able to run sublime by just:

sublime
0
0

Sublime stores packages in a directory which is not writable by users (/opt/sublime_text). Therefore, you can only update the packages using sudo / root.

1
  • Perfect answer to the question.... The question was "why?" not "How to solve this?", so upvoted! ;-)
    – Fabby
    Aug 21, 2015 at 19:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .