I used to leave my byobu sessions detached on a server. I want to lock the session to prevent other users (root account) accessing my session.

Is this possible?


GNU screen (one backend that byobu can use, along with tmux) has the lockscreen functionality. Have a look at the man page to see what it does. The default binding is C-a C-x.

With regard to your trying to lock root out, it's rather pointless. What you can try is to find a locking program that let you set a password and hope that root doesn't know about it.

| improve this answer | |
  • 1
    Thanks a lot, the default binding works with byobu. The password by default in ubuntu on a locked byobu is the same as the user's. – avances123 Sep 14 '11 at 16:07
  • Great that this works for you. Just be aware that it's not protected against root ;) – phunehehe Sep 14 '11 at 16:31
  • I share root account with a colleague, and he uses my screens without permission. i will launch as my normal user and inside do sudo su – avances123 Sep 14 '11 at 17:14

Byobu now also supports a tmux backend, in addition to screen.

For tmux, you can issue the lock-session (to lock the entire session and all attached clients), or the lock-client command, to just lock the current client.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.