Skip to content

Conversation

@eborisch
Copy link
Contributor

@eborisch eborisch commented Aug 6, 2025

This patch uses a private (/var/run/vm-bhyve.sock) socket (and therefore tmux server process) when tmux is enabled rather than sharing with the root user. (For actions like tmux list or tmux attach.)

Note that this update requires shutting down and restarting VMs to be able to attach to them. (Since a running VM pre-update will still be sharing root's tmux server.)

DtxdF added a commit to DtxdF/vm-makejail that referenced this pull request Sep 15, 2025
We need this so as not to confuse tmux, at least for desktop users.
The problem is very rare, but it can be reproduced when using tmux
on the host and you start/restart the jail (within the tmux session),
so the vm-bhyve rc(8) script will try to start the virtual machine
with the user's environment, confusing tmux, resulting in the error
"error creating /tmp/tmux-<host user UID>/default (No such file or directory)"
(which is not easily visible) and, worse, the virtual machine will
not start unless it is started manually.

Another alternative is the following patch:
 freebsd/vm-bhyve#25
@eborisch eborisch force-pushed the private_tmux_socket branch from b09b04d to e22e442 Compare November 25, 2025 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant