Setting up relabsd - nsensfel/relabsd GitHub Wiki

relabsd is not yet available through any package (and won't be until it's stable enough to consider it), so you'll have to download the source from this repository and compile it yourself.

Download the source

You can either clone this repository (making it easier to get updates) or download the latest version. For the rest of this page, it is implied that your current working directory is the project's root folder.

Preparing the compilation

The compilation takes place in a separate folder. You'll have to create it.

$ mkdir build

It doesn't have to be called build, but this is the most common name for it.

Choosing compilation options (optional)

$ cd build
$ ccmake ..

Pressing 'c' will make all the options appear (with their default values).

Once you are done configuring, press 'c' again, followed by 'g' to generate and save the configuration file.

Beware: your settings are saved in build/CMakeCache.txt and will be reapplied as you configured them even in the case of a relabsd update changing the default values. You can simply remove the file ($ rm build/CMakeCache.txt) to force the new configuration.

Compiling

If you aren't already in build, go there ($ cd build).

$ cmake ..
$ make

The executable should be available at build/relabsd.

Configuring the device manager

Until a better solution is found, you'll have to tell your device manager to treat the relabsd devices as joysticks.

If you don't know what device manager you are using, chances are you are using systemd's udev.

When using udev or eudev

Add the related rules to the rules.d directory:

# cp udev.rules /etc/udev/rules.d/40-relabsd.rules

Inform the device manager about the changes:

# udevadm trigger

When using mdev

mdev appears to consider the virtual device as a joystick without any additional configuration. The virtual device should be accessible through /dev/input/jsX.