Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xautolock 1 hour max?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Sun Dec 16, 2012 12:30 am    Post subject: xautolock 1 hour max? Reply with quote

I'd like to use xautolock to automatically lock my screen after a certain amount of time. I'd like to set the inactivity period to 2 or 3 hours so it doesn't trigger while I'm watching a movie, but the man page specifies a 1-hour limit. Is there any way around this or is there an alternative automatic screen locker without this limitation? Is there a forum or mailing list for xautolock?
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Sun Dec 16, 2012 11:18 am    Post subject: Reply with quote

I use xautolock myself (together with alock). I'm very happy with it.

As for the problem with watching movies, I solved it by using xautolock support for corners.

My timeout is 5 minutes. However I can get the lock instantly if I put the mouse pointer in the upper left corner for 10 seconds. And I can prevent the lock if I put it into the lower left corner.

So when I watch a movie, I simply move the mouse pointer into that corner, so it will not lock. Problem solved!

The corners are not an issue during regular use - my window manager does not require me to move the mouse into the upper left ever, so I don't get unintended locks. And I don't randomly leave the mouse pointer in a corner either, it's usually always somewhere in the middle of the screen when I leave the PC unattended, so it will lock after 5 minutes.

I also make it spawn "xeyes" 10 seconds before it locks down the screen, so if I'm at the PC reading something in the browser for longer than 5 minutes without moving mouse or pressing a key, I suddenly see xeyes pop up and I can click it away, without suffering from a screen lock and having to enter my password.

Code:

xautolock -time 5 -locker "alock -auth passwd -bg blank" \
          -notify 10 -notifier "killall xeyes; xeyes" \
          -corners +0-0 -cornerdelay 10 -cornerredelay 10 \
          -secure &


I'm not sure where the 1 hour limit for -time comes from - if this is something in the xautolock source which was put in there by the author for no particular reason, you could simply edit the code and remove that limit so you'd be able to set your three hour limit.
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1611
Location: U.S.A.

PostPosted: Sun Dec 16, 2012 7:51 pm    Post subject: Reply with quote

Use The Source, Luke! :)
_________________
patrix_neo wrote:
The human thought: I cannot win.
The ratbrain in me : I can only go forward and that's it.
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Sun Dec 16, 2012 8:51 pm    Post subject: Reply with quote

Quote:
So when I watch a movie, I simply move the mouse pointer into that corner, so it will not lock. Problem solved!

That's tricky for me because the reason I use xautolock with a 3 hour limit is so the screen doesn't stay unlocked all night while I'm asleep. I can watch a movie and fall asleep without getting back on the computer to lock it or move the mouse cursor out of the corner.

Quote:
I use xautolock myself (together with alock).

I like alock though. I'm going to give it a try.

Quote:
I'm not sure where the 1 hour limit for -time comes from - if this is something in the xautolock source which was put in there by the author for no particular reason, you could simply edit the code and remove that limit so you'd be able to set your three hour limit.

Quote:
Use The Source, Luke!

I'm doing that now. All I had to do was edit MAX_LOCK_MINS in 'include/config.h'.
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Sun Dec 16, 2012 9:01 pm    Post subject: Reply with quote

Nevermind on alock. It just locked me out of my session. I had to log in as root and kill it. I got a bunch of "pam error:Authentication failure" messages in the terminal. Weird because it worked the first time I tested it.

EDIT: My mistake. I had entered the command as root that time.

I do wish xflock4 considered alock because the XFCE4 power manager uses xflock4 when the lid is shut.
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Sun Dec 16, 2012 9:21 pm    Post subject: Reply with quote

I'm trying to run the following so that the backlight turns off too:

xset dpms force off ; alock -auth pam -bg blank

but it looks like alock turns the backlight back on about half of the time.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Mon Dec 17, 2012 12:55 am    Post subject: Reply with quote

grant123 wrote:
I can watch a movie and fall asleep


Lucky bastard.

I can't fall asleep with even the teensiest amount of noise. And thanks to Tinnitus I always have noise. So... fuck me, right? :x

Too bad the 5 minutes doesn't work out for you. I don't know of an app that could reset the mouse pointer after 3 hours...

As for your xset, try it the other way around maybe. alock ; sleep 5 ; xset ...
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Mon Dec 17, 2012 9:58 pm    Post subject: Reply with quote

Quote:
I can't fall asleep with even the teensiest amount of noise. And thanks to Tinnitus I always have noise.

That sounds like a really bad combination. :(

I watched Life Aquatic last night without having to get up an hour through and unlock the screen since I increased MAX_LOCK_MINS to 180. Works great. Thanks a lot for your help with this and best of luck with your condition. I hope it's temporary. I was in Minorca a few months ago with a major nighttime mosquito problem and I still hear them at night sometimes even though I know they're not there. Did in-ear headphones do that to you?
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Tue Dec 18, 2012 2:34 am    Post subject: Reply with quote

grant123 wrote:
Did in-ear headphones do that to you?


Nah - PC noise most likely. My first one had a 850MB HDD and a 40mm fan in the PSU, it was anything but silent. And at the time and age you either weren't aware that this could be an issue or you simply couldn't help it. Nowadays I make an effort to make every PC I build as silent as possible. It's a lot easier now with integrated GPUs... :)

Anyway, glad to hear that you found an easy way to work around the 1 hour limit of that software. I hope it'll keep working, the software package doesn't seem to get updated much. If it were I'd recommend you make a feature request for this upstream. If it works fine with larger values, the timeout simply shouldn't be so limited.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum