Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm thinking through alerting stuff, and decided that, if my screen is locked, I'm not there so I should push the alerts to my phone. But, I cannot currently tell if the screen is locked. I could put something together with Perl and xscreensaver-command -watch, but I'd rather not have to make sure I have that process always running and all. That seems too heavy.

Is there something I'm missing? This seems fairly obvious.

share|improve this question

1 Answer 1

up vote 7 down vote accepted

See:

$ xscreensaver-command -time
XScreenSaver 5.15: screen locked since Wed Sep 26 16:26:15 2012
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.