3

There are many similar questions (e. g. here, and on the forums), but all the answers are outdated - they are for xserver, lightdm, lxde etc., and not for Bookworm/Wayland.

So, how can we hide the mouse cursor in the latest Bookworm RPi OS? unclutter from apt doesn't work, it does nothing (the cursor never hides).

2 Answers 2

2

wayfire itself doesn't come with this feature bundled, but can be easily extended through its complementary wayfire-plugins-extra package. Unfortunately, it is not available in the Bookworm repos.

I (very) recently had a similar requirement for a project and came up with a solution. You can find my full entry here. I'll pick what is relevant for your question:

Hide mouse pointer

1) Install wayfire-plugins-extra

Compiled Library:

  1. Download the correct library for your architecture from here (Compiled by me. Feel free to build from source)
  2. Decompress with tar xf /path/to/wayfire-plugins-extra-raspbian-<your-arch>.tar.xz
  3. Each plugin comes with .so and .xml files. You will need to copy those to their correct paths:
    sudo cp <desired-plugin>.so /usr/lib/<your-arch-linux-gnu>/wayfire/<desired-plugin>.so
    sudo cp <desired-plugin>.xml /usr/share/wayfire/metadata/<desired-plugin>.xml

Build from Source:

  1. Follow the instructions in https://github.com/seffs/wayfire-plugins-extra/. Install all required dev packages with
    sudo apt install libglibmm-2.4-dev libglm-dev libxml2-dev libpango1.0-dev libcairo2-dev wayfire-dev libwlroots-dev libwf-config-dev meson ninja-build
  2. Each plugin comes with .so and .xml files. meson should take care of the installation. Otherwise check if the following path exists for any new extra plugin:
    ls /usr/lib/<your-arch-linux-gnu>/wayfire/<new-extra-plugin>.so
    ls /usr/share/wayfire/metadata/<new-extra-plugin>.xml

2) Activate your plugin(s)

I was only interested in hiding the mouse pointer. This can be accomplished with the hide_cursor plugin. The same concept applies to the rest of plugins.

Open your ~/.config/wayfire.init file and adjust the following:

[core]
plugins = \
        autostart \
        ### We need to add the extra plugin to the list ###
        hide-cursor

Launch wayfire once again. You'll notice that the mouse pointer disappeared.

1
  • Thank you very much! Commented Dec 20, 2023 at 9:38
2

I've had success with installing the hideaway plugin for Interception Tools using the script below.

Adapted from https://forums.raspberrypi.com/viewtopic.php?t=358285#p2176499

#!/bin/bash
# hide mouse in wayland raspbian

sudo apt install -y interception-tools interception-tools-compat
sudo apt install -y cmake
cd ~
git clone https://gitlab.com/interception/linux/plugins/hideaway.git
cd hideaway
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
sudo cp /home/$USER/hideaway/build/hideaway /usr/bin
sudo chmod +x /usr/bin/hideaway

cd ~
wget https://raw.githubusercontent.com/ugotapi/wayland-pagepi/main/config.yaml
sudo cp /home/$USER/config.yaml /etc/interception/udevmon.d/config.yaml
sudo systemctl restart udevmon
1
  • A small typo: "Open your ~/.config/wayfire.init file and adjust the following:" The file is wyfire.ini, at least in on my pi. ps. thanks alot! :) Commented Feb 13 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.