Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time
section x-masysma-name title date lang author keywords x-masysma-version x-masysma-repository x-masysma-website x-masysma-owned x-masysma-copyright
maerct Emergency Remote Control
2020/01/17 15:22:37
Linux-Fan, (
Copyright (c) 2020 For further info send an e-mail to


maerct -- Emergency Remote Control: Kill X11 in case of hangs.


maerct [-f] FILE


This program has to be run by the root user. It takes a Linux keyboard event device, e. g. /dev/input/event0 and grabs it exclusively. Do not run it if you only have one keyboard attached. -f forks twice.

Table of blink codes

NumLock CapsLock ScrollLock Description

slow off off Program operating correctly. fast off off Program expecting input. off fast off Process X takes >80% CPU. off slow off RAM exceeded. off off slow Shorttime Load AVG greater 10. off off fast Command is being executed. off off off Program not operating.

Table of possible inputs

Key Description

ESC Cancel pending operation F1 Attempt to kill X11 process F2 Attempt to start (and immediately terminate) new X server. F4 Exit this program (no unlock required) u Press this before another operation to unlock input.

Extended Description

This program is intended to run as a background service on an interactively used machine with a second keyboard connected for the sole purpose of being used by this program (e. g. one can install otherwise unused PS2 keyboards for the purpose).

It then outputs a limited amount of status information in form of regular blink codes using the three keyboard LEDs: NumLock, CapsLock and ScrollLock.

Apart from displaying status, it can serve as a remote control (thus the name) for killing the X-server. This might be an interesting feature for users of third-party kernel modules (e. g. NVidia drivers or VirtualBox modules) which used to cause some X11 freezes on the machine this program was developed for. By pressing [U], followed by [F1], one can cause the X-server to be terminated, freeing access to the console (if it does not work, sequence [U] followed by [F2] attempts to restart the X-server).

Be aware that similar to SysRq-codes (which may also work in such cases), this program allows bypassing any running screensaver! In case you only want the keyboard blinking, consider using ma_capsblinker(11) (currently does not provide any status information, but does not need to run on a separate keyboard).

This program is provided together with an LSB init script (masysma-emergency-remote-control) and a default configuration in /etc/default/maerct which is actually a shellscript sourced into the init script, allowing for host-specific configuration or any other logic.


To compile this program, a C compiler is needed e. g. as provided by Debian package gcc-8-base. Additionally, the ant build tool is needed and can then be invoked by running ant. To build the Debian package (with the necessary dependencies installed), use ant package.

About Emergency Remote Control






No releases published


No packages published