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
  • I just realized that it does now! Thx for the gif! I have no clue what is different now though. :) – jottr Sep 26 '14 at 18:37
  • 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

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 .