Skip to content

Linux Installation

Nathan Price edited this page May 2, 2024 · 65 revisions

NOTE: If you build your own kernels, ckb-next requires the uinput flag to be enabled. It is located under Device Drivers -> Input Device Support -> Miscellaneous devices -> User level driver support. If you don't know what this means, you can safely ignore this.

Package Installation

Recommended packages

Ubuntu / Linux Mint / Pop!_OS

Ubuntu (18.04, 20.04, 22.04, 23.04) or equivalent (Linux Mint 19+, Pop!_OS)

Arch Linux / Manjaro (AUR)

Fedora (28+)

  • ckb-next - based on latest release

Void Linux (maintained by @steinex):

  • ckb-next - based on the latest release

Solus

  • ckb - based on the latest release

Gentoo

  • ckb - based on the latest release

Alpine Linux

  • Add testing/ tree to the apk repository list (if not already)
  • Install the package
apk add ckb-next ckb-next-daemon
  • start and enable the openrc service
rc-service ckb-next-daemon start && \
rc-update add ckb-next-daemon

Build from source

Install the required packages:

Arch Linux:

sudo pacman -S base-devel cmake libsystemd qt5-base zlib libdbusmenu-qt5 quazip libpulse qt5-tools libxcb xcb-util-wm qt5-x11extras git

Debian/Ubuntu (18.04+):

sudo apt install build-essential cmake libudev-dev qtbase5-dev zlib1g-dev libpulse-dev libquazip5-dev libqt5x11extras5-dev libxcb-screensaver0-dev libxcb-ewmh-dev libxcb1-dev qttools5-dev git libdbusmenu-qt5-dev

Fedora:

sudo dnf install gcc gcc-c++ make cmake glibc zlib-devel qt5-qtbase-devel quazip-qt5-devel systemd-devel pulseaudio-libs-devel qt5-linguist qt5-qtx11extras-devel xcb-util-wm-devel xcb-util-devel libxcb-devel git dbusmenu-qt5-devel

If the above returns nothing provides pkgconfig, make sure exclude=xorg-x11* is commented or removed in /etc/dnf/dnf.conf

OpenSUSE:

sudo zypper install gcc gcc-c++ make cmake linux-glibc-devel zlib-devel libqt5-qtbase-devel systemd-devel libpulse-devel quazip-qt5-devel libudev-devel libqt5-linguist-devel git libdbusmenu-qt5-devel libxcb-devel xcb-util-wm-devel libqt5-qtx11extras-devel

Download, compile, and install ckb-next:

git clone https://github.com/ckb-next/ckb-next.git
cd ckb-next
./quickinstall

Uninstallation

If using a package (PPA/AUR/…), uninstall ckb-next using the system package manager (apt/pacman/…).

Uninstallation from source

ckb-next v0.3.0 or newer

If you built ckb-next from source using quickinstall, and haven't deleted the previous ckb-next folder, you can use

cd ckb-next
sudo cmake --build build --target uninstall

If you used quickinstall, but no longer have the original folder, you can re-run quickinstall using the instructions above, and then after it finishes, simply run

sudo cmake --build build --target uninstall

If you ran cmake manually, you should recall all -DOPTION=VALUE flags (if any) you have used, build the install target and then build the uninstall target. For example:

cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release -DSAFE_INSTALL=ON -DSAFE_UNINSTALL=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBEXECDIR=lib
cmake --build build --target all -- -j 4
sudo cmake --build build --target install
sudo cmake --build build --target uninstall

The compilation and installation steps are required because install target generates an install manifest that later allows to determine which files to remove and what is their location.

ckb-next 0.2.9 or older, or ckb:

You can run the following command to delete any files that may exist from older versions of ckb. It is normal for some errors (no such file or directory) to show up.

sudo rm -r /usr/bin/ckb /usr/lib/systemd/system/ckb-daemon.service /etc/init/ckb-daemon.conf /etc/init.d/ckb-daemon /usr/bin/ckb-daemon /usr/bin/ckb-animations /usr/lib/animations /usr/share/applications/ckb.desktop /usr/local/share/applications/ckb.desktop /usr/share/icons/hicolor/512x512/apps/ckb.png /usr/local/share/icons/hicolor/512x512/apps/ckb.png

Rebuilding AUR packages

Manjaro Add/Remove Software (Pamac)

First, search for the installed package and click on it. In this case it's ckb-next-git.

pamac0

Then, click on the Build button.

pamac1

On the bottom right of the window, click on Apply.

pamac2

Finally, click on Apply again in the new window that popped up.

pamac3

yay

You can run:

yay --rebuildall -S ckb-next-git

A clean build is usually not required.

makepkg

If you haven't deleted the cloned repository directory (ckb-next, ckb-next-git), then you can simply cd into it and run makepkg -f -i to rebuild and reinstall the package.

If the original directory has been deleted, then you can clone and re-run makepkg as usual.

Enabling support for experimental devices

NOTE: This guide assumes your system uses systemd. If you do not know what this means, you can proceed as most major Linux distributions use it.

Testing experimental devices temporarily

Before making any changes, it is important to test the level of support for the experimental devices. Although unlikely, your device can misbehave, or even become completely non functional while ckb-next-daemon is running due to incomplete experimental support.

To test it temporarily, stop the ckb-next-daemon service by running in a terminal:

sudo systemctl stop ckb-next-daemon

and then start ckb-next-daemon manually with experimental support enabled:

sudo ckb-next-daemon --enable-experimental

You can now test the functionality of the device.

If the level of support provided is satisfactory for daily use, these changes can be applied permanently, as shown in the next section.

Otherwise, you can press Ctrl + C to stop ckb-next-daemon and then re-start it using systemd:

sudo systemctl start ckb-next-daemon

Your devices should now function as before.

If your experimentally supported device is a keyboard and it stopped functioning while experimental support was enabled, you will need to plug in a different keyboard to stop ckb-next-daemon in order to regain control. An unplug/replug might also be necessary afterwards.

Enabling experimental support on boot

If everything went well and you wish to enable experimental support for every boot, in a terminal run:

sudo EDITOR=nano systemctl edit ckb-next-daemon

In there, paste the following:

[Service]
ExecStart=
ExecStart=/usr/bin/ckb-next-daemon --enable-experimental

NOTE: Make sure it is pasted above ### Lines below this comment will be discarded (if it exists).

WARNING: if ckb-next was manually installed from source (e.g. ./quickinstall, make install) then the path above should be /usr/local/bin/ckb-next-daemon.

Finally, press Ctrl + X, then Y and lastly Enter. You can then restart the service to apply the changes for the current boot:

sudo systemctl restart ckb-next-daemon

Disabling experimental support on boot

If you wish to revert the changes done in the previous section, in a terminal run:

sudo systemctl revert ckb-next-daemon

You can then restart the service to apply the changes for the current boot:

sudo systemctl restart ckb-next-daemon