Sublime Forum

Can't start sublime as non-root (linux)

#1

Hi,

I’ve ran into a problem using sublime under linux (minimal installation).

I downloaded sublime and copied into /opt. When I run the executable as a root, sublime starts and I see the GUI. As soon as I try to open it with a non-root user, nothing happens.

I already tried strace and it is a nearly identical output:

https://bpaste.net/raw/747de3d0e9ad
https://bpaste.net/raw/36f9142610ab

The only difference being in that as a root, a sublime process is started and as a non-root, no process is started.

I hope someone can help me with that.

1 Like

#2

How did you run ST as root? Did you log in as a normal user and then ran ST with sudo?
If that is the case, you probably have a situation where root has taken ownership of one or more ST files in your normal user’s home directory. Try checking all the files in “~/.config/sublime-text-3”.

You may already know this, but you should use gksu/gksudo and not sudo if you must run a GUI program as root.

1 Like

#3

I just did the following:

  • Removed the .config/sublime-text-3 folder
  • Downloaded the tar again
  • Unpacked it
  • Tried to run the executable

But still nothing happens.

It creates the .config/sublime-text-3 folder but no process is started. Rechecked and every file in the config folder has the right user/group.

0 Likes

#4

Any messages if you try to run it from a terminal window?

0 Likes

#5

Nothing, I run the command, it apparently executes and that was it.

0 Likes

#6

Have you checked that your normal user has read/execute permissions on the ST files in “/opt”?

0 Likes

#7

Just checked again and the user has read/execute permissions on the ST files in /opt.

0 Likes

#8

Could a ST process already be running?
You could try logging out and in.

You can probably tell that I am running out of ideas. :slightly_smiling:

0 Likes

#9

PS doesn’t show another ST running. The only things that come to my mind now are that xorg, openbox or my xinitrc do something weird because I didn’t configure them right or that the user needs to be added to the wheel or video group or something like this. :confused:

0 Likes

#10

I noticed /bin/sublime in your strace files. Is this a shell script to launch the sublime_text executable?

Do you notice high CPU usage when running as non-ROOT?

Does a plugin_host process get started?

0 Likes

#11

The /bin/sublime is just a symbolic link to the /opt/sublime-text-3/sublime_text executable.

When I start it as root, the plugin_host gets started, when I start it as non-root, neither the plugin_host nor the sublime process get started and the CPU stays normal.

0 Likes

#12

What is the executable exit/result code as non-root?

0 Likes

#13
exit_group(0)
+++ exited with 0 +++
0 Likes

#14

How about these invocations?

sublime_text -v
sublime_text -h
0 Likes

#15
sublime_text -v
Sublime Text Build 3125

sublime_text -h
Shows the help menu 
0 Likes

#16

It finally worked.

The problem was that /dev/shm was not mounted correctly and the chmod had to be 777.

After changing my fstab and the chmod of the folder, the program finally runs.

0 Likes

#17

I’m having the same problem. I guess I don’t know what you mean by /dev/shm not mounted correctly. It is not in fstab.

I changed permissions of /dev/shm and its contents to 777. Still same problem: ~$ sublime doesn’t run but ~$ sudo sublime runs. The output of sublime -v and sublime -h (with and without sudo) are correct, same as yours was.

Very strange behavior. I checked permissions of ~/.config/sublime_text_3 and its contents and /usr/bin/sublime and /opt/sublime_text_3/ are all owned by non-root user (me) and chmod are set to 755. Anyone else having this problem? Here are the pertinent files.

/usr/bin $ ll subl*
lrwxrwxrwx 1 root root 32 Oct 21 16:17 sublime -> /opt/sublime_text_3/sublime_text*

~/.config $ ll
drwxr-xr-x 7 fido fido 4096 Oct 21 16:18 sublime-text-3/

~/.config/sublime-text-3 $ ll
total 28
drwxr-xr-x 7 fido fido 4096 Oct 21 16:18 ./
drwxr-xr-x 21 fido fido 4096 Oct 21 15:58 …/
drwxr-xr-x 49 fido fido 4096 Oct 21 16:22 Cache/
drwxr-xr-x 2 fido fido 4096 Oct 21 15:58 Installed Packages/
drwxr-xr-x 3 fido fido 4096 Oct 21 16:18 Lib/
drwxr-xr-x 2 fido fido 4096 Oct 21 18:02 Local/
drwxr-xr-x 3 fido fido 4096 Oct 21 15:58 Packages/

/opt $ ll | grep sublime_text_3/
drwxrwxrwx 4 fido fido 4096 Sep 12 23:57 sublime_text_3/

/opt/sublime_text_3 $ ll
total 17124
drwxrwxrwx 4 fido fido 4096 Sep 12 23:57 ./
drwxr-xr-x 5 root root 4096 Oct 21 17:41 …/
-rwxrwxrwx 1 fido fido 37339 Sep 12 23:57 changelog.txt*
-rwxrwxrwx 1 fido fido 492800 Sep 12 23:57 crash_reporter*
drwxrwxrwx 7 fido fido 4096 Sep 12 23:57 Icon/
drwxrwxrwx 2 fido fido 4096 Sep 12 23:57 Packages/
-rwxrwxrwx 1 fido fido 7912032 Sep 12 23:57 plugin_host*
-rwxrwxrwx 1 fido fido 2628887 Sep 12 23:57 python3.3.zip*
-rwxrwxrwx 1 fido fido 28578 Sep 12 23:57 sublime_plugin.py*
-rwxrwxrwx 1 fido fido 37575 Sep 12 23:57 sublime.py*
-rwxrwxrwx 1 fido fido 6361184 Sep 12 23:57 sublime_text*
-rwxrwxrwx 1 fido fido 532 Sep 12 23:57 sublime_text.desktop*

0 Likes