You are not logged in.

#26 2011-07-21 20:38:31

avx
Member
Registered: 2011-07-05
Posts: 71

Re: lualock: a silly screenlocker that's highly configurable in lua

So, an attacker (or a bored teenager) could just hold down the enter key for a short while and lock legitimate users out of the computer for hours, because lualock would be stuck repeatedly trying to authenticate a blank password, sleeping, then repeating.

True, but at least root could still login via VT and kill the process.

Alternatively, one could dismiss the stacking after X tries. Ie, if you'd use my formula, after 10 attempts the time is already quite high, so if you've just been on the toilet, it should be ok. Or, use the formula provided, but reset the counter every X modulo Y = Z tries.

b) I'd like that, some wiki or something with "ready to paste" snippets.

c) I was thinking about the webcam built into my notebook, which I can easily dump a stream of with mplayer.

Unrelated, might be an idea to talk to some awesome devs, if it could be included upstream and extended by some DM-stuff, it'll be a nice and configurable DE - of course, it should still be able to run on other scenarios.

Offline

#27 2011-07-21 23:25:31

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

Re: lualock: a silly screenlocker that's highly configurable in lua

Well, as I said, I just need to find a better way to make lualock block input, and then the attacker scenario wouldn't be an issue. Unless, of course, they stayed at the user's computer for a couple hours. In which case we could just have the timeout max out at 30 or 60 seconds or something like that.

I created a page on the github wiki for examples here. Nothing there yet, but as I get a chance I'll add to it.

For c) what command would you use? I'm not familiar with that sort of thing. I did add a "key-press" hook, so what you want could be implemented now. You'd just need something like:

local first_key_press = true
hook.connect("key-press", function ()
    if first_key_press then utils.spawn(cmd) end
    first_key_press = false
end)

where cmd is the command you'd use to record.

As for talking to the awesome devs, maybe. I don't think they'd be okay with the gtk dependency, though, so I'd have to rewrite it to use xcb and libev. Which I could maybe do, but it would be non-trivial for me. After all, I really like glib; it's awfully nifty.

Anyways, I got it back to using just cairo and gdk. No more clutter. You might want to update your gentoo thingy.
There's still a few memory leaks I need to deal with, especially with the image code. But it should be easier to debug now. I also intend to tackle the performance issue. Though for the sample config, performance shouldn't be an issue.

Last edited by Guff (2011-07-22 13:54:20)

Offline

#28 2011-07-23 14:41:22

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

Re: lualock: a silly screenlocker that's highly configurable in lua

A few things. One, I'm fairly confident I've dealt with the most serious memory leaks. I diligently tested lualock for over 9 hours (meaning: I accidentally fell asleep in my chair after I decided to test it) and the memory usage was the same (to within a kilobyte, as that's the precision of the thing I was using to monitor it) as when it first started. So, that's a plus.

I've added a few examples to the wiki and will soon be adding more.

Most importantly, I finally tackled the sleep issue. The utils.sleep() function now works as I wanted it to: the timers and whatnot are unaffected, so any animations or whatnot you have will continue, and input is properly blocked, so the "attacker holding down enter" issue is no more.

Also, I've made the drawing routine substantially smarter and it should be substantially more efficient for most configs. So long as you don't set up your config to change the background 20 times a second or something like that. Now, rather than redrawing the whole screen whenever updates are needed, it keeps track of the bounding box of the regions that actually need updates and only draws in that area. It can be made even more efficient, but it's not straightforward to do from within cairo itself, so I've got to look into it.
One limitation is that rotating an image is currently broken. Working on it.

Last edited by Guff (2011-07-23 15:59:58)

Offline

#29 2011-07-28 23:35:15

SuNjACk
Member
Registered: 2011-02-27
Posts: 102

Re: lualock: a silly screenlocker that's highly configurable in lua

I think you have to add 'lua-oocairo-git' as dependency otherwise it doesn't compile. This is what happen to me

Offline

#30 2011-07-29 20:11:37

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

Re: lualock: a silly screenlocker that's highly configurable in lua

SuNjACk wrote:

I think you have to add 'lua-oocairo-git' as dependency otherwise it doesn't compile. This is what happen to me

Yeah, I've changed a few things. It now requires lua-oocairo-git and lua-oopango-git. The PKGBUILD has been updated to reflect that.

I didn't rush to update it earlier because I didn't think anyone was going to use it. tongue

Have any other comments, suggestions, etc?

Last edited by Guff (2011-07-29 20:13:02)

Offline

#31 2011-07-29 20:40:22

SuNjACk
Member
Registered: 2011-02-27
Posts: 102

Re: lualock: a silly screenlocker that's highly configurable in lua

How the daemon work?

After I run lualock how can I block the screen?

Offline

#32 2011-07-29 21:07:02

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

Re: lualock: a silly screenlocker that's highly configurable in lua

SuNjACk wrote:

How the daemon work?

After I run lualock how can I block the screen?

Nothing complicated. In your rc.lua, use

prefs { timeout = foo }

After starting it will lock after foo seconds. If you want finer control, I would suggest using xautolock and "lualock -n" instead. I was at one point going to add dbus support so that the user could lock an already running instance of lualock and whatnot, but I didn't really have any users so I lost interest.

Offline

#33 2011-08-09 10:08:13

SuNjACk
Member
Registered: 2011-02-27
Posts: 102

Re: lualock: a silly screenlocker that's highly configurable in lua

Thanks Guff

Now I have a problem with lualock

If I start it from a keybind (in awesomeWM and I use "lualock -n") it doesn't work

I can't type into the form because the focus still on the last window I used

Example: If I spawn a terminal then I start lualock and if press any character I found them on the terminal window

P.S: sorry for my english

Offline

#34 2011-08-09 14:10:12

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

Re: lualock: a silly screenlocker that's highly configurable in lua

SuNjACk wrote:

Thanks Guff

Now I have a problem with lualock

If I start it from a keybind (in awesomeWM and I use "lualock -n") it doesn't work

I can't type into the form because the focus still on the last window I used

Example: If I spawn a terminal then I start lualock and if press any character I found them on the terminal window

P.S: sorry for my english

Hmm. Well, I made a small change that might help with that, but no guarantees. Can you update and try again?

If this doesn't work, I'm not sure what will.

Offline

#35 2011-08-09 14:37:12

SuNjACk
Member
Registered: 2011-02-27
Posts: 102

Re: lualock: a silly screenlocker that's highly configurable in lua

Ok, now it's work. Thank you very much smile

Offline

#36 2011-08-09 15:02:10

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

Re: lualock: a silly screenlocker that's highly configurable in lua

SuNjACk wrote:

Ok, now it's work. Thank you very much smile

Oh, huh, I wasn't expecting that! tongue

I'd encountered this issue with slimlock, too. It's quite frustrating.

So, have you done anything fancy with lualock, or just left it as-is?

Offline

#37 2011-08-09 17:40:36

SuNjACk
Member
Registered: 2011-02-27
Posts: 102

Re: lualock: a silly screenlocker that's highly configurable in lua

Guff wrote:
SuNjACk wrote:

Ok, now it's work. Thank you very much smile

Oh, huh, I wasn't expecting that! tongue

I'd encountered this issue with slimlock, too. It's quite frustrating.

So, have you done anything fancy with lualock, or just left it as-is?

With this fix, I don't know why but I have to redo everything. When I finish I'll post everything wink

Last edited by SuNjACk (2011-08-09 18:49:00)

Offline

#38 2011-08-09 18:58:36

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

Re: lualock: a silly screenlocker that's highly configurable in lua

SuNjACk wrote:

You this fix, I don't know whhy but I have to redo everything. When I finish I'll post everything wink

I'm not sure what you mean. Do you mean your rc.lua stopped working?

Could be because of some API changes I've made. Sorry about that. I still need to get the documentation up to date.

Offline

#39 2012-01-09 02:59:23

3demax
Member
Registered: 2011-12-02
Posts: 5

Re: lualock: a silly screenlocker that's highly configurable in lua

Wow, quite nice locker. Is there any way to change input field to display only astericses without background?
Also, I found a bug: fontsize for password field is sometimes ocassionally resetting. How can I debug that?

I'm using the following snippet:

style{ color = "black", font = "Sans 26",
        x = sxcenter - 150/2 - 24,
        y = input_top + 50,
        off_x = 10,
        off_y = 10,
        width = 199,
        height = 50
     }

Offline

#40 2012-01-11 13:47:35

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

Re: lualock: a silly screenlocker that's highly configurable in lua

3demax wrote:

Wow, quite nice locker. Is there any way to change input field to display only astericses without background?
Also, I found a bug: fontsize for password field is sometimes ocassionally resetting. How can I debug that?

I'm using the following snippet:

style{ color = "black", font = "Sans 26",
        x = sxcenter - 150/2 - 24,
        y = input_top + 50,
        off_x = 10,
        off_y = 10,
        width = 199,
        height = 50
     }

Oh boy, I haven't used or worked on this for months. I just wanted to let you know I saw your bug reports. While I'm fairly certain the issue you noted on github of windows popping up over the locker is unavoidable (or, solving it requires dark magicks of great power, which are likely beyond my grasp), this font size thing is definitely fixable, and I'll delve back into the code and see if I can fix it.

As for the input field, from looking at the code there does not seem to be a way to do what you're asking. I'll fix that, though.

This was written close to when I first got into programming seriously, and so a lot of the code blows and should likely be rewritten. Which I intend to do, and I'll let you know when I get some stuff done.

Offline

#41 2012-01-14 09:32:03

3demax
Member
Registered: 2011-12-02
Posts: 5

Re: lualock: a silly screenlocker that's highly configurable in lua

Thanks for reply! This app is certainly a nice locker. Other lockers behavior is a bit frustrating: why do user have to unlock the desktop to see some basic information, like time, battery or any other insensitive stuff, while it can be shown among with password prompt? So that would be great if you continue this project.
If you do care about popularity, I think it is only the matter of themes/configs and ease of it's creation (and lua is already awesome choise, IMHO).

Offline

#42 2012-01-16 03:19:36

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

Re: lualock: a silly screenlocker that's highly configurable in lua

@3demax
Alright, I think I fixed the font size issue. I was able to reproduce the bug, and it seems to have been fixed for me. Just a silly garbage collection issue I should have caught.
Can you confirm that it's fixed for you?

Looking at this code again after half a year or so, I've come to realize something: it's godawful. The API is also in a fairly sorry state.
I'm not entirely sure how to make it not suck, however. I was thinking maybe allowing the user to use GTK widgets (via lgob), which of course would be very themeable. GTK already is a dependency, but it's a bit more complicated for the users, and most of it would not be of much use for a screenlocker. I could create my own widget system, but that would be a bit more work, and might not be as versatile. I dunno.

I also added options to set the background color and border color of the password field, as well as the border width, and the default config file now includes those options. So if you want the field to be transparent, setting both to something like 'rgba(0, 0, 0, 0)' should work.

Let me know if I broke something else, or if you've got any suggestions.

Offline

#43 2012-01-16 04:21:07

avx
Member
Registered: 2011-07-05
Posts: 71

Re: lualock: a silly screenlocker that's highly configurable in lua

I could create my own widget system, but that would be a bit more work, and might not be as versatile. I dunno

Didn't have a too deep look into the code, but maybe oocairo+blingbling (link) would be a way to go?

Offline

#44 2012-01-16 16:48:40

3demax
Member
Registered: 2011-12-02
Posts: 5

Re: lualock: a silly screenlocker that's highly configurable in lua

Guff wrote:

@3demax
Alright, I think I fixed the font size issue. I was able to reproduce the bug, and it seems to have been fixed for me. Just a silly garbage collection issue I should have caught.
Can you confirm that it's fixed for you?

I also added options to set the background color and border color of the password field, as well as the border width, and the default config file now includes those options. So if you want the field to be transparent, setting both to something like 'rgba(0, 0, 0, 0)' should work.

Yeah,  it finally works, thanks! smile
So I post my stuff at https://gist.github.com/1621595. I've finally found it visually satisfying. But the code is really-really scary, be warned %)

Guff wrote:

@3demax
I could create my own widget system, but that would be a bit more work, and might not be as versatile.

IMHO, gtk is way too bloated for that purpose.

And

avx wrote:

oocairo+blingbling

looks like to fit simple locker widget needs much better. Actually, they are the exact types of widgets I was thinking of.
Hope would be enough to make sleep button, calendar and icons with unread messages and mails counts.
Maybe also music player widget with play/pause button, and it will be my favorite screenlocker for a long time.

Offline

#45 2012-01-16 20:45:25

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

Re: lualock: a silly screenlocker that's highly configurable in lua

Alright, well I think I'll try and adapt blingbling as much as I can.

lualock's current widget system is horrible, however. The implementation is very inefficient and half-broken, and the API is primitive and very limited. Right now, I'm still trying to flesh out an idea of how it should be.

In the meantime, I believe I've fixed the issue you were having with small/nonexistent borders. Any lingering issues?

Offline

#46 2012-01-23 00:37:11

sanja-no1
Member
From: Germany
Registered: 2010-11-23
Posts: 2

Re: lualock: a silly screenlocker that's highly configurable in lua

Hi...

today i've created this simple lualock-theme.
it's elegant-brit style - try it! :-)

Last edited by sanja-no1 (2012-01-23 00:39:42)

Offline

#47 2012-01-23 01:47:36

3demax
Member
Registered: 2011-12-02
Posts: 5

Re: lualock: a silly screenlocker that's highly configurable in lua

sanja-no1 wrote:

Hi...

today i've created this simple lualock-theme.
it's elegant-brit style - try it! :-)

http://i.imgur.com/bLAMJ.png
Hehe... Nice! smile
BTW, the second one!

@Guff
Would you mind adding support for themes?
I could suggest following directory structure:

/usr/share/
simpleblack/ #theme name

  • main.lua

  • panel.png


elegant-brit/ #theme name

  • main.lua

  • dot.png


/etc/

  • lualock    #default simple config. Overrided by config in $USER directory.


~/

  • lualock.rc # or something like that. stores name of current theme. maybe show/hide mouse pointer options.


Hope that will make things look much more familiar and *nix-way

Last edited by 3demax (2012-01-23 01:49:54)

Offline

#48 2012-01-26 23:25:46

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

Re: lualock: a silly screenlocker that's highly configurable in lua

@3demax

Sorry, I've been somewhat busy with several other things recently.

I think I'll get a chance to work on your theming idea this weekend, though, so I'll let you know once I get something ready. Just wanted to make sure you didn't think I'd forgotten or ignored your request.

Offline

#49 2012-01-28 12:34:33

kittykatt
Member
From: Missouri, USA
Registered: 2009-11-04
Posts: 260
Website

Re: lualock: a silly screenlocker that's highly configurable in lua

Works great. Gonna see if I can come up with a couple of themes for it. big_smile


- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -

Offline

#50 2012-02-11 01:39:45

voxxik
Member
Registered: 2012-02-11
Posts: 1

Re: lualock: a silly screenlocker that's highly configurable in lua

I've been using this for a little while and absolutely love it. It's perfect with Awesome.

Offline

Board footer

Powered by FluxBB