Guest User

Untitled

a guest
Feb 22nd, 2018
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #/bin/bash
  2.  
  3. SHARED_SESSION_FILE=/tmp/shared_tmux_session
  4.  
  5. set -e
  6.  
  7. tmux -2 -S ${SHARED_SESSION_FILE} new -s guest -d
  8. sudo chown $(whoami) ${SHARED_SESSION_FILE}
  9. sudo chmod 777 ${SHARED_SESSION_FILE}
  10.  
  11. # after this setup just set login shell of user which will login to this box to:
  12. # -r is for read only
  13. # exec tmux -2 -S ${SHARED_SESSION_FILE} attach -r -t guest
  14.  
  15.  
  16. # attach to created session as "owner"
  17. tmux -2 -S /tmp/shared_tmux_session attach -t guest
Add Comment
Please, Sign In to add comment