Author |
Message |
aragon
Joined: 15 Oct 2007 Posts: 1698 Location: Germany
|
Posted: Tue 13 Jan 2009, 12:48 Post subject:
slock - X display locker |
|
Home: http://www.suckless.org/programs/slock.html
Version: 0.9
Quote: | Simple X display locker. Really this is the simplest X screen locker we are aware of. It is stable and quite a lot people in this community are using it every day when they are out with friends or fetching some food from the local pub. |
Usage is simple, open a console and type 'slock'. To get back, type your pw (only type and return, no inputbox).
NOTE: This uses the user-pw, in puppy-case the pw for root. In 4.00 default-pw is 'woofwoof'. If you're wrong retry or reboot.
USE AT YOUR OWN RISK.
If you want an advanced version, try pupslock by goingnuts: http://www.murga-linux.com/puppy/viewtopic.php?t=70827
Cheers
aragon
Description |
|

Download |
Filename |
slock-0.9.pet |
Filesize |
3.65 KB |
Downloaded |
1414 Time(s) |
_________________ PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Last edited by aragon on Wed 17 Aug 2011, 03:42; edited 1 time in total
|
Back to top
|
|
 |
106498
Joined: 18 Nov 2007 Posts: 250 Location: NZ
|
Posted: Mon 22 Feb 2010, 00:02 Post subject:
|
|
Thank you kind sir, I was looking for this!
_________________ An expert is just a beginner with experience.
Shamelessly representing TdeM!
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 927
|
Posted: Tue 09 Aug 2011, 14:39 Post subject:
slock - with image |
|
slock is really a nice and tiny app.! I have been using it for a while but was missing some indication of it running...
So I modified the source to show an image - view below. The binary is in the attached tar.gz-file + a source-code-patch-file.
Description |
|
Filesize |
5.46 KB |
Viewed |
6791 Time(s) |

|
Description |
modified slock incl. patch.
|

Download |
Filename |
slock-0.9-patched.tar.gz |
Filesize |
12.85 KB |
Downloaded |
1146 Time(s) |
|
Back to top
|
|
 |
aragon
Joined: 15 Oct 2007 Posts: 1698 Location: Germany
|
Posted: Wed 10 Aug 2011, 01:55 Post subject:
|
|
hi goingnuts,
nice one (although some might say, it's a security-feature that there is no indication of it's running).
thanks
aragon
_________________ PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
|
Back to top
|
|
 |
cimarron

Joined: 30 May 2013 Posts: 293
|
Posted: Thu 22 Jan 2015, 11:35 Post subject:
|
|
Nice and simple. One little thing maybe worth adding is to disable the Ctrl keys, so Ctrl-Alt-F2 (etc.) and Ctrl-Alt-Bksp can't be used to get around the lock. Lobster added that functionality to xlock. To use it with slock, just launch slock with a script like this:
Code: | #!/bin/sh
#runs slock
# disable ctrl-alt-backspace by disabling ctrl key...
xmodmap -e 'keycode 37='
xmodmap -e 'keycode 109='
slock
# restore...
xmodmap -e 'keycode 37=Control_L'
xmodmap -e 'keycode 109=Control_R' |
I called it "lock," put it in /usr/local/bin, and gave it execute permissions. Works great. Just use the command "lock" instead of "slock".
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 927
|
Posted: Thu 22 Jan 2015, 12:04 Post subject:
|
|
Please view
|
Back to top
|
|
 |
cimarron

Joined: 30 May 2013 Posts: 293
|
Posted: Sun 03 Jan 2016, 12:29 Post subject:
|
|
Using a newer (only 11 year old) Dell today I found that the slock from this thread did not work properly. It would not come out of the lock (at least not without considerable difficulty).
So I tried compiling newer versions of slock and they worked properly. Below is slock version 1.0, and the newest, 1.2. In version 1.2, the screen changes to a blue color when you start typing. In 1.0, the screen remains black when you type (which I prefer).
These were compiled in Precise pup, and are just the slock binary. Just remove the fake .gz extension and change the name to slock (or whatever name you want to execute it) and place in /usr/bin. Slock uses the system password, and you must hit enter after the password. (It's usually woofwoof by default unless you've changed it.)
The script I posted above can be used to disable the CTRL keys that could be used to easily get around the lock.
 |
Description |
remove the fake .gz extension and version number
|

Download |
Filename |
slock-1.2.gz |
Filesize |
9.56 KB |
Downloaded |
498 Time(s) |
Description |
remove the fake .gz extension and version number
|

Download |
Filename |
slock-1.0.gz |
Filesize |
9.54 KB |
Downloaded |
484 Time(s) |
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 5524 Location: Ontario
|
Posted: Mon 04 Jan 2016, 16:06 Post subject:
|
|
It's possible to change the color from blue to another color at the time of compiling. Explained here
___________________________________________
I wrote a wrapper script to make it a bit easier to use.
http://www.murga-linux.com/puppy/viewtopic.php?t=80622
|
Back to top
|
|
 |
cimarron

Joined: 30 May 2013 Posts: 293
|
Posted: Mon 04 Jan 2016, 16:49 Post subject:
|
|
Hmm. Those cppflags for color aren't in the config.mk file for the slock versions I looked at. But maybe they would still work if added.
The location for the source code is: http://tools.suckless.org/slock/
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 5524 Location: Ontario
|
Posted: Mon 04 Jan 2016, 17:33 Post subject:
|
|
Perhaps in the configure file there is a mention of DCOLOR1 and DCOLOR2 ???
If there is then there is possibility of changing before 'make' command.
I'll have a look when I'm back home.
_________________________________
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 5524 Location: Ontario
|
Posted: Tue 05 Jan 2016, 14:01 Post subject:
|
|
I think I found the way to make the COLOR2 black
Open up slock.c file
Go to line 215
and fool the compiler
Code: | XAllocNamedColor(dpy, DefaultColormap(dpy, lock->screen), COLOR2, &color, &dummy);
|
switch to
Code: | XAllocNamedColor(dpy, DefaultColormap(dpy, lock->screen), COLOR1, &color, &dummy);
|
________________________________________________
|
Back to top
|
|
 |
|