You are not logged in.

#1 2018-01-25 21:24:43

lio
Member
From: Montréal, Canada
Registered: 2009-09-13
Posts: 52

[Solved] How to use xscreensaver to track time at work ?

Hello,

I have recently installed Archlinux as my main working OS on my new desktop at work. I've been using it at home for close to 8 years, but pretty proud to be on it 100% of the time whether at home or at work big_smile

On the topic now...

I would like to track my arrival and departure times at work using unlock and lock events of xscreensaver.
First unlock of the day is when I arrive in the morning and last lock of the day is when I go home.

Logging the lock events is easy if I manually lock because I can simply bind my keyboard shortcut to a script that can write the date/time to a file and then lock xscreensaver instead of directly locking xscreensaver from the keyboard shortcut.

However, I forget to lock my workstation pretty much 90% of the times when leaving the office -_-

I would like to be able to log the lock events even when xscreensaver locks it automatically when the screensaver kicks in (after a few minutes without user actions). I would also like to have the unlock events in the morning to be logged obviously.

I looked in systemd "journalctl" log, but apparently xscreensaver does not write anything in there.

Has anybody used some scheme similar to this to automatically track times at work ? Or have a suggestion that would suit someone that can't simply remember to write arrival and departure times like everyone else ...

many thanks, in any cases.

Last edited by lio (2018-01-26 13:20:40)

Offline

#2 2018-01-25 23:01:13

seth
Member
Registered: 2012-09-03
Posts: 51,017

Re: [Solved] How to use xscreensaver to track time at work ?

Not sure about xscreensaver, but you could use xautolock to run a script that logs the invocation, runs an annoyance for you to exit (fullscreen video loop or whatever) and logs the termination.

However, I forget to lock my workstation pretty much 90% of the times when leaving the office -_-

If you've bluetooth support, you can lock the system when your smartphone gets out of reach (and unlock it likewise)

Offline

#3 2018-01-25 23:23:58

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [Solved] How to use xscreensaver to track time at work ?

seth wrote:

If you've bluetooth support, you can lock the system when your smartphone gets out of reach (and unlock it likewise)

Locking when phone goes out of range: yes, the catch might be bluetooth needs to be on all the time, no power saving (regarding bluetooth only) on both sides, pc and phone.
Unlocking when the phone gets in range: probably not a good idea, I'd say that unlocking should require physical presence at the keyboard.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#4 2018-01-26 09:01:12

seth
Member
Registered: 2012-09-03
Posts: 51,017

Re: [Solved] How to use xscreensaver to track time at work ?

It depends on the environment.
If you can even afford to leave the system unsecured, it's unlikely that somebody will knock you down to get your phone and access to the system wink

Offline

#5 2018-01-26 10:50:33

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [Solved] How to use xscreensaver to track time at work ?

Yes I agree that it depends on the environment, leaving a machine unattended can be game over.

From the OP I got the feeling that the matter here is protecting against overly curious/nosy/prankster co-workers. Following this line of though, being in a nearby room or cubicle might be enough to unlock the machine and give other people the chance to have access to do whatever. It's all a matter between a bit more security and convenience.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#6 2018-01-26 13:19:11

lio
Member
From: Montréal, Canada
Registered: 2009-09-13
Posts: 52

Re: [Solved] How to use xscreensaver to track time at work ?

@seth thanks for the suggestion, that might have been a good solution to have a device detected by my desktop when in range, but bluetooth I believe has a too large range for my situation. I believe it has a range of over 30 feet. I guess anything over 6-8 feet would end up in me randomly offering surf and turf dinners to the rest of the team over Slack tongue (yes prankster is what I fear most here as the main entrance of the office is secured carefully)

Once again I should have RTFM before posting !!!

I discovered last night while reading deeper about xscreensaver, that it comes with a program called "xscreensaver-command" which has the option "--watch" that basically connect to the xscreensaver daemon and log to console all the events.

So I achieved what I wanted by launching this command at logon

/usr/bin/xscreensaver-command --watch >> /home/lio/Desktop/time_log.txt

Offline

Board footer

Powered by FluxBB