1

I downloaded 64-bit(it's compatible with my system etc.) Sublime Text from their official website,extracted tar file and opened new folder.There wasn't install file but executable did.I created symbolic link() to /usr/bin by typing following line in terminal: sudo ln -s [path of original] /usr/bin/stext (here stext is my arbitrary name for link). Everything works ok(I checked this executable works fine), but after I created desktop shortcut manually(via text editor) and allowed execution by typing:

sudo chmod +x Sublime Text Editor.desktop

I had following problem: (I also tried this with sudo) ./Subline Text Editor.desktop it tells me bad interpreter:such file or directory doesn't exists Now here is what I entered at .desktop file:

#!usr/bin/env xdg-open

[Desktop Entry]
Exec=/usr/bin/stext
Version=1.0
Type=application
Icon=/home/pc/Downloads/sublime_text_3/Icon/256x256/sublime-text.png
Name=Sublime Text Editor
Terminal=false
Categories=Application

Now, maybe I changed order of instructions or what?I assume that problem is (like it says) at the first line: bad interpreter instruction. I know that first line is important to tell program which interpreter should be used, but anyone knows which one is appropriate for this task?

So, I emphasize that editor works, but I wish shortcut on Desktop and to completely figure out how to create it MANUALLY.

N0rbert
  • 99,918
mk1024
  • 669

2 Answers2

1

You did it wrong.

The correct desktop file Subline_Text_Editor.desktop should contain only last lines:

[Desktop Entry]
Exec=/usr/bin/stext
Version=1.0
Type=Application
Icon=/home/pc/Downloads/sublime_text_3/Icon/256x256/sublime-text.png
Name=Sublime Text Editor
Terminal=false
Categories=Application

There is no need to have header line (#!usr/bin/env xdg-open in your case).

You do not need sudo to make it executable.

N0rbert
  • 99,918
-1

Problem fixed! 1) Instead of Type=application there should be Type=Application 2) We can not run .desktop file from terminal.

(.desktop file :line 1: [Desktop: command not found) helped me so much. @N0rbert That for last lines isn't true, I checked it: Name of .desktop file: "S T E.desktop" (with spaces), name inside code: "Sublime Text Editor"-this worked. But anyway, thank you for help.

mk1024
  • 669