vlock is for locking the console; I don’t think it will work with X. It tries to detect the console it’s running from. If you run it in an xterm, it will lock the pts which that xterm is running but will be unable to lock the entire console screen.
You’ll need one of the X lock programs, probably one of the standalones like xlockmore or slock. Though I use lightlocker with lightdm, I always liked slock because it blanks the screen and never gives you a prompt (making the system look dead/unresponsive).
well it used to now it has a feature (or antifeature if you will) to change colors when you start typing. only way to disable it is to change the make config (config.mk) and rebuild…
There’s an option to disable VT switching as well, so the system is truly locked.
xlock (xlockmore) has a lot more options (including screensaver options…) It can also disable VT switching.
Those can be put into your xinitrc (it works)