/ #Anne Pro 2 #Mechanical Keyboards 

Installing Anne Pro 2 companion software on Fedora Linux

Anne Pro 2 comes with a software to customize the keyboard. Although they provide a version for Linux, that version is a .deb package that can only be installed on Ubuntu or Debian. It is still possible to install it on Fedora (and likely other distros), but we need a workaround.

Update (06/24/2019): After I downloaded an updated version of companion software and it didn’t work after installing following the steps below, I contacted Obinslab asking for support and, to my surprise, they made a RPM package available in their website. The RPM package installed without errors, but running the software I got the same error I had when installing manually. I had to reboot my computer in order to make it work. Since now there is an official RPM package, this guide shouldn’t be needed anymore.

Anne Pro 2 is an amazing mechanical keyboard. The price is reasonable, especially comparing with other high end mechanical keyboards and the list of features is quite impressive:

  • Dual connection mode: USB-C and Bluetooth;
  • True RGB LED backlit;
  • Keys are fully customizable;
  • Backlit colors are fully customizable;
  • Available with Khail, Gateron, or Cherry MX switches;
  • Tap key functionality: keys behave differently when tapped or held.

The companion software, Obinslab Starter, has versions for Windows, macOS, and Linux. The Linux version is only available as a deb package, making it supported on Debian, Ubuntu, and other distros that use that format. Fedora, which I am a user, is not one of them (it uses RPM packages), but there is a workaround to fix that.

Alien

Not that kind of alien.

Alien is a software that converts between different Linux package distribution formats, including from deb to RPM.

The first step is to install Alien if it’s not installed yet. Alien is available in the Fedora’s DNF repositories so to install it just run:

dnf install alien

Converting from deb to RPM

If Anne Pro’s software was not downloaded yet, it can be found here: http://www.obins.net/obinslab-starter/. Once Alien is installed and Anne’s software is downloaded, the deb package needs to be converted to RPM. To do that, head to the directory where Obinslab Starter was downloaded to and run the following command, replacing ObinslabStarter_1.0.7.deb with the actual filename you downloaded:

alien -r ObinslabStarter_1.0.7.deb

If the same thing that happened to me happens to you, the following message should be displayed:

Warning: Skipping conversion of scripts in package obinslab-starter: postinst postrm
Warning: Use the --scripts parameter to include the scripts.
Package build failed. Here's the log of the command (cd obinslab-starter-1.0.7; rpmbuild --buildroot='/home/me/obinslab-starter-1.0.7' -bb --target x86_64 'obinslab-starter-1.0.7-2.spec'):
error: line 5: Empty tag: Summary:
Building target platforms: x86_64
Building for target x86_64

Notice the error message: error: line 5: Empty tag: Summary

I am not really sure why this error happened. I couldn’t find information about it and instead of spending too much time researching what it is and how to fix it, I took the shorter route and went straight to the alternative solution.

Installing Obinslab Starter: the alternative way

Converting the package to RPM didn’t work so I had to try something else. By reading Alien’s man page, I found this option that looked like it would help:

-g, --generate
           Generate a temporary directory suitable for building a package from,
           but do not actually create the package.
           
           This is useful if you want to move files around in the package before building it.
           
           The package can be built from this temporary directory by running "debian/rules binary",
           if you were creating a Debian package, or by running "rpmbuild -bb <packagename>.spec"
           if you were creating a Red Hat package.

Running Alien with this flag extracts the contents of the package to the current directory, and it seemed it would help. So, I ran this:

alien -g ObinslabStarter_1.0.7.deb

Resulting in a directory named ./obinslab-starter-1.0.7.orig with the following subdirectories inside:

./usr/share/icons
./usr/share/docs
./usr/share/applications
./opt/Obinslab Starter

I started inspecting the contents of each directory and noticed that Obinslab Starter was just an Electron application, which means I wouldn’t need anything besides what was already there. The next step is to copy the contents of these directories to their final locations (you might need to run these commands as root):

cp -R ./usr/share/icons /usr/share
cp -R ./usr/share/docs /usr/share
cp -R ./usr/share/applications /usr/share
cp -R ./opt/Obinslab Starter /opt

You might want to create a shortcut to run the application. If you are on Gnome, you can create the file obinslab-starter.desktop at either /usr/share/applications or /usr/local/share/applications or ~/.local/share/applications with the following contents:

[Desktop Entry]
Name=Obinslab Starter
Comment=Obinslab Starter
Exec="/opt/Obinslab Starter/obinslab-starter" %U
Terminal=false
Type=Application
Icon=obinslab-starter
StartupWMClass=Obinslab Starter
Categories=Utility;

I will not go into the details of this file but if you need to know more, you can check GNOME’s documentation about Desktop files.

These are all the steps needed to install the application. But we are not done yet; there is one last step before we can enjoy our keyboard.

The last step

Most Linux distros use udev to manage access to physical devices. To allow non-root access to the keyboard, we need to follow these steps before using Obinslab Starter for the first time:

1 - Create file obinslab-starter.rules under /etc/udev/rules.d with the following contents:

SUBSYSTEM=="input", GROUP="input", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04d9", ATTRS{idProduct}=="8008", MODE="0666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="04d9", ATTRS{idProduct}=="8008", MODE="0666", GROUP="plugdev"

2 - Reload the udev rules by executing this command:

udevadm control --reload-rule

3 - Unplug and replug keyboard

Now, when you run the Obinslab Starter, you should see the following window:

That’s it. Have fun with your keyboard!