Giter VIP home page Giter VIP logo

sxlock's Introduction

sxlock - simple X screen locker

Simple screen locker utility for X, fork of sflock, which is based on slock. Main difference is that sxlock uses PAM authentication, so no suid is needed.

Features

  • provides basic user feedback
  • uses PAM
  • sets DPMS timeout to 10 seconds, before exit restores original settings
  • basic RandR support (drawing centered on the primary output)

Requirements

  • libX11 (Xlib headers)
  • libXext (X11 extensions library, for DPMS)
  • libXrandr (RandR support)
  • PAM

Installation

Arch Linux users can install this package from the AUR.

For manual installation just install dependencies, checkout and make:

git clone git://github.com/lahwaacz/sxlock.git
cd ./sxlock
make
./sxlock

Running sxlock

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

Custom settings:

-f <font description>: modify the font.
-p <password characters>: modify the characters displayed when the user enters his password. This can be a sequence of characters to create a fake password.
-u <username>: a user name to be displayed at the lock screen.
-l : Hide password length when typing

Hooking into systemd events

When using systemd, you can use the following service (create /etc/systemd/system/sxlock.service) to let the system lock your X session on hibernation or suspend:

[Unit]
Description=Lock X session using sxlock

[Service]
User=<username>
Environment=DISPLAY=:0
ExecStart=/usr/bin/sxlock

[Install]
WantedBy=sleep.target

However, this approach is useful only for single-user systems, because there is no way to know which user is currently logged in. Use xss-lock as an alternative for multi-user systems.

sxlock's People

Contributors

lahwaacz avatar qmenoret avatar

Watchers

 avatar

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.