
Hi, all. I have strange issue with slock [0]. Here is how it's bound in my Config.hs: ((modMask, xK_F12 ), spawn "slock") -- @@ Lock screen Dead simple. But it doesn't work. When i launch slock from urxvt or dmenu everything works. When i launch it using modMask + xK_F12 screen goes black and then after few seconds everything comes back and no locking occurs. I noticed that if for ex. before launching slock my urxvt is in focus and i type something when screen is black, urxvt catches my input. Seems like slock fails to lock screen and catch all input events. But this happens only when i launch slock with a keybinding. Can someone help? [0] http://www.suckless.org/wiki/tools/xlib -- Alexander Tsamutali

I also noticed that slock launched with keybinding doesn't fail *only* if firefox is focused. If any other application is in focus, it fails as i described earlier. -- Alexander Tsamutali

So no one can help me? Should I open a bug? -- Alexander Tsamutali

On Tue, Aug 21, 2007 at 12:51:22AM +0500, Alexander Tsamutali wrote:
So no one can help me? Should I open a bug?
Hi Alexander, this is a problem that is not related to xmonad, but it is an issue with slock itself. Have a look here: http://www.suckless.org/pipermail/dwm/2007-June/002876.html As you see it is suggested to use some other alternatives till slock will get fixed.[1] Hope this helps. Andrea [1] http://www.suckless.org/pipermail/dwm/2007-June/002888.html

On Tue, Aug 21, 2007 at 10:26:25AM +0200, Andrea Rossato wrote:
As you see it is suggested to use some other alternatives till slock will get fixed.[1]
I wrote an alternative myself, in Haskell. Actually because I wanted to familiarize with the FFI infrastructure (it took me far more to understand how to pass an option to the linker then importing the C function...;-_). It is not slock, thought: since I didn't find a way to hide the pointer I found a nice font for it. To run must be set suid root (as slock). In the headers instruction on how to build. Works only with shadow passwords. Well, guess what? It has the same slock problem. The very same issue. Interesting I would say! At least now I have some code that I can understand and may be I can even find where the problem is. I doubt though. Andrea PS: Dons, I know you won't like the code. But I'm sure that someone wrote that Haskell is the best imperative language ever. And I'm trying to provide scientific evidence of that!

On Wed, Aug 22, 2007 at 01:00:55AM +0200, Andrea Rossato wrote:
I wrote an alternative myself, in Haskell. Actually because I wanted to familiarize with the FFI infrastructure (it took me far more to
opps, I sent the wrong file... here's the right one. andrea

On Wed, Aug 22, 2007 at 01:00:55AM +0200, Andrea Rossato wrote:
Well, guess what? It has the same slock problem. The very same issue. Interesting I would say!
Now at least I know why hslock fails: here it fails because grabbing the keyboard returns alreadyGrabbed. I'll investigate tomorrow if I'll find some time. I'll have to get ready for a few days trip during which I'll be offline (till the end of the week I think). Andrea

Thanks a lot for your answer and for work on hslock! Hope you can fix it. -- Alexander Tsamutali

On Wed, Aug 22, 2007 at 09:55:18AM +0500, Alexander Tsamutali wrote:
Thanks a lot for your answer and for work on hslock! Hope you can fix it.
fixed, sort of: I adopted the same approach of alock: I grab the keyboard. If I don't get a success back I wait for 1 second and then retry. The second time never fails, here... Slock instead tries many time within very small amount of time: probably this is the reason it fails. Andrea ps: attached there's the fixed hslock...;-)
participants (2)
-
Alexander Tsamutali
-
Andrea Rossato