Skip to content

jirutka/swaylockd

Repository files navigation

swaylockd

Binaries Workflow

swaylockd is a dumb launcher to spawn swaylock and ensure it’s running no matter what — it immediately restarts swaylock if terminated by a signal (e.g. the process crashed) and also blocks all signals (except SIGKILL and SIGSTOP). It also ensures that only one instance per user is running.

swaylockd has been developed mainly as a workaround for the swaylock stability issues [1] (see e.g. #181).

swaylock is a critical piece of security software — as a screen locker, any bug in the program that causes it to crash will cause the screen to unlock. As soon as swaylock is no longer running, the screen is no longer locked. Therefore, great care must be taken to ensure that the daemon never crash.

Refer to swaylockd(1) for more information.

Requirements

Runtime:
Build:
  • C compiler and linker supporting at least C99 (tested with clang and gcc)

  • GNU Make

  • Asciidoctor (for building man pages)

Installation

On Alpine Linux

Install package swaylockd on Alpine Linux v3.15 or later:

apk add swaylockd

Using Pre-Built Binary

  1. Download and extract release tarball for your CPU architecture (pick the right link from the list above):

    wget https://github.com/jirutka/swaylockd/releases/download/v0.1.0/swaylockd-0.1.0-x86_64-unknown-linux.tar.gz
    tar -xzf swaylockd-0.1.0-*.tar.gz
  2. Install swaylockd somewhere on your PATH, e.g. /usr/local/bin:

    install -m 755 swaylockd-0.1.0-*/swaylockd /usr/local/bin/

All binaries are statically linked with musl libc, so they work on every Linux system (distro) regardless of used libc.

From Source Tarball

wget https://github.com/jirutka/swaylockd/archive/v0.1.0/swaylockd-0.1.0.tar.gz
tar -xzf swaylockd-0.1.0.tar.gz
cd swaylockd-0.1.0

make build
make install DESTDIR=/ prefix=/usr/local

License

This project is licensed under MIT License. For the full text of the license, see the LICENSE file.


1. Actually, it’s more a bad design. See article XScreenSaver: On Toolkit Dialogs written in 2004 by Jamie Zawinski.

About

A dumb launcher to spawn swaylock and ensure it runs no matter what

Topics

Resources

License

Stars

Watchers

Forks

Languages