Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #/bin/bash
- SHARED_SESSION_FILE=/tmp/shared_tmux_session
- set -e
- tmux -2 -S ${SHARED_SESSION_FILE} new -s guest -d
- sudo chown $(whoami) ${SHARED_SESSION_FILE}
- sudo chmod 777 ${SHARED_SESSION_FILE}
- # after this setup just set login shell of user which will login to this box to:
- # -r is for read only
- # exec tmux -2 -S ${SHARED_SESSION_FILE} attach -r -t guest
- # attach to created session as "owner"
- tmux -2 -S /tmp/shared_tmux_session attach -t guest
Add Comment
Please, Sign In to add comment