Ask Different (Apple)
Q&A for power users of Apple hardware and software
Latest Questions
0
votes
1
answers
131
views
tmux Isn't Sourcing bash_profile After MacOS update
I recently updated to Sequoia 15.3.1 and now tmux isn't displaying the command prompt format I've set on my .bash_profile. I have to manually source .bash_profile every time I open a new session. Anyone know what the problem is? It didn't used to be like this.
I recently updated to Sequoia 15.3.1 and now tmux isn't displaying the command prompt format I've set on my .bash_profile. I have to manually source .bash_profile every time I open a new session. Anyone know what the problem is? It didn't used to be like this.
Samuel Bacay
(43 rep)
Mar 1, 2025, 08:10 PM
• Last activity: Jul 30, 2025, 02:08 AM
1
votes
1
answers
102
views
Unable to create more than 127 windows/terminals in tmux
I am using `tmux` on macOS. As the number of repos that I am working with increases, the number of tmux windows increases as well. Just yesterday, I run into the issue that I am not able to open more than 127 `tmux` windows which breaks my whole workflow. create window failed: fork failed: Too many...
I am using
tmux
on macOS. As the number of repos that I am working with increases, the number of tmux windows increases as well. Just yesterday, I run into the issue that I am not able to open more than 127 tmux
windows which breaks my whole workflow.
create window failed: fork failed: Too many open files
can't find window: 128
can't find window: 128
The workaround that I found does not work
sudo sysctl -w kern.tty.ptmx_max=511
What do I need to configure to open more than 127 windows in tmux
?
user2156115
(131 rep)
May 14, 2024, 05:18 AM
• Last activity: Oct 11, 2024, 10:00 AM
6
votes
2
answers
4875
views
Operation not permitted when accessing Downloads folder
When I try to `ls` the `~/Downloads` folder on my mac I get a `ls: Downloads: Operation not permitted` error. My user does have rwx permissions on the folder. I can look at the folder just fine in finder. I use `tmux` in iterm2. The issue does not exist when I use `terminal.app`. It does work if I s...
When I try to
ls
the ~/Downloads
folder on my mac I get a ls: Downloads: Operation not permitted
error. My user does have rwx permissions on the folder. I can look at the folder just fine in finder. I use tmux
in iterm2. The issue does not exist when I use terminal.app
. It does work if I start tmux
in terminal.app
, regardless of which terminal emulator I use to control tmux. iTerm.app
already has Downloads folder permissions in Security & Privacy settings. What is the reason for this?
Philippe
(889 rep)
Jul 21, 2022, 01:00 PM
• Last activity: Sep 6, 2024, 08:34 AM
5
votes
3
answers
2377
views
How can I limit iTerm2 text selection to a single tmux pane?
I have a late 2013 MacBook Pro running iTerm2. I don't have tmux installed on it, but I use tmux on the remote Linux host I frequently connect to via ssh. When tmux is displaying a **vertical split** and I use the trackpad to select text, the selection is automatically limited to just one pane. That...
I have a late 2013 MacBook Pro running iTerm2. I don't have tmux installed on it, but I use tmux on the remote Linux host I frequently connect to via ssh. When tmux is displaying a **vertical split** and I use the trackpad to select text, the selection is automatically limited to just one pane. That's exactly how I want it.
I have recently begun using a 2018 MacBook Pro. Using the same iTerm2 version (3.2.9), and the same remote tmux session, text selection spans the entire window width instead of staying in a single pane.
What setting controls that behavior?
I'm aware I can hold Command+Option to select a _block_ of text, but that's not what I'm after. I'm looking to select, for example, a sentence that starts mid-paragraph and spans multiple lines. Block selection doesn't allow that.
Rob Kennedy
(195 rep)
Jul 19, 2019, 04:44 PM
• Last activity: Mar 24, 2024, 12:28 PM
0
votes
1
answers
377
views
How do I re-enable iTerm permissions to use AppleScript app control
I have some AppleScript, to bulk export URLs and titles of tabs from my browser. It used to work, from iTerm (and Terminal, and Script Editor). ***I keep my terminal as long-running sessions in tmux that survives application restarts.*** - It no longer works from iTerm, on a slow timeout, it returns...
I have some AppleScript, to bulk export URLs and titles of tabs from my browser.
It used to work, from iTerm (and Terminal, and Script Editor).
***I keep my terminal as long-running sessions in tmux that survives application restarts.***
- It no longer works from iTerm, on a slow timeout, it returns
- In Script Editor, it works.
**How do I re-prompt for appropriate "application control" access for iTerm?** *It's unclear which setting is needed. I already provide "Full Disk Access" among others. The existing approval may have started failing after an update to the OS, or after the application underwent an update.*
Relatedly, can I use some System level tool to see all entitlements by application, instead of by entitlement? It's frustrating to try to guess which additional newly created permissions concepts are required to continue using scripting bridge functionality.
---
I've explicitly upgraded the application, still fails.
In hopes of resetting the preferences entitlements-application mapping, I could delete iTerm, install it again, and see if that prompts me again.
... got an error: Application isn’t running. (-600)
.
- In Terminal, I'm prompted for "access to control" the app, and then it works.

mcint
(269 rep)
Oct 24, 2022, 11:17 PM
• Last activity: Mar 24, 2023, 05:02 AM
1
votes
0
answers
35
views
Changing tmux "normal" mouse from fn key to ctrl key
When running tmux in a terminal window, I can get the usual terminal mouse behavior by holding down the `fn` key. When using an external keyboard, I do not have a `fn` key. How can I map this behavior to another key, such as `ctrl`?
When running tmux in a terminal window, I can get the usual terminal mouse behavior by holding down the
fn
key.
When using an external keyboard, I do not have a fn
key. How can I map this behavior to another key, such as ctrl
?
Mark Harrison
(1809 rep)
Mar 20, 2023, 09:52 PM
1
votes
0
answers
218
views
tmux prefix+tab not working
Moving from Ubuntu to Mac Using latest Tmux In ubuntu, prefix+tab will show a popup with commands w/ fzf to select In Mac nothing happens No keys attached to Tab [![][1]][1] [1]: https://i.sstatic.net/FxOnV.png
Moving from Ubuntu to Mac
Using latest Tmux
In ubuntu, prefix+tab will show a popup with commands w/ fzf to select
In Mac nothing happens
No keys attached to Tab

ravid
(11 rep)
Feb 27, 2023, 09:20 AM
• Last activity: Feb 27, 2023, 10:51 AM
7
votes
4
answers
5833
views
I can't delete characters in tmux on macOS
I have searched around and the closes thing I could find to my issue is this: https://stackoverflow.com/questions/23848061/cannot-get-delete-key-to-work-with-tmux-and-osx I am running multiple versions of OSX and macOS and I am using iTerm2. When I go into a tmux session my delete key does not work....
I have searched around and the closes thing I could find to my issue is this:
https://stackoverflow.com/questions/23848061/cannot-get-delete-key-to-work-with-tmux-and-osx
I am running multiple versions of OSX and macOS and I am using iTerm2.
When I go into a tmux session my delete key does not work. I also try to use Ctrl+H and Ctrl+?, which those are not doing anything for me.
In iTerm preferences->keys, I have delete sent to ^H. In preferences->profiles->keys, I also have the box checked, Delete key send ^H.
Vim is able to delete in tmux but from the command line I can not.
## .tmux.conf
# Set default term
set -g default-terminal "xterm"
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# Start number at 1
set -g base-index 1
# UTF-8
set-option -g status-utf8 on
# supposedly fixes pausing in vim
set -s escape-time 1
# set default terminal
set -g default-terminal "xterm-color256"
# Vi copypaste mode
set-window-option -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
bind p paste-buffer
unbind %
unbind '"'
unbind [
bind | split-window -h
bind - split-window -v
bind ^C-s copy-mode
set-option -g default-shell /bin/zsh
setw -g history-limit 10000
#quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# Clear pane
bind C-l send-keys -R \; clear-history
# add airline to tmux status bar
if shell "test -f ~/.tmuxlinesnapshot" "source ~/.tmuxlinesnapshot"
Any help would be much appreciated!
Nick Rucci
(211 rep)
Mar 11, 2016, 05:12 PM
• Last activity: Feb 6, 2023, 08:33 PM
1
votes
0
answers
632
views
Control-Option-<arrow> hotkey not working in tmux
I'm using tmux over iTerm2 in Mac OS 12.5. I have such directives in tmux config file: # resizing panes using Ctrl-Alt-arrows without prefix bind -n C-M-Up resize-pane -U 2 bind -n C-M-Down resize-pane -D 2 bind -n C-M-Left resize-pane -L 10 bind -n C-M-Right resize-pane -R 10 bind -n C-M-k resize-p...
I'm using tmux over iTerm2 in Mac OS 12.5.
I have such directives in tmux config file:
# resizing panes using Ctrl-Alt-arrows without prefix
bind -n C-M-Up resize-pane -U 2
bind -n C-M-Down resize-pane -D 2
bind -n C-M-Left resize-pane -L 10
bind -n C-M-Right resize-pane -R 10
bind -n C-M-k resize-pane -U 2
bind -n C-M-j resize-pane -D 2
bind -n C-M-h resize-pane -L 10
bind -n C-M-l resize-pane -R 10
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
C-M-{h,j,k,l}
and M-{Left,Right,Up,Down}
are working as expected, but for some reason C-M-{Left,Right,Up,Down}
are not working at all. But on Windows machine under WSL the same config works fully as expected.
Is it some kind of global Mac OS keybinding? But looks like it does nothing. Is there a way to make it work for tmux?
dmchmk
(61 rep)
Aug 5, 2022, 07:25 PM
• Last activity: Aug 16, 2022, 07:54 AM
4
votes
1
answers
4685
views
tmux jump words as with zsh
I moved from just using zsh to using zsh inside tmux. As my terminal is iTerm2 for both combinations. I have the following lines in my `.zshrc` to enable jumping words on a bare zsh command line using the ALT+arrow keys: bindkey '[C' forward-word bindkey '[D' backward-word Sadly this is not working...
I moved from just using zsh to using zsh inside tmux. As my terminal is iTerm2 for both combinations.
I have the following lines in my
.zshrc
to enable jumping words on a bare zsh command line using the ALT+arrow keys:
bindkey 'C' forward-word
bindkey '[D' backward-word
Sadly this is not working inside my tmux session.
> How can I jump words back and forth also in tmux using ALT + arrow
> key?
What I tried so far:
1. set-window-option -g xterm-keys on
[1
lony
(161 rep)
May 4, 2017, 09:22 AM
• Last activity: Apr 12, 2022, 12:14 PM
2
votes
0
answers
225
views
open command partially not working in tmux in MacOS
When inside a tmux session on the local computer, a command: open "https://www.google.com" opens a url in the default browser. However, when trying to open a file using an app: open -a Preview ./picture.png open produces no error message, but fails to open the file. When I replicate the same command...
When inside a tmux session on the local computer, a command:
open "https://www.google.com "
opens a url in the default browser.
However, when trying to open a file using an app:
open -a Preview ./picture.png
open produces no error message, but fails to open the file.
When I replicate the same command in Terminal app, picture.png opens as expected in Preview app.
I have read about a similar problem here: "open" command doesn't work properly inside tmux , however, my problem is different as there is no error output and also, reattach-to-user-namespace is now obsolete.
Anyone knows how to troubleshoot this?
noquestiontoosilly
(21 rep)
Feb 16, 2022, 07:05 AM
1
votes
0
answers
504
views
No colors in zsh for first tmux session
When I start a new tmux session (macOS 11.5.1, iTerm2 3.4.10, zsh 5.8, tmux 3.2a) with `tmux new`, my terminal has no colors, it just displays everything in grey tones. But when creating a new window or split window, the colors are there right from the beginning. Also, when I already started a sessi...
When I start a new tmux session (macOS 11.5.1, iTerm2 3.4.10, zsh 5.8, tmux 3.2a) with
tmux new
, my terminal has no colors, it just displays everything in grey tones. But when creating a new window or split window, the colors are there right from the beginning.
Also, when I already started a session and I create another one with tmux new
the colors also work from the beginning.
When I close every session, and open another one, it displays everything in grey tones again.
This is my .tmux.conf
, maybe there is something wrong with it?
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'dracula/tmux'
set -g @dracula-show-fahrenheit false
set -g @dracula-show-powerline true
set -g @dracula-show-flags true
set -g @dracula-day-month true
set -g @dracula-show-network false
set -g @dracula-show-battery false
set -g @dracula-show-time false
set -g @dracula-show-location true
set -g @dracula-show-flags true
set -g @dracula-show-left-icon smiley
set-window-option -g mode-keys vi
setw -g mode-keys vi
bind-key / copy-mode \; send-key ?
bind-key -T copy-mode-vi Escape send -X cancel
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-pipe "reattach-to-user-namespace pbcopy"
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
bind a send-prefix
bind-key C-a last-window
bind -n C-k send-keys -R \; clear-history \; send-keys "Enter"
set-option -g mouse on
# change order of windows by pressing Ctrl-Shift-Direction Key
bind-key -n C-S-Left swap-window -t -1\; select-window -t 0
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
# join panes
bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'"
# stay in the same directory when creating panes and windows
bind '%' split-window -h -c '#{pane_current_path}' # Split panes horizontal
bind '"' split-window -v -c '#{pane_current_path}' # Split panes vertically
bind c new-window -c '#{pane_current_path}' # Create new window
run -b '~/.tmux/plugins/tpm/tpm'
23tux
(181 rep)
Oct 15, 2021, 08:25 AM
2
votes
0
answers
233
views
tmux's extraneous visual bells in iTerm2
I recently started using `tmux`, I rely on visual bells (see Preferences -> Appearance -> Tabs -> Show new-output indicator) in `iTerm2` to let me know when processes start/finish. When I start a `tmux` session in a tab of an `iTerm2` window and then change focus, after a minute or two, the 'blue do...
I recently started using
tmux
, I rely on visual bells (see Preferences -> Appearance -> Tabs -> Show new-output indicator) in iTerm2
to let me know when processes start/finish. When I start a tmux
session in a tab of an iTerm2
window and then change focus, after a minute or two, the 'blue dot' appears in the tab. Nothing has happened in that window. I suspect that this is due to some behind the scenes activity (e.g. keeping the session alive?)
Question :
1. How do I keep visual bells in iTerm2
while stopping tmux
from issuing these extraneous bells?
irritable_phd_syndrome
(555 rep)
Aug 23, 2021, 01:03 PM
• Last activity: Aug 23, 2021, 02:55 PM
25
votes
9
answers
25040
views
Copy to clipboard from Tmux in El Capitan
I am quite happy with the Terminal changes in El Capitan (see e.g. [this question](https://apple.stackexchange.com/questions/208384/changes-to-terminal-in-el-capitan)). However, i can't figure out how to enable copying to system clipboard from within Tmux. For instance, now that I am able to select...
I am quite happy with the Terminal changes in El Capitan (see e.g. [this question](https://apple.stackexchange.com/questions/208384/changes-to-terminal-in-el-capitan)) .
However, i can't figure out how to enable copying to system clipboard from within Tmux. For instance, now that I am able to select text within Tmux properly by mouse, how can i copy selected text to clipboard as well, in addition to Tmux's own buffer?
I have the following in my
tmux.conf
:
setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
setw -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
I tried modifying the last line to
bind-key -t vi-copy 'y' copy-selection \; copy-pipe "pbcopy"
but it didn't really work. Would be grateful for suggestions!
Thanks!
vitvly
(733 rep)
Oct 1, 2015, 12:27 PM
• Last activity: May 4, 2021, 06:00 PM
3
votes
4
answers
5870
views
Why does F4 not work in MacOS X (Touchbar macBook, or macBook Air)?
I'm using iterm2 together with tmux and I need the function keys. Ever since I got the TouchBar Macbook Pro and upgraded to HighSierra, the F4 key became disfunctional in iTerm2 and emacs. - The F4 key is used to cycle through the open tabs in tmux forwards - The F3 key (cycle backwards) and in fact...
I'm using iterm2 together with tmux and I need the function keys. Ever since I got the TouchBar Macbook Pro and upgraded to HighSierra, the F4 key became disfunctional in iTerm2 and emacs.
- The F4 key is used to cycle through the open tabs in tmux forwards
- The F3 key (cycle backwards) and in fact all other F keys work as expected
- The F4 key worked before the HighSierra / Touchbar upgrade. I used Time Machine to migrate, so no configuration changed.
- The F4 also does not work with on an external Magic Keyboard, indicating a software / mapping issue.
I suspect that some change in High Sierra makes macOS not pass the F4 key on to applications, but I'm not sure. I have checked that no system wide keyboard shortcut is assigned to F4. What else could I check?
Update: The issue can be confirmed with the keyboard viewer , a program that allows to display all keys pressed. It clearly confirms that all keys except F4 are registered by the system while F4 is not.
Thomas
(1302 rep)
Nov 23, 2017, 10:53 AM
• Last activity: Feb 18, 2021, 04:06 PM
0
votes
1
answers
682
views
how to bind double tapping the shift key in tmux
i spent some time yesterday trying to figure out how i can bind a _double tap_ -esque key binding for tmux, and made some progress, but still incomplete. i am hoping to maximize/minimize a pane within a tmux window by double tapping the shift key. even better if i can granularly map it to the left s...
i spent some time yesterday trying to figure out how i can bind a _double tap_ -esque key binding for tmux, and made some progress, but still incomplete.
i am hoping to maximize/minimize a pane within a tmux window by double tapping the shift key. even better if i can granularly map it to the left shift key and have double tapping the right shift key perform a different key binding.
while doing some research on how to do this i came across this unix/linux stackexchange q&a . the person who asked that question is essentially asking the same thing i am but on a gnu+linux platform and not a darwin+bsd platform ie. macos.
in that _unix/linux q&a_ the op who provides the accepted answer recommends using _xcape_ to map a custom binding for xterm (if i understand correctly), and i believe _xcape_ is tied to X11 window manager, and i'm using Alacritty as my terminal emu along with Aqua as my desktop environment, so i don't believe using _xcape_ is a viable solution on macos. i am aware of karabiner-elements for setting custom key mappings on macos, which i have done for several keys, but i don't think i'd have to set that up (but could be wrong) as this binding is specific to my term emu.
it seems either my tmux mappings are not correct or alacritty is not passing the mapping to tmux in order to perform the mapping. this is where things get confusing for me.
a couple of things i have tried within my
tmux.conf
set-option prefix2 "f11" # WORK!!!
bind-key "f11" resize-pane -Z # double tap f11 (requires holding fn key on mbp keyboard)
when i set the prefix2
with the below setting
set-option prefix2 "C-S-M"
bind C-S-M display "ctrl+shift+meta pressed"
i do **not** see the message flashed within my tmux status bar.
i have other key bindings in tmux that use the shift key with arrow keys, so i know it's not a problem with the shift key, so i'm confused as to which program i don't have configured properly.
i have my [alacritty.yml][lnk2] config file hosted within my dotfiles repo, and my tmux.conf is hosted within the same repo but i have pasted the important parts above. please excuse my ignorance if i'm forgetting something trivial.
ipatch
(362 rep)
Feb 12, 2021, 07:33 PM
• Last activity: Feb 12, 2021, 10:20 PM
1
votes
1
answers
116
views
What is the difference between these two cursors, with tmux?
When running iTerm2 / Tmux, I have this cursor: [![enter image description here][1]][1] but when I hold the alt/option key, I have this cursor: [![enter image description here][2]][2] what is the difference? [1]: https://i.sstatic.net/pZ2pv.png [2]: https://i.sstatic.net/3bks0.png
When running iTerm2 / Tmux, I have this cursor:
but when I hold the alt/option key, I have this cursor:
what is the difference?


Thomas
(369 rep)
Oct 14, 2020, 10:16 PM
• Last activity: Oct 15, 2020, 09:54 AM
0
votes
0
answers
167
views
Giving camera access to tmux or ssh
I have a couple of executables that I need to call, and within them some OpenCV functions are called, requiring camera access. If I run the executable locally on Terminal from my machine, everything works as expected because I have given Terminal camera access. However if I run the same executable t...
I have a couple of executables that I need to call, and within them some OpenCV functions are called, requiring camera access.
If I run the executable locally on Terminal from my machine, everything works as expected because I have given Terminal camera access. However if I run the same executable through ssh, or within a tmux window, then the OpenCV function fails as it is not given camera access. It is the same for other command line programs that need camera access, like for example imagesnap.
I have noticed that if I run a "screen" or "tmux" session on my machine locally, and then access it remotely over ssh, the camera access works, but if I create the session over ssh, and afterwards access it locally, it does not.
Is it possible to give tmux/screen/ssh camera access?
There was some talk about this here - https://apple.stackexchange.com/questions/377131/how-can-i-permit-ssh-connection-terminal-programs-to-access-camera - but in the end the proposed solution didn't actually fix the problem, and it was just a workaround that works in specific cases.
Kolja
(726 rep)
May 19, 2020, 01:47 PM
• Last activity: May 19, 2020, 02:06 PM
4
votes
2
answers
6349
views
Can I make tmux scroll from my trackpad?
I want to set up iTerm2 to pass scroll events to tmux, so I can trivially enter (and exit) scrollback mode for whatever pane is active. Is this possible to do with iTerm2, or automation of some sort, or ...?
I want to set up iTerm2 to pass scroll events to tmux, so I can trivially enter (and exit) scrollback mode for whatever pane is active. Is this possible to do with iTerm2, or automation of some sort, or ...?
Kaolin Fire
(203 rep)
Mar 8, 2015, 07:13 PM
• Last activity: Apr 29, 2020, 06:51 PM
0
votes
2
answers
1566
views
Copying and pasting between tmux panes containing vim instances over SSH in Terminal.app
I use vim to develop Perl code on a remote Linux box running Debian Jesse. The machine is a virtual machine running in VirtualBox. I use ssh and then issue a `vim ` command to start editing the file. I've been experimenting with tmux on the remote machine to see how I like it. But I cannot for the l...
I use vim to develop Perl code on a remote Linux box running Debian Jesse. The machine is a virtual machine running in VirtualBox. I use ssh and then issue a
vim
command to start editing the file.
I've been experimenting with tmux on the remote machine to see how I like it. But I cannot for the life of me figure out how to copy and paste text between vim instances in two different tmux panes. I'd prefer to be able to use both the mouse and vim-like keystrokes (yy
, dd
p
) to do this.
I've tried just about every recommendation out there for trying to get this to work but I haven't gotten anywhere. I'm running El Capitan. Is there a definitive answer out there for getting this to work?
StevieD
(1774 rep)
Apr 21, 2016, 01:58 PM
• Last activity: Jan 21, 2020, 02:17 PM
Showing page 1 of 20 total questions