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.

Zanna
  • 72,312
empedokles
  • 4,023

2 Answers2

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
empedokles
  • 4,023
Ron
  • 20,938
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.

mrub
  • 128