5

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?

jasonwryan
  • 73,126
avances123
  • 153
  • 4

2 Answers2

4

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.

phunehehe
  • 20,240
  • 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
3

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.