Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to lock my screen on my XUbuntu machine and am failing. I tried using xflock and I get the following error when I run it from the terminal.

/usr/bin/xflock4: 29: /usr/bin/xflock4: xlock: not found

What am I doing wrong? Any hints on how I can rectify this?

share|improve this question

2 Answers 2

Reading /usr/bin/xflock4 you'll see that the script first checks if xscreensaver or gnome-screensaver are running.

If neither of these are running the script will try to run xlock and then maybe slock.

My 12.04.3 system has been upgraded over the years. In the past I had to edit xflock4 because it wasn't properly detecting if xsreensaver or gnome-screensaver was running.

Early versions used "pgrep xscreensaver". This didn't work properly so I needed to use "ps aux | x[s]creensaver" to detect xscreensaver for instance.

Today my script just has a #comment stating it checks if xscreensaver or gnome-screensaver is running. Not sure if an upgrade to 12.04 out this in place or I took if from a system higher than 12.04.

share|improve this answer

Maybe you have to install it. Try with this.

sudo apt-get install xlockmore
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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