Linking to iTerm2 from a browser via iTerm2:// protocol/scheme

1,082 views
Skip to first unread message

Oliver Nassar

unread,
Jun 16, 2018, 2:15:06 PM6/16/18
to iterm2-discuss
I've conveniently discovered that I can trigger the web browser to open up iTerm2 if I encoded a link with the following:

iTerm2://string

I'm trying to figure out how to have the new iTerm2 window have a default command in it, and better yet, have the command be executed.
I imagined it would be something like:

iTerm2://command+string+<run>

Is this possible?
Haven't been able to find a solution to this via Google.

Thanks1

Rick Hornsby

unread,
Jun 16, 2018, 6:38:06 PM6/16/18
to iterm2-discuss


You might want to check out Alfred, which has the kind of Terminal/iTerm support I think you’re asking about, doesn’t require you to bring up your browser, and has a bunch of other super useful stuff besides.

https://www.alfredapp.com/blog/tips-and-tricks/better-iterm-integration-in-alfred/

Oliver Nassar

unread,
Jun 16, 2018, 6:54:27 PM6/16/18
to iterm2-...@googlegroups.com
Thanks for the response. I use Alfred but I want to integrate it into a web browser to allow our admins a stardard way of deploying a script. Is that not possible?

I figure iTerm2 must do something with the text after the :// ...

On Sat, Jun 16, 2018 at 6:38 PM Rick Hornsby <richard...@gmail.com> wrote:


You might want to check out Alfred, which has the kind of Terminal/iTerm support I think you’re asking about, doesn’t require you to bring up your browser, and has a bunch of other super useful stuff besides.

https://www.alfredapp.com/blog/tips-and-tricks/better-iterm-integration-in-alfred/

--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Oliver Nassar

George Nachman

unread,
Jun 18, 2018, 2:28:43 PM6/18/18
to iterm2-...@googlegroups.com
There were two days in 2011 that the code registered this URL scheme. It was removed because it's a security risk. I guess your launch services database still holds the dangling reference, but all it does now is open a window.

I hope that a URL scheme is not the right answer to your problem, whatever it may be :)

--

Oliver Nassar

unread,
Jun 18, 2018, 2:30:05 PM6/18/18
to iterm2-...@googlegroups.com
Ahh gotcha okay I'll look in another direction then



Oliver Nassar


To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages