I have just installed tmux and vlock. When I try to perform the lock-session command, my terminal flashes and then nothing happens. Is there something in my .tmux.conf that must be added to tell tmux that I have a locking utility? If so, what is it?

In other words:

How can I do lock-session with tmux?

up vote 10 down vote accepted

Put the following in the .tmux.conf:

set-option -g lock-command vlock

I have the following tmux.conf lines:

# Enable locking
set -g lock-command vlock
set -g lock-after-time 0 # Seconds; 0 = never
bind L lock-session

Pressing [prefix] + L (capital) locks my session.

Related How can I lock just the current client?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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