GithubHelp home page GithubHelp logo

sflock's Introduction

sflock - simple feedback screen locker

Simple screen locker utility for X, based on slock. Provides a very basic user feedback.

Requirements

In order to build sflock you need the Xlib header files.

Installation

Arch Linux users can install this package from the AUR(https://aur.archlinux.org/packages/sflock-git/).

Manual installation: Edit config.mk to match your local setup (sflock is installed into the /usr/local namespace by default).

Afterwards enter the following command to build and install sflock (if necessary as root):

make clean install

Running sflock

Simply invoking the sflock command starts the display locker with default settings.

Custom settings:

-h: toggle the bar.
-f : modify the font.
-c : modify the characters displayed when the user enters his password. This can be a sequence of characters to create a fake password.
-b : display a custom message instead of the current user name.

sflock's People

Contributors

addisonamiri avatar benruijl avatar bytetrip avatar coquelicot avatar fred21o4 avatar karlek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sflock's Issues

Fork after launching

Would you be amenable to having sflock fork after running so it can be used before suspending to ram or disk and when woken will already be locked, rather than running sflock upon waking?

Username on unlock screen

Could you add an option to display username on the unlock screen? I'm using multiple X servers with multiple user accounts and it would be nice do distinguish what display I'm trying to unlock. :-)

Prevent VT switching?

Not sure how easy/feasible this is, but would it be possible to have an option to prevent switching to a VT? I know xlockmore has the ability to do it somehow.

Thanks.

Don't advertise length of password upon entering

sflock displays my username in huge letters and when I enter my password, it displays a star symbol for each character. This lets people from many meters away shouldersurf to get my username (ok) and the length of my password (not ok).

Please add an option to not display each keypress and maybe even make it the default. The normal linux login on the terminal hides passwords as well as does eg cryptsetup.

Lock screen is distorted after recent system update

Sflock has been working perfectly on Archlinux for months. After a recent update, the lock screen is distorted. Reboot and recompile did not fix the problem. The only sflock dependency seems to be libxext, which hasn't been updated since November. These are the only upgrades in the past week. I'm not sure exactly when it started, except it was in the last few days. The sflock upgrade was just the recompile to see if I could fix it.

[2011-04-17 13:18] upgraded python2-sqlalchemy (0.6.6-2 -> 0.6.7-1)
[2011-04-17 13:18] upgraded sqlite3 (3.7.5-1 -> 3.7.6.1-1)
[2011-04-17 13:18] upgraded xorg-server-common (1.10.0.902-1 -> 1.10.1-1)
[2011-04-17 13:18] upgraded xorg-server (1.10.0.902-1 -> 1.10.1-1)
[2011-04-18 11:45] upgraded texmaker (3.0-1 -> 3.0.1-1)
[2011-04-19 10:35] upgraded consolekit (0.4.3-3 -> 0.4.4-1)
[2011-04-19 10:35] upgraded mtools (4.0.15-1 -> 4.0.16-1)
[2011-04-19 10:39] upgraded dropbox (1.1.23-1 -> 1.1.25-1)
[2011-04-19 10:39] upgraded youtube-viewer (20110401-1 -> 20110419-1)
[2011-04-20 09:19] upgraded kernel26 (2.6.38.2-1 -> 2.6.38.3-1)
[2011-04-20 09:20] upgraded kernel26-headers (2.6.38.2-1 -> 2.6.38.3-1)
[2011-04-20 09:20] upgraded udev (166-2 -> 167-1)
[2011-04-21 09:33] upgraded pacman (3.5.1-1 -> 3.5.2-1)
[2011-04-21 09:39] upgraded orc (0.4.11-1 -> 0.4.13-1)
[2011-04-21 09:39] upgraded php (5.3.6-2 -> 5.3.6-3)
[2011-04-21 09:39] upgraded php-curl (5.3.6-2 -> 5.3.6-3)
[2011-04-22 09:24] upgraded linux-api-headers (2.6.37-1 -> 2.6.38.1-1)
[2011-04-22 09:24] upgraded glibc (2.13-4 -> 2.13-5)
[2011-04-22 09:24] upgraded binutils-multilib (2.21-4 -> 2.21-6)
[2011-04-22 09:24] upgraded coreutils (8.10-1 -> 8.11-1)
[2011-04-22 09:24] upgraded file (5.05-2 -> 5.06-1)
[2011-04-22 09:24] upgraded lib32-glibc (2.13-4 -> 2.13-5)
[2011-04-22 09:24] upgraded lib32-gcc-libs (4.5.2-6 -> 4.6.0-3)
[2011-04-22 09:24] upgraded gcc-libs-multilib (4.5.2-6 -> 4.6.0-3)
[2011-04-22 09:24] upgraded gcc-multilib (4.5.2-6 -> 4.6.0-3)
[2011-04-22 09:24] upgraded less (436-2 -> 443-1)
[2011-04-22 09:24] upgraded mpfr (3.0.0.p8-1 -> 3.0.1-1)
[2011-04-22 09:24] upgraded virtualbox (4.0.4-4 -> 4.0.6-1)
[2011-04-22 09:24] upgraded virtualbox-additions (4.0.4-1 -> 4.0.6-1)
[2011-04-22 12:52] upgraded sflock-git (20110305-1 -> 20110422-1)

Thanks!
Scott

Using sflock with xss-lock

I want to activate sflock after a period of inactivity, for this I use xss-lock.
When I run xss-lock sflock the screen do lock after the specified interval, but my desktop is still shown.
It's only after the computer has been disturbed (mouse movement, key stroke) that sflocks screen actually kicks in.

Even if using something like
xss-lock -n dim-screen.sh -- sflock
the screen is still shown. The screen dims, and then when it's sflocks time to shine the screen is relit, and my desktop is shown. Only to later display sflocks screen when disturbed.

Just running sflock works great and locks the screen like it should.

The thing that I do notice when sflock is run with xss-lock is that my mouse disappears when the lock has kicked in. The screen is just frozen otherwise.

Not sure what the issue really is. Could it be that sflock does not handle being handed control from xss-lock?

I'm running ArchLinux and Awesome for WM (with xcompmgr to get nice transarancy).

Any help will be most appreciated!

virtual keyboard works!

Really love this app !!!

And onboard virtual keyboards works !!! I'm happy for that, i hope that this is a wanted behavior and not a kind of bug.
It works running sflock && onboard
Enabling the virtualkeyboard with a command parameter would be a bit more... clean...
Thanks for this app !

Screen not woken up after resume from suspend. Kernel 3.7.4

Hey...I just upgraded kernels from 3.6 to 3.7 (Archlinux). I have sflock in my
systemd service file like this:

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

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

[Install]
WantedBy=sleep.target

Now, when resuming from suspend, I get a completely black screen (no
backlight). I can type my password to unlock sflock , but then have to hit
C-A-F1 to get back to my X VT (this also wakes up the backlight). Occasionally
have to Ctrl-alt-backspace and kill X entirely to get the backlight on and
back to normal again.

Commenting out sflock corrects the problem and results in a normal resume
cycle.

The only other updates that could possibly be relevant (happened at the same
time as the kernel upgrade) are libgl, ati-dri, and xf86-video-intel.

I did try re-compiling, but got the same result.

Thanks!
Scott

Doesn't lock

I reinstalled sflock today, building it from sources in Arch through the AUR package. sflock doesn't lock, it starts, but accepts any string as the correct password.

Change background color?

Hello,

I was wondering if its possible to change the background color of sflock? It looks like there isn't a flag option to set it. I have no experience with C so I'm not sure where I would change that in the source code. IT would be great to be able to set the color with hex color values

Ctrl-Alt-Backspace bypasses sflock

Hey...love the program...any chance of modifying it to temporarily disable the Ctrl-Alt-Backspace combo while the screen is locked? I didn't notice that until today :/ I'd prefer not to completely disable that key-combo (the Xorg 'DontZap' option)...just while the screen is locked.

Thanks!
Scott

Segfault during exit

I recently noticed that sflock exits with a SIGSEGV upon entering the correct password. I can see this in my dmesg:

[  168.443581] sflock[1015]: segfault at 4ff3b6e0 ip 00007fc439973001 sp 00007fffa312a698 error 4 in libc-2.28.so[7fc43983a000+14b000]
[  168.443609] Code: f1 74 c0 c5 f9 da c1 c5 f9 74 c7 c5 f9 d7 c8 81 e1 ff 00 00 00 85 c9 0f 85 5c ff ff ff 83 c2 08 83 c0 08 3d fc 0f 00 00 7f 28 <c5> f9 6e 0c 17 c5 f9 6e 04 16 c5 f1 74 c0 c5 f9 da c1 c5 f9 74 c7 
[  168.443790] audit: type=1701 audit(1539852763.578:49): auid=1000 uid=0 gid=1000 ses=2 pid=1015 comm="sflock" exe="/usr/bin/sflock" sig=11 res=1

[  379.011862] sflock[3522]: segfault at 2e3c96e0 ip 00007fbb9f584001 sp 00007ffcad7bf4d8 error 4 in libc-2.28.so[7fbb9f44b000+14b000]
[  379.011879] Code: f1 74 c0 c5 f9 da c1 c5 f9 74 c7 c5 f9 d7 c8 81 e1 ff 00 00 00 85 c9 0f 85 5c ff ff ff 83 c2 08 83 c0 08 3d fc 0f 00 00 7f 28 <c5> f9 6e 0c 17 c5 f9 6e 04 16 c5 f1 74 c0 c5 f9 da c1 c5 f9 74 c7 
[  379.012065] audit: type=1701 audit(1539852974.149:50): auid=1000 uid=0 gid=1000 ses=2 pid=3522 comm="sflock" exe="/usr/bin/sflock" sig=11 res=1

Also, I noticed that after this happens, I lose the ability to switch to a different TTY.

P.S.: Running Arch Linux with the latest packages

Offset with dual monitors

With 2 monitors it sits right halfway across them, instead of centred on one or the other.
Possible to add some switch to offset it by a number of pixels? e.g. -o -960 to offset it left 960 (half of a 1920 monitor) so that it's centered on the main screen?

Inappropriate ioctl for device

I tried to use it on a PinePhone with sxmo-wm-dwm:

error locking console: Inappropriate ioctl for device
error: could not find font. Try using a full description.

I didn't specified the fonts, do you do it with -f /usr/share/fonts/truetype/noto/NotoMono-Regular.ttf ?

I wanted to see if I can get an on-screen keyboard to work.
Can you add an implementation for touchscreens with svkbd or some OSK?

ESC key does not keep monitor turned off + option suggestion

Until recently I could run sflock, and then press the ESC key to make the monitor turn off. And it would remain like this until I typed my password again.

The latest version I have (installed from AUR) doesn't allow me to do that. I press the ESC key, the monitor turns off, but then, after a few seconds, the bar appears on screen.

There could be a command-line option that would emulate this ESC key behavior, so that it would not be necessary to press it to turn off the monitor. And that sflock keeps like this until the user types his or her password again.

Any way to display the username rather then a black screen by default?

This is a good tool and I really love it, but I am a little confused that everytime I resume from a suspend or a hibernate, nothing will be displayed. I can see the screen is on, but no content is displayed. Is there any way to display the username on the screen by default? Or this part is not handled by sflock?

WM_CLASS, name, etc.

Not sure if this is the place to write feature requests, but I'l write it anyway.
Could you please add class, type, name or something else unique, so that the sflock window could be matched by compiz or something else (xprop).

Seems not to be working on Ubuntu 12.04

Hi,

I was trying to use sflock, because I am now using awesome wm on my Ubuntu 12.04 at work and I wanted something secure but simple at the same time.

When I run it, it locked my screen all right, with a coloured background, along with an horizontal line.
I guess your program is supposed to show something else.
Moreover I could not get it to unlock, so I had to reboot.

If it may be of use to you I put below the versions of some potentially useful packages:
x11-utils 7.6+4ubuntu0.2
libx11-6 2:1.4.99.1-0ubuntu2.3

Thanks for your help

AUR makepkg doesn't work

The Arch package build doesn't work. This is the output after running makepkg:

==> Making package: sflock-git r18.5785cfa-1 (Thu Feb 25 22:01:04 CET 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
==> Extracting sources...
==> Starting pkgver()...
/home/archie/.AUR_builds/sflock-git/PKGBUILD: line 15: cd: /home/archie/.AUR_builds/sflock-git/src/sflock: No such file or directory
==> ERROR: pkgver is not allowed to be empty.
==> ERROR: pkgver() generated an invalid version:

error: could not find font. Try using a full description

qwelyt@machine ~ % sflock
error: could not find font. Try using a full description.  

I have no idea what to do with this message. What font? What description?

I'm using Arch Linux and installed the AUR package ( https://aur.archlinux.org/packages/sflock-git/ ).
It has worked previously. I'm guessing some update in core or extra did 'something' which broke sflock.
But the error message is not really useful and I have no idea how to resolve it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.