Skip to content

Instantly share code, notes, and snippets.

@jin3110
Last active January 8, 2024 12:33
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jin3110/dafd6c78b9734627b6fb to your computer and use it in GitHub Desktop.
Save jin3110/dafd6c78b9734627b6fb to your computer and use it in GitHub Desktop.
How to install tmux in CoreOS toolbox
#!/bin/bash
# Usage
# =====
# ~~~
# /opt/bin/tmux.sh [tmux args...]
# ~~~
#
# How to install tmux in CoreOS toolbox
# =====================================
# * `toolbox yum -y install tmux`
# * `sudo -s -H`
# * `mkdir -p /opt/bin`
# * `vi /opt/bin/tmux.sh`
# * `chmod 755 /opt/bin/tmux.sh`
# * To access `fleetctl` just add `--bind-ro=/usr/bin/fleetctl` to the list of bind-mounts in this script.
exec toolbox --bind=/run/docker.sock --bind-ro=/usr/bin/docker --bind-ro=/var/log/journal --bind-ro=/etc/machine-id tmux $*
@theRemix
Copy link

have you solved the problem where if someone is using tmux.sh then another user is logged in and attempts to use tmux or attach to a running tmux, toolbox won't let second user in?

tmux.sh
Directory tree /var/lib/toolbox/core-fedora-latest is currently busy.
tmux.sh a
Directory tree /var/lib/toolbox/core-fedora-latest is currently busy.

@spieden
Copy link

spieden commented Jun 20, 2017

I had to also install glibc-langpack-en to fix locale errors from tmux.

@spieden
Copy link

spieden commented Jun 20, 2017

Hmm, couldn't figure out how to detach though so went with this instead: https://groups.google.com/forum/#!topic/coreos-dev/JAeABXnQzuE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment