How to set iterm2 as the default terminal

10,466 views
Skip to first unread message

Dũng Trần-Dương

unread,
Mar 24, 2017, 1:32:23 AM3/24/17
to iterm2-discuss
Hi, 

I'm using MacOS Sierra, and latest stable iTerm at the moment. I've read a lot of discussions but non of it worked with latest MacOS I think.

I had tried Homebrew duti, I run this command to hope that it add URL scheme for Term

duti -s com.googlecode.iterm2 term

 I ran the defaults command to verify the change.

defaults read com.apple.LaunchServices/com.apple.launchservices.secure

 },
                {
            LSHandlerPreferredVersions =             {
                LSHandlerRoleAll = "-";
            };
            LSHandlerRoleAll = "com.googlecode.iterm2";
            LSHandlerURLScheme = term;
        },

But duti keep returning Apple Terminal is the default Terminal.

❯ duti -x term                                                                                                                                                             281ms
Terminal
/Applications/Utilities/Terminal.app
com.apple.Terminal

The strange thing is if I use Apple Terminal, ran the command

open term://home_dir

It launched iTerm app. Should I report this issue to iterm2 repository.

George Nachman

unread,
Mar 26, 2017, 2:49:30 PM3/26/17
to iterm2-...@googlegroups.com
You might need to rebuild launch services database:


I don't know anything about duti, but you can use this menu item to set it as the default terminal app:

Inline image 1

--
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.
For more options, visit https://groups.google.com/d/optout.

Dũng Trần-Dương

unread,
Apr 17, 2017, 12:28:43 AM4/17/17
to iterm2-discuss, gnac...@llamas.org
Hi,

I think I had already done this. Is that why the option had been grey out.



How can I force this option again for sure.

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

George Nachman

unread,
Apr 19, 2017, 12:57:58 AM4/19/17
to iterm2-...@googlegroups.com
That's pretty strange. I don't have a good answer—you might report this to the duti folks. Launch Services is a bit of a mystery to me, but they've spent a lot more time thinking about it.

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