You are not logged in.

#1 2017-01-06 14:32:43

linux_user
50/50 it's a spam account
Registered: 2016-11-04
Posts: 484

[SOLVED] How to run Sublimetext3 after installing deb package?

I downloaded and installed the deb package using the package installer. All went well. However I am not sure how to run it.

I can't find sublime text in dmenu neither can I find it main menu.

Last edited by linux_user (2017-01-07 14:56:33)


"Blind faith to authority is the greatest enemy of truth."

Offline

#2 2017-01-06 16:29:28

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: [SOLVED] How to run Sublimetext3 after installing deb package?

Search for the executable in /usr/bin (probably);

See which files were installed with

dpkg -L subli<tab>

Search in the terminal with "which", "apropos" etc (use tab completion);

Use tab completion with dmenu;

etc


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2017-01-06 16:52:18

linux_user
50/50 it's a spam account
Registered: 2016-11-04
Posts: 484

Re: [SOLVED] How to run Sublimetext3 after installing deb package?

damo wrote:

Search for the executable in /usr/bin (probably);

See which files were installed with

dpkg -L subli<tab>

Search in the terminal with "which", "apropos" etc (use tab completion);

Use tab completion with dmenu;

etc


Nothing in /usr/bin, however after searching with sudo dpkg -L subli tab completions (results below), found the excutable on /opt/

toor@linux:~$ sudo dpkg -L sublime-text 
/.
/usr
/usr/share
/usr/share/icons
/usr/share/icons/hicolor
/usr/share/icons/hicolor/16x16
/usr/share/icons/hicolor/16x16/apps
/usr/share/icons/hicolor/16x16/apps/sublime-text.png
/usr/share/icons/hicolor/32x32
/usr/share/icons/hicolor/32x32/apps
/usr/share/icons/hicolor/32x32/apps/sublime-text.png
/usr/share/icons/hicolor/128x128
/usr/share/icons/hicolor/128x128/apps
/usr/share/icons/hicolor/128x128/apps/sublime-text.png
/usr/share/icons/hicolor/48x48
/usr/share/icons/hicolor/48x48/apps
/usr/share/icons/hicolor/48x48/apps/sublime-text.png
/usr/share/icons/hicolor/256x256
/usr/share/icons/hicolor/256x256/apps
/usr/share/icons/hicolor/256x256/apps/sublime-text.png
/usr/share/applications
/usr/share/applications/sublime_text.desktop
/usr/bin
/usr/bin/subl
/opt
/opt/sublime_text
/opt/sublime_text/Packages
/opt/sublime_text/Packages/Pascal.sublime-package
/opt/sublime_text/Packages/Matlab.sublime-package
/opt/sublime_text/Packages/Go.sublime-package
/opt/sublime_text/Packages/Graphviz.sublime-package
/opt/sublime_text/Packages/Haskell.sublime-package
/opt/sublime_text/Packages/Clojure.sublime-package
/opt/sublime_text/Packages/TCL.sublime-package
/opt/sublime_text/Packages/C++.sublime-package
/opt/sublime_text/Packages/C#.sublime-package
/opt/sublime_text/Packages/Textile.sublime-package
/opt/sublime_text/Packages/Text.sublime-package
/opt/sublime_text/Packages/XML.sublime-package
/opt/sublime_text/Packages/D.sublime-package
/opt/sublime_text/Packages/Lisp.sublime-package
/opt/sublime_text/Packages/Objective-C.sublime-package
/opt/sublime_text/Packages/Vintage.sublime-package
/opt/sublime_text/Packages/Groovy.sublime-package
/opt/sublime_text/Packages/Theme - Default.sublime-package
/opt/sublime_text/Packages/LaTeX.sublime-package
/opt/sublime_text/Packages/Color Scheme - Default.sublime-package
/opt/sublime_text/Packages/Python.sublime-package
/opt/sublime_text/Packages/R.sublime-package
/opt/sublime_text/Packages/PHP.sublime-package
/opt/sublime_text/Packages/ActionScript.sublime-package
/opt/sublime_text/Packages/OCaml.sublime-package
/opt/sublime_text/Packages/Language - English.sublime-package
/opt/sublime_text/Packages/Rails.sublime-package
/opt/sublime_text/Packages/Regular Expressions.sublime-package
/opt/sublime_text/Packages/Erlang.sublime-package
/opt/sublime_text/Packages/Batch File.sublime-package
/opt/sublime_text/Packages/Markdown.sublime-package
/opt/sublime_text/Packages/ASP.sublime-package
/opt/sublime_text/Packages/Perl.sublime-package
/opt/sublime_text/Packages/Ruby.sublime-package
/opt/sublime_text/Packages/Makefile.sublime-package
/opt/sublime_text/Packages/Default.sublime-package
/opt/sublime_text/Packages/Scala.sublime-package
/opt/sublime_text/Packages/YAML.sublime-package
/opt/sublime_text/Packages/JavaScript.sublime-package
/opt/sublime_text/Packages/ShellScript.sublime-package
/opt/sublime_text/Packages/Lua.sublime-package
/opt/sublime_text/Packages/Diff.sublime-package
/opt/sublime_text/Packages/RestructuredText.sublime-package
/opt/sublime_text/Packages/SQL.sublime-package
/opt/sublime_text/Packages/CSS.sublime-package
/opt/sublime_text/Packages/Rust.sublime-package
/opt/sublime_text/Packages/Java.sublime-package
/opt/sublime_text/Packages/AppleScript.sublime-package
/opt/sublime_text/Packages/HTML.sublime-package
/opt/sublime_text/changelog.txt
/opt/sublime_text/sublime_text
/opt/sublime_text/python3.3.zip
/opt/sublime_text/plugin_host
/opt/sublime_text/crash_reporter
/opt/sublime_text/Icon
/opt/sublime_text/Icon/16x16
/opt/sublime_text/Icon/16x16/sublime-text.png
/opt/sublime_text/Icon/32x32
/opt/sublime_text/Icon/32x32/sublime-text.png
/opt/sublime_text/Icon/128x128
/opt/sublime_text/Icon/128x128/sublime-text.png
/opt/sublime_text/Icon/48x48
/opt/sublime_text/Icon/48x48/sublime-text.png
/opt/sublime_text/Icon/256x256
/opt/sublime_text/Icon/256x256/sublime-text.png
/opt/sublime_text/sublime.py
/opt/sublime_text/sublime_plugin.py
toor@linux:~$ 

Also notice that subl is the keyword to run sublime text 3 from gmrun and dmenu.


"Blind faith to authority is the greatest enemy of truth."

Offline

#4 2017-01-06 18:02:13

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 767

Re: [SOLVED] How to run Sublimetext3 after installing deb package?

^Although you marked it solved, I will emphasize that the output of the command you issued includes '/usr/bin/subl', which means exactly that what you have found out yourself: entering 'subl' in gmrun or dmenu or terminal will run Sublime 3. (Just tried it in BL in VBox.)


Postpone all your duties; if you die, you won't have to do them ..

Offline

#5 2017-01-06 18:27:27

linux_user
50/50 it's a spam account
Registered: 2016-11-04
Posts: 484

Re: [SOLVED] How to run Sublimetext3 after installing deb package?

iMBeCil wrote:

^Although you marked it solved, I will emphasize that the output of the command you issued includes '/usr/bin/subl', which means exactly that what you have found out yourself: entering 'subl' in gmrun or dmenu or terminal will run Sublime 3. (Just tried it in BL in VBox.)

After I noticed it in the output, I went to the folder and saw it myself, however it wasn't an executable file. It was shown as a shell script. Didn't know what it was. Anyway, thanks for your post; that's the keyword.

In my case, I figured the keyword subl using the tab completion method. In fact, I never knew this tab completion technique. Tried it first after damo's previous post.

Last edited by linux_user (2017-01-06 18:27:55)


"Blind faith to authority is the greatest enemy of truth."

Offline

#6 2017-01-06 18:41:24

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: [SOLVED] How to run Sublimetext3 after installing deb package?

...
After I noticed it in the output, I went to the folder and saw it myself, however it wasn't an executable file. It was shown as a shell script. Didn't know what it was. Anyway, thanks for your post; that's the keyword.

In my case, I figured the keyword subl using the tab completion method. In fact, I never knew this tab completion technique. Tried it first after damo's previous post.


A shell script can be an executable file, as can python, perl etc scripts. A bin file can also be executable, but isn't human-readable.

I wouldn't be surprised if you find that "/usr/bin/subl" contains a run command for "/opt/sublime_text/sublime.py", in which case running that script directly may also start your application.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#7 2017-01-06 18:46:40

linux_user
50/50 it's a spam account
Registered: 2016-11-04
Posts: 484

Re: [SOLVED] How to run Sublimetext3 after installing deb package?

damo wrote:

A shell script can be an executable file, as can python, perl etc scripts. A bin file can also be executable, but isn't human-readable.

I wouldn't be surprised if you find that "/usr/bin/subl" contains a run command for "/opt/sublime_text/sublime.py", in which case running that script directly may also start your application.

Indeed you're right!
The shell script is executable and it opens up SublimeText.

Opening the script in a text editor shows the following,

#!/bin/sh
exec /opt/sublime_text/sublime_text "$@"

smile

So all these scripts are available to be run using the gmrun or dmenu. New thing learnt. Thanks!

Last edited by linux_user (2017-01-06 18:49:20)


"Blind faith to authority is the greatest enemy of truth."

Offline

#8 2017-01-06 18:50:02

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: [SOLVED] How to run Sublimetext3 after installing deb package?

....
So all these scripts are available to be run using the gmrun or dmenu. New thing learnt. Thanks!

As long as the scripts are in your $PATH they will be picked up by the various run methods ( /usr/bin, /bin, ~/bin etc). The sublime text configuration process has placed that wrapper script in your path, because it knows that it can be executed.

Last edited by damo (2017-01-06 18:52:02)


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#9 2017-01-06 18:52:54

linux_user
50/50 it's a spam account
Registered: 2016-11-04
Posts: 484

Re: [SOLVED] How to run Sublimetext3 after installing deb package?

damo wrote:

As long as the scripts are in your $PATH they will be picked up by the various run methods ( /usr/bin, /bin, ~/bin etc). The sublime text configuration process has placed that wrapper script in your path, because it knows that it can be executed.

Understood... smile


"Blind faith to authority is the greatest enemy of truth."

Offline

#10 2017-01-06 20:02:33

mrneilypops
The BL Scrot.Moe Guy
From: luxembourg
Registered: 2015-09-30
Posts: 577
Website

Re: [SOLVED] How to run Sublimetext3 after installing deb package?

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

  wink

Offline

#11 2017-01-07 06:25:12

linux_user
50/50 it's a spam account
Registered: 2016-11-04
Posts: 484

Re: [SOLVED] How to run Sublimetext3 after installing deb package?

mrneilypops wrote:
sudo ln -s /opt/sublime_text_3/sublime_text /usr/bin/sublime

  wink

What does this do?


"Blind faith to authority is the greatest enemy of truth."

Offline

#12 2017-01-07 07:18:12

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: [SOLVED] How to run Sublimetext3 after installing deb package?

mrneilypops wrote:
sudo ln -s /opt/sublime_text_3/sublime_text /usr/bin/sublime

  wink

What does this do?

It is making a symlink - read the documentation:

man ln

Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#13 2017-01-07 07:24:06

linux_user
50/50 it's a spam account
Registered: 2016-11-04
Posts: 484

Re: [SOLVED] How to run Sublimetext3 after installing deb package?

damo wrote:

It is making a symlink - read the documentation:

man ln

Charming... smile I read the manual, however it doesn't clarify what I see after executing the command.

I created the symlink.. Gmrun says sublime is a unique keyword (a new development) however executing sublime in gmrun shows the error,

Error: No such file or directory

Sublime command not found in terminal as well as dmenu.

Update:
Found out why! The path of sublime text in my system is different; /opt/sublime_text/sublime_text Corrected it!

Last edited by linux_user (2017-01-07 07:43:15)


"Blind faith to authority is the greatest enemy of truth."

Offline

#14 2017-01-07 11:16:30

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [SOLVED] How to run Sublimetext3 after installing deb package?

Maybe make the symlink to ~/bin instead?

ln -s /opt/sublime_text_3/sublime_text ~/bin/sublime

No `sudo` required for that wink

https://en.wikipedia.org/wiki/Principle … _privilege

Offline

#15 2017-01-07 11:24:02

linux_user
50/50 it's a spam account
Registered: 2016-11-04
Posts: 484

Re: [SOLVED] How to run Sublimetext3 after installing deb package?

Head_on_a_Stick wrote:

Maybe make the symlink to ~/bin instead?

Any specific advantage? Is it something like that shortcut (symlink) will be only available to current user?


"Blind faith to authority is the greatest enemy of truth."

Offline

#16 2017-01-07 11:31:01

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [SOLVED] How to run Sublimetext3 after installing deb package?

linux_user wrote:

Any specific advantage?

The thought of system-level symlinks makes my toes curl big_smile

But seriously, I think a user-level alteration makes more sense and is less likely to b0rk things in the event of a typo wink

It's more a matter a general principle really.

Offline

#17 2017-01-07 11:56:06

linux_user
50/50 it's a spam account
Registered: 2016-11-04
Posts: 484

Re: [SOLVED] How to run Sublimetext3 after installing deb package?

Head_on_a_Stick wrote:

The thought of system-level symlinks makes my toes curl big_smile

But seriously, I think a user-level alteration makes more sense and is less likely to b0rk things in the event of a typo wink

It's more a matter a general principle really.

Well, it does makes sense... smile


"Blind faith to authority is the greatest enemy of truth."

Offline

Board footer

Powered by FluxBB