When not inside a tmux session, Command-Click on URLs works flawlessly.

How can I make links clickable in iTerm2 when inside a tmux session?
When hitting Command the mouse pointer changes to the hand pointer icon, but when clicking on an URL, nothing happens.

Note I have the following settings inside my .tmux.conf

# Enable mouse mode
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on

# Mouse pane switching
set-option -g mouse-select-pane on

Disabling them and then reloading .tmux.conf does not resolve the issue.

iTerm2 Version is Build
tmux -V 1.9a

  • If you upgrade to 2.0 this works. – Ian C. Sep 26 '14 at 17:47

To use the normal mouse behavior in tmux you have to keep alt pressed. So click on the link while pressing cmd+alt. The same applies when selecting text.

  • Thank you for trying to help, but your suggestion does not work for me. – jottr Sep 26 '14 at 16:05
  • 1
    Ah, I only figure it out now. You have iTerm2 1.0. That's probably why it doesn't work for you. I'm using 2.0. – Rnhmjoj Sep 26 '14 at 17:27
  • 1
    What software did you use to create the gif? – jottr Sep 26 '14 at 18:38
  • 2
    @elementz I used this script. – Rnhmjoj Sep 26 '14 at 20:58
  • 1
    Rnhmjoj , @jottr Has anyone made any headway on getting this to work for iTerm versions > 2.0? – ijoseph Feb 20 '18 at 23:15

I ran into this issue today. I would command-click on a URL in iTerm2 (Mac) and the app would seemingly lose focus but the link wouldn't open in a browser (Chrome, in my case). This used to work fine for me so I was a little confused and the other answers here didn't work for me.

It seemed to me that Chrome was "trying" to open but failing for some reason. I ran ps -ax | grep -i chrome to get a list of the Chrome or Chrome-related processes that were running and sure enough there was a process running that didn't correspond to an application that I was actively using.

Long story short, I killed all the Chrome-related processes and command-click worked again.


The top answer may work when using regular tmux, but it will not work when using iTerm2+tmux integration with the -CC option. For Cmd+Click to use your "Semantic History" Profile Preference, you have to install iTerm2 Shell Integration. Also I have found it best to create a seperate .tmux.conf.iterm with tmux integration, then create aliases for creating and attaching integrated sessions.

alias tcs="tmux -f ~/.tmux.conf.iterm -CC new -s"
alias tca="tmux -f ~/.tmux.conf.iterm -CC attach -t"

The only think in my ~/.tmux.conf.iterm file is set-option -g default-terminal screen-256color

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .