In iTerm2 Command Click on URLS does not work when inside a tmux session
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 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 1.0.0.20140629
tmux -V 1.9a
Solution 1:
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.
Solution 2:
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.