10

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.

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
Dave Jacoby
  • 213
  • 2
  • 8

1 Answers1

11

See:

$ xscreensaver-command -time
XScreenSaver 5.15: screen locked since Wed Sep 26 16:26:15 2012
Stéphane Chazelas
  • 522,931
  • 91
  • 1,010
  • 1,501
  • It seems that if I kill xscreensaver and then restart it from the command line, -time still reports "screen locked since" even if the screen is not locked. – poleguy Dec 14 '22 at 17:14