Sublime Forum

How to install subl protocol?

#1

Hello. On page https://packagecontrol.io/packages/subl%20protocol there is a sentence (Note 3: on Linux you need to have subl in your path). So, how Do I do that?

0 Likes

#2

https://duckduckgo.com/?q=linux+add+executable+to+path

2 Likes

#3

On terminal, when write:
subl
then open Sublime Text 3. So, the $PATH variable is correct, but when writting:
subl://home/javier/test.php
the response is:

javier@pcjavi:~$ subl:///home/javier/test.php
bash: subl:///home/javier/test.php: File or directory not found

same with 1 slash minus:

javier@pcjavi:~$ subl://home/javier/test.php
bash: subl://home/javier/test.php: File or directory not found

And the file /home/javier/test.php does exist. So, how can I subl protocol get working?

0 Likes

#4

Shells don’t support this kind of operation – or does this work with http?

Normally you would register a protocol handler with X11, but then you would use something like xdg-open subl://path/to/file instead. Or you could register it in your browser.

Edit: I didn’t look into the package until now, but it does seem indeed that this is what happens:

2 Likes

Support opening files through URL handling