Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How could I change the lock option for the xscreensaver from the command line?
Been looking around and couldn't find anything about it.
xscreensaver-command -lock will lock it right away, which is not what I'm looking for.
I'm using Fedora 14.

share|improve this question
Could you be a little more specific about what it is you are looking for/attempting to do? – jasonwryan Jan 27 '12 at 6:35
@jasonwryan I would like to be able to change some options (especially the lock) without opening the GUI. To call it from a script. – slybloty Jan 27 '12 at 13:52
up vote 3 down vote accepted

I haven't been able to find an actual command to change the lock feature, but in the configuration file .xscreensaver, located in the home folder, I've found the value of lock: lock: False

In order to modify its value, I can change the value in the config file by using the command:

sed -i 's/\(lock:\t\t\).*/\1False/' /home/username/.xscreensaver

False can be replaced with True based on the requirements.

share|improve this answer

Your Answer


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.