You are not logged in.

#1 2011-05-21 01:56:08

Guff
Member
Registered: 2009-09-30
Posts: 158
Website

Slimlock - fairly simple X screenlocker that looks like SLiM

So, some time back, Joel Burget created slimlock by mashing together bits from slim and slock. A couple weeks ago, I happened upon it in the AUR. I forked the repository and somehow managed to fix a couple of things. At least, I think they're fixed. I could very possibly be wrong.

But anyways, features:

  • Reads your slim.conf and uses your current theme

  • Looks just like your SLiM login screen

  • Looks pretty, unless your SLiM theme is ugly, in which case it will also look ugly. This is a known bug

  • Visual feedback

The bugs I fixed include one in SLiM itself wherein non-input keypresses (e.g. function keys) would make the panel redraw the text, on top of the existing text. This would lead to visual artifacts, what with the text being antialiased and all. Besides that, a weird one where it wouldn't grab the keyboard properly in some circumstances that I still don't fully understand. Mostly, though, I took out the unneeded bits from SLiM and spruced up the code a little.

And recently, Joel made me a collaborator on github, so future updates should be reflected at Joel's github repo. And I do intend to keep doing stuff with this. Suggestions/requests are welcome.

Oh yeah, and here it is in the AUR, and here is my github repo. Note: the 'slimlock' package is out of date, and not maintained by me. Please use 'slimlock-git' instead

Screenshot:
tpJnMs.jpg
slimlock with archlinux-soft-grey theme
Okay, I don't think I left anything out. This is my first package, as well as my first post about a package so I hope I did this right.

Last edited by Guff (2011-05-23 17:43:51)

Offline

#2 2011-05-21 10:05:37

jeslinmx
Member
Registered: 2010-11-20
Posts: 120

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Wow. This looks rather fantastic. Sorry I can't test it out or support it: I don't use slim. Still, I think many users of lightweight desktops have been looking for something like GNOME's screen lock but without the deps, and this fits the job perfectly. All the best!


Lenovo Y450 + Arch x86_64 dual boot with Windows 7 + Openbox standalone + Arch default kernel + Nouveau + yours truly = A lot of *****in' in the Arch Forums.

Offline

#3 2011-05-21 13:50:51

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

I'd like to try this (actually you made me switch to SLiM for it!) but I don't know how to configure it correctly. What files do I have to edit, and what packages do I need to install?


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#4 2011-05-21 15:12:08

Guff
Member
Registered: 2009-09-30
Posts: 158
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Thanks.

jeslinmx wrote:

Sorry I can't test it out or support it: I don't use slim.

Speaking of which, I figure slim should be a dependency for now given that this relies on its config file and themes. PKGBUILD updated to reflect that.
I'm thinking about decoupling it from slim, though. The idea I've got would be to give slimlock its own config file, which would include an option to get the other parameters from either slim or slimlock's config. I'm not entirely sure what direction to go in though.

Unia wrote:

I'd like to try this (actually you made me switch to SLiM for it!) but I don't know how to configure it correctly. What files do I have to edit, and what packages do I need to install?

Currently, slimlock only reads SLiM's configuration file. So, if you've got slim set up the way you want it, you shouldn't have to do anything else to get slimlock working. And the only packages you should need are slimlock's dependencies. It's possible something got left out, though. If you have any trouble, let me know.

Last edited by Guff (2011-05-21 15:13:39)

Offline

#5 2011-05-21 15:23:34

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Guff wrote:
Unia wrote:

I'd like to try this (actually you made me switch to SLiM for it!) but I don't know how to configure it correctly. What files do I have to edit, and what packages do I need to install?

Currently, slimlock only reads SLiM's configuration file. So, if you've got slim set up the way you want it, you shouldn't have to do anything else to get slimlock working. And the only packages you should need are slimlock's dependencies. It's possible something got left out, though. If you have any trouble, let me know.

So I guess I don't need any screensaver packages installed? That's nice, I'll have a little play with it!


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#6 2011-05-21 15:27:52

Guff
Member
Registered: 2009-09-30
Posts: 158
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Unia wrote:

So I guess I don't need any screensaver packages installed? That's nice, I'll have a little play with it!

Yes. slimlock is merely a screenlocker. No screensaver functionality. Or DPMS stuff either.

Offline

#7 2011-05-21 15:45:23

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Guff wrote:
Unia wrote:

So I guess I don't need any screensaver packages installed? That's nice, I'll have a little play with it!

Yes. slimlock is merely a screenlocker. No screensaver functionality. Or DPMS stuff either.

Excuse my noobishness, but when exactly does it kick in then?


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#8 2011-05-21 17:02:37

Guff
Member
Registered: 2009-09-30
Posts: 158
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Unia wrote:

Excuse my noobishness, but when exactly does it kick in then?

When you run it. Or when something else does.
If you want your screen to lock after x minutes/hours/etc., you could use xautolock. You'd do something like "xautolock -locker slimlock -time 15". I'm not that familiar with xautolock, though; I don't use it.

I only want my screen to lock when I tell it to, so I just assign slimlock to a hotkey. You can do this through GNOME/Xfce/KDE/Openbox/awesome/etc. or use something like xbindkeys.

slimlock isn't a daemon or anything, because the options mentioned above are far more versatile. And easier.

Offline

#9 2011-05-21 22:49:16

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Okidoki, I get it, thanks!


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#10 2011-05-23 16:27:36

Liquen
Member
Registered: 2009-01-04
Posts: 40

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Slimlock looks great. Kudos to Joel Burget and you!

I have two suggestions/requests:

  1. Is it possible to blank the screen after some time without keyboard/mouse activity? This time value could be specified by a command line argument (e.g., blanktime=60).

  2. It would be nice if the input locks for, say, 2 seconds, after a failed password attempt.

Thank you and Joel again for the great work.

Offline

#11 2011-05-23 17:41:08

Guff
Member
Registered: 2009-09-30
Posts: 158
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Liquen wrote:

Slimlock looks great. Kudos to Joel Burget and you!

I have two suggestions/requests:

  1. Is it possible to blank the screen after some time without keyboard/mouse activity? This time value could be specified by a command line argument (e.g., blanktime=60).

  2. It would be nice if the input locks for, say, 2 seconds, after a failed password attempt.

Thank you and Joel again for the great work.

Thanks!

  1. It likely would be possible, but I'm not sure exactly how I would go about it. And I had figured that one's DPMS settings and whatnot would be enough.  Given that, I'm not sure it's worth implementing. I'm open to the idea though.

  2. Definitely doable. In fact, I think I'll work on that now.

I've been working on getting slimlock to use Imlib2 rather than direct libpng/libjpeg, as the current image loading code is as slow as a drama starring Dennis Quaid. I've managed to rewrite all the image code, so there's been some progress. Now I just have to make it stop crashing on startup. Can't be that hard, right? ...Right?

Last edited by Guff (2011-05-23 17:44:43)

Offline

#12 2011-05-23 18:19:54

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Liquen wrote:

I have two suggestions/requests:

  1. Is it possible to blank the screen after some time without keyboard/mouse activity? This time value could be specified by a command line argument (e.g., blanktime=60).

I'd like to have that feature as well!


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#13 2011-05-23 19:18:32

Guff
Member
Registered: 2009-09-30
Posts: 158
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Turns out, the screen blanking feature was easier to implement than I thought.

slimlock-git should now have that feature. Currently, it's hard-coded in const.h as 60 seconds, but I will make it configurable eventually. FYI, it relies on putting the screen into standby via DPMS, which I think almost everything supports nowadays. Shouldn't have to do anything to get it to work. Other than wait 60 seconds, of course.

The other feature request is a little more troublesome. Keeping in mind my only experience with Xlib and whatnot comes from working on slimlock.
Just putting sleep(2) in there does make the thing pause, but doesn't block input. So once the two seconds are up, whatever was typed during that time will suddenly be in the input box. I've got to figure out how to get it to ignore keyboard events for a given amount of time.

Last edited by Guff (2011-05-23 19:19:10)

Offline

#14 2011-05-23 20:02:21

_djm_
Member
Registered: 2009-11-30
Posts: 33
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

I really like this, but I'm having a problem with it sometimes being unresponsive - typing doesn't show up in the password field. When I then kill slimlock from another terminal and come back, what I had typed was present in the 'underlying' window.

This is using the i3 window manager, invoking slimlock either manually or automatically via 'xautolock -locker slimlock -time 10', as suggested.

Offline

#15 2011-05-23 20:10:08

Guff
Member
Registered: 2009-09-30
Posts: 158
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

_djm_ wrote:

I really like this, but I'm having a problem with it sometimes being unresponsive - typing doesn't show up in the password field. When I then kill slimlock from another terminal and come back, what I had typed was present in the 'underlying' window.

This is using the i3 window manager, invoking slimlock either manually or automatically via 'xautolock -locker slimlock -time 10', as suggested.

I noticed this while using awesome the other day. Normally, though, I use a Compiz session which had that problem, but I eventually fixed it.

Does the problem still occur if you install and use slimlock instead of slimlock-git?

Offline

#16 2011-05-23 20:14:00

hauzer
Member
From: Belgrade, Serbia
Registered: 2010-11-17
Posts: 279
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

This is great!


Vanity of vanities, saith the Preacher, vanity of vanities; all is vanity.
What profit hath a man of all his labour which he taketh under the sun?
All the rivers run into the sea; yet the sea is not full; unto the place from whence the rivers come, thither they return again.
For in much wisdom is much grief: and he that increaseth knowledge increaseth sorrow.

Offline

#17 2011-05-23 20:16:15

_djm_
Member
Registered: 2009-11-30
Posts: 33
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Guff wrote:

Does the problem still occur if you install and use slimlock instead of slimlock-git?

This is with slimlock. I'll try slimlock-git and see how it goes.

Offline

#18 2011-05-23 21:17:33

Guff
Member
Registered: 2009-09-30
Posts: 158
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

_djm_ wrote:
Guff wrote:

Does the problem still occur if you install and use slimlock instead of slimlock-git?

This is with slimlock. I'll try slimlock-git and see how it goes.

Well, let me know when you get a chance.

In other news, slimlock-git now has a configuration file at /etc/slimlock.conf. Currently, the only option is dpms_timeout, which controls the screen blanky stuff mentioned above, and it defaults to 60 seconds. Syntax is the same as SLiM's slim.conf.

Last edited by Guff (2011-05-23 21:18:56)

Offline

#19 2011-05-23 23:43:54

Liquen
Member
Registered: 2009-01-04
Posts: 40

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Great work, Guff. You rock. Screen blanking works perfectly, and input block delay is almost there.

I've also been experiencing the unresponsiveness described by _djm_. I suspect that (at least in my case) this is because of two instances of slimlock running at the same time, since

$ slimlock& slimlock

causes this unwanted behavior.

Do you think multiple instances should be avoided by slimlock itself, or this should be left to the user?

Offline

#20 2011-05-23 23:51:35

_djm_
Member
Registered: 2009-11-30
Posts: 33
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Guff wrote:

Well, let me know when you get a chance.

slimlock-git seems to give the same behaviour.

Liquen wrote:

I've also been experiencing the unresponsiveness described by _djm_. I suspect that (at least in my case) this is because of two instances of slimlock running at the same time

I think this may be the culprit in my case also - me running slimlock manually and then xautolock running it automatically later.

Offline

#21 2011-05-24 00:26:54

Guff
Member
Registered: 2009-09-30
Posts: 158
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Liquen wrote:

Great work, Guff. You rock. Screen blanking works perfectly, and input block delay is almost there.

I've also been experiencing the unresponsiveness described by _djm_. I suspect that (at least in my case) this is because of two instances of slimlock running at the same time, since

$ slimlock& slimlock

causes this unwanted behavior.

Do you think multiple instances should be avoided by slimlock itself, or this should be left to the user?

Ugh, I thought that problem went away last week. I still don't know why multiple instances are being launched in the first place.

Okay, I think what I'll do is set it up to use libunique or something with a lock file or whatnot (maybe not libunique, since that requires gtk2) to avoid the multiple instances. Still, this shouldn't be happening at all, so it's not an ideal solution.

Last edited by Guff (2011-05-24 00:30:44)

Offline

#22 2011-05-24 01:19:25

Guff
Member
Registered: 2009-09-30
Posts: 158
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Alright, slimlock-git should have some lockfile stuff now. Hoping this will work. Anyone who's been having problems with multiple instances let me know if this helps.

I've got very little experience in this area. Hell, I've got very little experience in every area. So I don't have a fantastic idea of what I'm actually doing. I do, however, have a lot of free time.

Offline

#23 2011-05-24 01:31:03

Liquen
Member
Registered: 2009-01-04
Posts: 40

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Apparently the bug is now fixed. At least "slimlock& slimlock" now opens only one instance.

Thank you, sir!

Offline

#24 2011-05-24 02:33:54

Guff
Member
Registered: 2009-09-30
Posts: 158
Website

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Liquen wrote:

Apparently the bug is now fixed. At least "slimlock& slimlock" now opens only one instance.

Thank you, sir!

Oh, thank god. No problem. That bug was really getting to me. It still is, because the underlying issue is still there. At least shouldn't be bothering anyone now, though. Until the next thing... sad

Also, updated the DPMS stuff to make it a bit more robust. It should remember all relevant DPMS settings, including whether or not it was enabled to begin with. Also, a value of 0 for dpms_timeout in slimlock.conf should now disable DPMS.

Last edited by Guff (2011-05-24 02:34:56)

Offline

#25 2011-05-24 03:19:46

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Slimlock - fairly simple X screenlocker that looks like SLiM

Nice job resurrecting this little project, Guff; I installed it minutes after you first opened this thread. smile  Here's a simple question:  One can use makepkg -o through ABS to get slim.conf, and manually place it in /etc.  Ignoring the fact that this bypasses pacman's databases (a single file, so easy enough to deal with), is this enough to keep slimlock running properly?  I'm on the road right now, without a LiveCd to take care of any problems I might cause.

Offline

Board footer

Powered by FluxBB