Sublime Forum

Using a protocol handler to launch Sublime with target file open

#1

I’m only partly succeeding in launching Sublime Text Editor 3 through a protocol handler in Ubuntu 14.04, Chrome Web Browser. This thread is my reference tutorial (sorry I have to break the link) …

http … //askubuntu.com/questions/527166/how-to-set-subl-protocol-handler-with-unity

It explains how to setup a subl protocol handler and a Sublime URL parser.

But even if I run the xdg-open command in command terminal (before trying link in browser
Sublime Text 3 does launch … but with file title ~/open?url=file
instead of the name of the target file test.txt … and an empty window.

My question:

What xdg-open syntax should I use to launch a target file in Sublime Text 3 from a browser link or command line?

Note: I see this “Sorry, new users can only put 2 links in a post.”
So I can’t point to other threads I’ve read.

0 Likes

Support opening files through URL handling
#2

SOLVED … after much searching around for a solution I now see that I had not defined xdg-mime in a terminal command as follows …

xdg-mime default sublime-handler.desktop x-scheme-handler/subl

0 Likes