Anytime I open a file with vim I am taken to the lockout screen. My monitors briefly display that there is no signal. After entering my credentials I am back in and the file is opened.

This started happening yesterday, but was only doing it in new tabs or tmux sessions. So naturally I updated and rebooted. Ran clamscan on the entire computer and found nothing as well.

I use vim for git-commit and it opens there without a problem.

Twice, in several hours, I've also had random logouts that were not connected with executing vim.

Here is the system info:

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:    16.04
Codename:   xenial

And vim is pointed to:

$ which vim

Version:vim 7.4

The vimrc file hasn't been updated in months (or any plugins). There have beens several restarts since then, so I assume no connection to that.

I run zshell, and frequently use tmux. I find that this happens if I'm in bash, tmux, out, zshell, or any combination of these. Other than the two random events, I have not found another command that causes this lockout event. As a vim user, this is quite a frustrating problem and I'd appreciate any help at trying to debug this.

Another interesting thing

If I log into a tty session I do not get the screen-lock when typing vim BUT when I return back to tty7 I do get locked out. I can switch with no problems, but if I execute vim after switching I get the screen-lock when returning. There is a slight delay after returning before I get the screen-lock, about half a second.

If ssh is used to execute vim then the graphical session goes to screen-lock.

No error with GNOME

  • 1
    Can you reproduce this with different desktop environments? – Philippos Jul 5 '17 at 15:23
  • I am about to try that, will update. Just tested and if vim is executed through ssh then the desktop environment goes to screen-lock. – Steven Walton Jul 5 '17 at 15:25
  • @Philippos switched to Gnome and it seems to work fine. If you write that in an answer I'll accept it. – Steven Walton Jul 5 '17 at 15:36
  • Actually, this wasn't meant to solve your problem, but to narrow the possible cause of it. If switching to gnome is okay for you (wouldn't be an option for me!), we can leave it like that. Otherwise we can continue to find the cause: What mechanisms does your Unity have to lock itself (shortcuts, active mouse corners, commands)? Which of those could be triggered be vim? – Philippos Jul 6 '17 at 5:58
  • There is a key card and super+l will lock my screen – Steven Walton Jul 6 '17 at 15:39

Your Answer

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

Browse other questions tagged or ask your own question.