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

Well, I start to think that if nobody else is able to reproduce the behavior I get, maybe there is a problem somewhere else on my side.

Well, if I were to include an option in slimlock to set the power off timeout, I think it would work for you. It seems to be your second screen doesn't like any other power states.Would you want me to give that a shot? I'm about to go now, but when I get a chance it would only take a minute or two to implement.

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

Alright, slimlock-git now has support for turning the monitor off. I figured a reasonable default is ten minutes.X-dark, obviously, since that's the only thing that works for you, you'll want a much smaller value. But I figure since suspend works for most everyone else, no need to power down the monitor that soon.

Also, the README.md has been updated with information about the configuration settings. Nothing I haven't covered in this thread, though.

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

After some tinkering, slimlock now uses PAM for authentication. This shouldn't matter for most users, but it should mean that slimlock is now portable to the BSDs without any hassle.

Also, there's new configuration options for feedback on entering an incorrect password: passwd_feedback_x and passwd_feedback_y control the relative positioning of the message, and passwd_feedback_msg is the message displayed.One known bug is that the message is redrawn on top of itself on each failed attempt, introducing visual artifacts. Should be fixed soon.

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

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

Would it be possible to also parse the halt/reboot/suspend options from slim.conf so that it can function as a session manager? I understand that this would pose a problem since slimlock only has a password field now, but maybe there is something simple and smart to do in this regard?

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

litemotiv wrote:

Would it be possible to also parse the halt/reboot/suspend options from slim.conf so that it can function as a session manager? I understand that this would pose a problem since slimlock only has a password field now, but maybe there is something simple and smart to do in this regard?

Hmm. That might maybe be outside the scope of slimlock, but it's somewhat intriguing.

Shutdown/reboot would be harder to do now I think, as slimlock is no longer setuid root. Could maybe use something like consolekit, but that would pull in another dependency. I dunno if there's a better way to shutdown without root privileges (and without having the user modify sudoers).

As for the lack of the user field, I figure it could make use of function keys to select what you want to do. Like, F1 would cycle forward through unlock/halt/reboot/suspend, F2 would cycle backwards.

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

Guff wrote:

Hmm. That might maybe be outside the scope of slimlock, but it's somewhat intriguing.

Shutdown/reboot would be harder to do now I think, as slimlock is no longer setuid root. Could maybe use something like consolekit, but that would pull in another dependency. I dunno if there's a better way to shutdown without root privileges (and without having the user modify sudoers).

As for the lack of the user field, I figure it could make use of function keys to select what you want to do. Like, F1 would cycle forward through unlock/halt/reboot/suspend, F2 would cycle backwards.

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

Hmm, thinking about this, it might actually be more sensible to fork Slim and extend it with a screenlock function instead?

Maybe. In fact, SLiM has a preview function built in for displaying themes. Modifying that would likely be the easiest route, as it already handles authentication.

I don't see myself doing this, however, as I'm quite satisfied with slimlock. Plus, slimlock is quite a bit simpler than Slim. I'm not sure I would have an adequate understanding of Slim as a whole.

Also, Liquen:I spent quite a while trying to fix that problem, but for some reason the DPMS functions just aren't working from the signal handler function. For the life of me, I can't figure out why. Unfortunately, I don't expect a fix anytime soon. I just can't figure it out; what it's doing should work.

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

Okay, well, I've consolidated the two windows into one. This was done in the hope of eliminating any remaining focus issues, which, according to Joel, it seems to have done.

Previously, it had been using separate windows for the panel and background. This was slightly silly as that meant it had to render the background, then get the background image again, get the panel image, merge the panel image onto the background image, then position the result over the background window. And now, there's only one window competing for the keyboard, so hopefully that will help. I'll leave the lock file code in there as a precaution, though.

If anyone has any problems, let me know. And, let me apologize for the plethora of problems thus far.

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

Input locking is working great! It would be nice if this feature was merged into SLiM as well...

Also, is there a way to omit the "Welcome to <hostname>" and "User: <username>" messages?

Thanks.

In slim.conf, find the line with welcome_msg and just delete everything after that part of the line. Don't delete the whole line, because then it will just default to the same thing.

As for the username bit, I just (several minutes ago) made it so that only shows on themes with a single input box. And since you asked, I just added an option to hide the username message. Just set show_username to 0 in slimlock.conf.

Interestingly, until I merged the two windows, the welcome message and username message were both hidden from me. As I use a netbook, my screen is tiny, so the messages were covered by the panel. This change means the text is now on top, so it suddenly became visible for me. And presumably, anyone else with a smallish screen.

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

Thank you for the instructions on slim.conf and for implementing the new option on slimlock.conf. Everything perfectly fits my needs now.

Guff wrote:

Interestingly, until I merged the two windows, the welcome message and username message were both hidden from me. As I use a netbook, my screen is tiny, so the messages were covered by the panel. This change means the text is now on top, so it suddenly became visible for me. And presumably, anyone else with a smallish screen.

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

Guff wrote:

I spent quite a while trying to fix that problem, but for some reason the DPMS functions just aren't working from the signal handler function. For the life of me, I can't figure out why. Unfortunately, I don't expect a fix anytime soon. I just can't figure it out; what it's doing should work.

I apparently was able to solve this issue using something based on this code: Slimlock could catch SIGTERM and terminate in a clean fashion. I would send you some patch, but my code is a mess (I just duplicated the "//Get DPMS stuff back to normal" lines and set some variables to global---argh). Anyway, let me know if you are interested.

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

Liquen wrote:

I apparently was able to solve this issue using something based on this code: Slimlock could catch SIGTERM and terminate in a clean fashion. I would send you some patch, but my code is a mess (I just duplicated the "//Get DPMS stuff back to normal" lines and set some variables to global---argh). Anyway, let me know if you are interested.

That sounds like what I tried, but yeah, didn't work.

Actually, I would like to see your code, I guess. I may have missed something.