You are not logged in.

#76 2011-06-09 14:18:10

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

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

Liquen wrote:

There you are: http://pastebin.com/jck641C8

As I told you, it's ugly code (duplicated lines, global variables). But I'm sure it can be enhanced.

And, of course, this just works with SIGTERM (killall slimlock), since SIGKILL (killall -9 slimlock) can not be caught.

Hmm. Works for me. Still no idea why my version didn't.

Made a few small changes, but your code was fine. Unfortunately, globals are the only sane way to go about this, I think.
Anyways, I've pushed it out so slimlock-git should now have this.

Offline

#77 2011-06-09 16:10:38

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

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

Nice. :)

Just a minor correction (my bad): cfg_dpms_standby and cfg_dpms_off do not need to be global, right?

Offline

#78 2011-06-09 16:52:44

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

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

I hate the new "Welcome to ${HOST}" message... I've reverted to slimlock (mind the missing -git).


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

#79 2011-06-09 18:10:29

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

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

hauzer wrote:

I hate the new "Welcome to ${HOST}" message... I've reverted to slimlock (mind the missing -git).

As I've mentioned, it's not new. It was always there. But, some themes (likely most) on smaller screens would place that message under the panel image, so it would effectively be hidden.

As I've also mentioned, you can simply edit /etc/slim.conf.
Change:

welcome_msg Welcome to %host

to:

welcome_msg

Realize this issue is with SLiM, not slimlock. The same reason you didn't see it before is also why you don't see it with SLiM itself: it's there, just under the panel.

Thank you for your feedback.

Liquen wrote:

Nice. smile

Just a minor correction (my bad): cfg_dpms_standby and cfg_dpms_off do not need to be global, right?

Right. Fixed.

Last edited by Guff (2011-06-09 18:11:16)

Offline

#80 2011-06-09 18:24:07

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

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

Ah.. Why do I always miss the important parts of the configuration files.. ? Bah, always hasty and impatient. Oh well, thanks for the input and sorry for my misfit pouring of hatred and discontent.

Last edited by hauzer (2011-06-09 18:39:10)


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

#81 2011-06-09 18:36:39

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

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

hauzer wrote:

Ah.. Why do I always miss the important parts of the configuration files.. ? Bah, always hasty and impatient. Oh well, thanks for the input and sorry for my missfit pouring of hatred and discontent.

No problem.

Also, I've added an option to slimlock.conf to disable the welcome message, so you don't even have to touch slim.conf. Not a big deal, but it does disable it by default, as I imagine most people don't care for the welcome, and many more likely didn't even know it was there until a recent upgrade.

Offline

#82 2011-06-16 12:24:59

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 142
Website

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

Do you know what I could do to makes things look better on a dual screen ? What I mean is as my screen resolution is covering my two monitors, the password field and the background is split between the two screens (with archlinux-darch theme or similar).
I should probably tweak the theme but I have no idea how to proceed.


Cedric Girard

Offline

#83 2011-06-16 14:47:07

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

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

X-dark wrote:

Do you know what I could do to makes things look better on a dual screen ? What I mean is as my screen resolution is covering my two monitors, the password field and the background is split between the two screens (with archlinux-darch theme or similar).
I should probably tweak the theme but I have no idea how to proceed.

I would try changing input_panel_x from 50% to 25%. Assuming your screens are of equal resolution, that should put the panel in the center of your first screen.
You might also want to change message_x in the same way, as well.

Let me know how that works for you.

Offline

#84 2011-06-16 14:57:22

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 142
Website

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

Yes it works. But the thing is my login screen will now look strange as dual screen is not yet activated at this time.


Cedric Girard

Offline

#85 2011-06-16 15:08:50

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

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

X-dark wrote:

Yes it works. But the thing is my login screen will now look strange as dual screen is not yet activated at this time.

Hmm.

I would try and make it so that it only tries to draw the panel on the first screen, but I'm not sure that's possible. Your multi-monitor setup seems like it's transparent to applications.

If you've got any ideas, let me know. In the meantime, I think I'll try testing a thing or two, as it turns out I can hook my netbook up to my old desktop's LCD.

Edit: just tried it out, and yep, same problem.

Edit 2: does xscreensaver et al. have the same issue?

Last edited by Guff (2011-06-16 15:26:46)

Offline

#86 2011-06-16 15:40:24

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 142
Website

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

No xscreensaver seems to clone the content on each monitor.

My setup is transparent to applications in the way there is only one screen with a big resolution, but applications like Xmonad are clearly aware of the dual monitor setup.

FYI, I use this to switch to dual screen:

xrandr --auto --output LVDS1 --primary --mode 1366x768 --left-of VGA1 --output VGA1 --mode 1280x1024

Cedric Girard

Offline

#87 2011-06-16 15:52:53

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

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

X-dark wrote:

No xscreensaver seems to clone the content on each monitor.

My setup is transparent to applications in the way there is only one screen with a big resolution, but applications like Xmonad are clearly aware of the dual monitor setup.

FYI, I use this to switch to dual screen:

xrandr --auto --output LVDS1 --primary --mode 1366x768 --left-of VGA1 --output VGA1 --mode 1280x1024

Alright, I assumed you were using xrandr. That's what I was using as well.

So, I've got to figure out how to examine the individual screens. Obviously, window managers can do it. And xscreensaver seems to be aware. So that gives me a starting point. I'm hoping the xrandr extension has the functions I need.

Offline

#88 2011-06-16 15:58:14

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 142
Website

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

Great.
Don't waste too much time on this though. It would be great but I guess I can live without it. wink


Cedric Girard

Offline

#89 2011-06-16 17:21:58

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

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

X-dark wrote:

Great.
Don't waste too much time on this though. It would be great but I guess I can live without it. wink

Bah, getting this to work like it should isn't wasting time.

After looking into it, though, it certainly isn't all that simple. I think I can do it, though.

But I'm not sure what the behavior should be. Should it clone the output to each screen? Draw to the first screen, and draw black or blank the others? Draw the background on each screen, but the panel only on the first?
What do you think?

Offline

#90 2011-06-16 17:37:08

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 142
Website

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

I'm not sure.
Drawing everything on both screens will be disturbing.
What I was thinking first was drawing to the first screen and keeping black the second. But maybe for some theme it will be prettier if you draw the background on the second screen as well.


Cedric Girard

Offline

#91 2011-06-16 18:42:44

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

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

Hi again.

Regarding the "WrongPassword" thing: I believe it is more natural to first sleep, and only after that, to clear the input.

This is just my personal opinion, though. What do you think?

Offline

#92 2011-06-16 19:30:51

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

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

Liquen wrote:

Hi again.

Regarding the "WrongPassword" thing: I believe it is more natural to first sleep, and only after that, to clear the input.

This is just my personal opinion, though. What do you think?

I wasn't really sure, myself.  I think I went with how it is now because it's a bit simpler. Don't have to redraw passwd_feedback_msg this way (as I think it makes sense to leave the message up even after the panel gets cleared).

It's a fairly small change, though, and I've got it working the way you'd like. Problem is this introduces a little more flickering (as the window must be cleared, then the "Authentication failed" text redrawn), which is somewhat difficult to get around. Thoughts?

Offline

#93 2011-06-16 20:04:22

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

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

Guff wrote:

Problem is this introduces a little more flickering (as the window must be cleared, then the "Authentication failed" text redrawn), which is somewhat difficult to get around. Thoughts?

Well, then I would just leave as it is. It was just a minor and unimportant suggestion. Thanks!

Offline

#94 2011-06-17 17:02:31

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

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

Liquen wrote:

Well, then I would just leave as it is. It was just a minor and unimportant suggestion. Thanks!

I decided to do it. The flickering is there, but not a huge deal. And slimlock already had some flickering. I'm looking into eliminating it, though.

And X-dark, still looking into fixing your issue. I haven't forgotten.

Offline

#95 2011-06-27 12:06:55

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 142
Website

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

Got a strange bug today.
I'm using Thunderbird with Lightning for calendar. I had an appointment with a reminder set as my screen was locked. When I got back to my computer, Thunderbird was usable, on top of slimlock.


Cedric Girard

Offline

#96 2011-06-27 15:16:11

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

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

X-dark wrote:

Got a strange bug today.
I'm using Thunderbird with Lightning for calendar. I had an appointment with a reminder set as my screen was locked. When I got back to my computer, Thunderbird was usable, on top of slimlock.

Hmm. Did Thunderbird only respond to mouse interaction, or keyboard stuff too?

And you mean the whole Thunderbird window was on top of slimlock?

Offline

#97 2011-06-27 15:28:12

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 142
Website

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

Yep the appointment notification and the main window.
I started reading my mail without noticing anything unusual (except the fact it seemed I had forgotten to lock my session). But then I noticed I was unable to switch to another desktop, that I had no xmobar. Moving the Thunderbird window made me see the slimlock interface.


Cedric Girard

Offline

#98 2011-06-27 15:39:02

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

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

X-dark wrote:

Yep the appointment notification and the main window.
I started reading my mail without noticing anything unusual (except the fact it seemed I had forgotten to lock my session). But then I noticed I was unable to switch to another desktop, that I had no xmobar. Moving the Thunderbird window made me see the slimlock interface.

Hoo boy, sorry about that. That's a pretty serious security issue.

I'll do some testing and see if I can replicate this. My only guess is that maybe grabbing the pointer as well as the keyboard might prevent Thunderbird from taking user input, but I wouldn't think that it would prevent it from being raised over slimlock.

Also sorry, I still haven't merged the fix for your multi-monitor issue yet. I've been working on a new project and haven't gotten to it. I'll try to include that in any changes I make trying to fix this issue, though.

Offline

#99 2011-06-27 15:45:21

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 142
Website

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

Guff wrote:
X-dark wrote:

Yep the appointment notification and the main window.
I started reading my mail without noticing anything unusual (except the fact it seemed I had forgotten to lock my session). But then I noticed I was unable to switch to another desktop, that I had no xmobar. Moving the Thunderbird window made me see the slimlock interface.

Hoo boy, sorry about that. That's a pretty serious security issue.

Yes it could be. Not that sensitive in my work environment.

Guff wrote:

Also sorry, I still haven't merged the fix for your multi-monitor issue yet. I've been working on a new project and haven't gotten to it. I'll try to include that in any changes I make trying to fix this issue, though.

That's OK. I'm staying on the xrandr branch until the merge.


Cedric Girard

Offline

#100 2011-06-27 19:06:06

nixfag
Member
From: Romania
Registered: 2011-03-03
Posts: 73

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

X-dark wrote:

Got a strange bug today.
I'm using Thunderbird with Lightning for calendar. I had an appointment with a reminder set as my screen was locked. When I got back to my computer, Thunderbird was usable, on top of slimlock.

I got that also too,today.I've let my computer with my weechat window open and then locked with slimlock and when I came back I could see the weechat window but I couldn't see dwm's statusbar nor the dzen bar and I've quickly typed my password and it worked back.

Offline

Board footer

Powered by FluxBB