Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 25 Jul 2016, 20:54
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Security/Privacy
slock - X display locker
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [11 Posts]  
Author Message
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: 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
slock-0.9.pet
Description 
pet

 Download 
Filename  slock-0.9.pet 
Filesize  3.65 KB 
Downloaded  997 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
View user's profile Send private message 
106498

Joined: 18 Nov 2007
Posts: 250
Location: NZ

PostPosted: 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
View user's profile Send private message Visit poster's website 
goingnuts

Joined: 07 Dec 2008
Posts: 843

PostPosted: 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.
slock-with-image.png
 Description   
 Filesize   5.46 KB
 Viewed   4800 Time(s)

slock-with-image.png

slock-0.9-patched.tar.gz
Description  modified slock incl. patch.
gz

 Download 
Filename  slock-0.9-patched.tar.gz 
Filesize  12.85 KB 
Downloaded  725 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Wed 10 Aug 2011, 01:55    Post subject:  

hi goingnuts,

nice one Wink (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
View user's profile Send private message 
cimarron


Joined: 30 May 2013
Posts: 293

PostPosted: 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
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 843

PostPosted: Thu 22 Jan 2015, 12:04    Post subject:  

Please view Cool
Back to top
View user's profile Send private message Visit poster's website 
cimarron


Joined: 30 May 2013
Posts: 293

PostPosted: 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.
slock-1.2.gz
Description  remove the fake .gz extension and version number
gz

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

 Download 
Filename  slock-1.0.gz 
Filesize  9.54 KB 
Downloaded  88 Time(s) 
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 4315
Location: Ontario

PostPosted: 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
View user's profile Send private message 
cimarron


Joined: 30 May 2013
Posts: 293

PostPosted: 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
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 4315
Location: Ontario

PostPosted: 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
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 4315
Location: Ontario

PostPosted: Tue 05 Jan 2016, 14:01    Post subject:  

I think I found the way to make the COLOR2 black Cool

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
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [11 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Security/Privacy
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1090s ][ Queries: 13 (0.0037s) ][ GZIP on ]