You are not logged in.

#26 2011-03-05 12:54:24

ApotheoZ
Member
Registered: 2009-08-10
Posts: 40

Re: sflock: simple X screen locker with basic user feedback

perfect : thank you very much !

Offline

#27 2011-03-05 18:03:52

ninian
Member
From: United Kingdom
Registered: 2008-02-24
Posts: 696
Website

Re: sflock: simple X screen locker with basic user feedback

@Revelation60: Many thanks from me too!

Offline

#28 2011-03-05 19:20:38

Revelation60
Member
From: The Netherlands
Registered: 2009-03-19
Posts: 149
Website

Re: sflock: simple X screen locker with basic user feedback

You're welcome smile

I have added a toggle for the bar and the possibility to add more than one password character. So if you use sflock -c "guest123" you and people standing behind you will see "guest123" on the screen when you enter your password. You could also use it to show different hieroglyphs or something. Seemed like a fun feature (don't worry, it's a two line modification that does not bloat the code at all). smile

Offline

#29 2011-03-05 19:55:13

ApotheoZ
Member
Registered: 2009-08-10
Posts: 40

Re: sflock: simple X screen locker with basic user feedback

Your -c feature does not work : sflock -c "azerty1234" shows "aaaaaaaaa"
:<

Offline

#30 2011-03-05 19:56:57

Revelation60
Member
From: The Netherlands
Registered: 2009-03-19
Posts: 149
Website

Re: sflock: simple X screen locker with basic user feedback

Did you update to the latest version? The problem of a git package is that you can't see that there's a new version available sad

Last edited by Revelation60 (2011-03-05 20:00:47)

Offline

#31 2011-03-05 20:00:42

ApotheoZ
Member
Registered: 2009-08-10
Posts: 40

Re: sflock: simple X screen locker with basic user feedback

nop, sorry :s
Now, it work's

Offline

#32 2011-03-05 20:40:21

vanvalium
Member
From: Austria
Registered: 2010-10-09
Posts: 86

Re: sflock: simple X screen locker with basic user feedback

wonderful little tool
thanks for making it

Offline

#33 2011-03-05 22:35:38

vincekd
Member
From: USA
Registered: 2011-02-27
Posts: 15

Re: sflock: simple X screen locker with basic user feedback

The color screen and no beep sold it for me.

Thanks.

Offline

#34 2011-03-07 12:17:39

neurolysis
Member
Registered: 2011-02-23
Posts: 112
Website

Re: sflock: simple X screen locker with basic user feedback

Very nice! Will try it out over the coming weeks and try and give some feedback.

Offline

#35 2011-03-09 16:29:12

Revelation60
Member
From: The Netherlands
Registered: 2009-03-19
Posts: 149
Website

Re: sflock: simple X screen locker with basic user feedback

I have been thinking about ways to make sflock more safe. The biggest threat is the SAK key, ALT-SYSRQ-K. This key is only enabled if all the magic syskeys are activated.

I have searched for ways to shut them down from within C using a function, but I have yet to find any. What I could do is:

* save the value from /proc/sys/kernel/sysrq
* echo 0 > /proc/sys/kernel/sysrq
* do the sflock stuff
* restore the value on exit

What do you think of this?

Offline

#36 2011-03-09 18:59:32

firecat53
Member
From: Sammamish, Wa
Registered: 2007-05-14
Posts: 1,448
Website

Re: sflock: simple X screen locker with basic user feedback

Great tool! Point of information -- I have a suspend script that used to call slock & and then pm-suspend. When I substituted sflock, I got a black screen on resume and had  to force a poweroff. It works fine if I suspend first and then run sflock, although there is a brief flash of the unlocked content right b efore sflock engages.

Thanks!
Scott

Offline

#37 2011-03-10 14:38:36

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

Re: sflock: simple X screen locker with basic user feedback

Greate app

Only a request: can you put a -h or --help option, I need to see all the available options

Last edited by SuNjACk (2011-03-10 14:40:46)

Offline

#38 2011-03-10 15:37:13

cf8
Member
From: Russia
Registered: 2008-10-21
Posts: 83

Re: sflock: simple X screen locker with basic user feedback

Amazing little app! Thank you!
Btw any luck to integrate it with a pam-face-authentication?
Maybe just call:

sudo killall sflock

on some hotkey and let the system identify my face? smile

Offline

#39 2011-05-19 16:34:39

the_general
Member
Registered: 2011-03-23
Posts: 10

Re: sflock: simple X screen locker with basic user feedback

Thanks for this, btw: it's exactly what i have been searching for!

I wanted to be able to change my screen settings using xset while the screen was locked. Its easy enough to do that when launching it, but because sflock forks right away i didn't see a way to run commands after the screen unlocks.

This bit of code runs a script called ~/.sflock_done if it exists:

292d291
<     close(term);
294a294,302
>     char *home = getenv("HOME");
>     if (home != NULL) {
>         char cmd[256];
>         strncpy(cmd, home, 240);
>         strcat(cmd, "/.sflock_done");
>         system(cmd);
>     }
> 
>     close(term);

I apologize if that could be done better, or if i used diff wrong: i haven't attempted anything in C in years at this point!

Just wanted to share in case you wanted to use it.


It is pitch black. You are likely to be eaten by a grue.

Offline

#40 2011-05-20 14:28:29

the_general
Member
Registered: 2011-03-23
Posts: 10

Re: sflock: simple X screen locker with basic user feedback

I have noticed an interesting bug. If i call pm-suspend while sflock is running (in a script), not only does pm-suspend not work, but i will not ever work until i reboot. That is, pm-suspend gets completely hosed (no error messages, nothing in the logs: it simply doesn't do anything at all).

Gnome-screensaver is the same actually, in that pm-suspend wont work while its running. Pm-suspend does work with xscreensaver however.

As somebody mentioned before, a more-or-less functional work-around is to call sflock after pm-suspend in a script. It would be better though if the screen was locked first... and i'm assuming that the reason sflock forks is to enable that sort of thing.

I might try looking into this, but as i've mentioned C isn't my strong point. I'm pretty curious about this now, though.


It is pitch black. You are likely to be eaten by a grue.

Offline

#41 2012-12-16 22:46:45

firecat53
Member
From: Sammamish, Wa
Registered: 2007-05-14
Posts: 1,448
Website

Re: sflock: simple X screen locker with basic user feedback

<resurrects old thread because it's relevant>
FYI, to those of you who still use sflock, it does work now to lock your screen _prior_ to suspending (to avoid the brief flash of unlocked content on resume) if you use systemd's suspend function. I use a service file like this and it works great:

[Unit]
Description=User suspend actions
Before=sleep.target

[Service]
User=firecat53
Type=forking
Environment=DISPLAY=:0
ExecStartPre= -/usr/bin/pkill -u %u unison ; %h/.local/bin/music.sh stop ; /usr/bin/mysql -e 'slave stop'
ExecStart=/usr/bin/sflock

[Install]
WantedBy=sleep.target

Scott

Offline

Board footer

Powered by FluxBB