(and it might be saving my shoulder)
There are those problems that don’t really block your work,
but they sit there with you every single day.
Quiet.
Subtle.
Persistent.
In my case: right shoulder pain.
Hours at the computer, mouse on the right, constantly reaching for it.
A tiny movement.
Repeated thousands of times a day.
The kind of thing your body starts complaining about long before your brain takes it seriously.
So I decided to run a slightly weird experiment:
use Apple’s Magic Trackpad as my main pointing device on Ubuntu XFCE.
Spoiler: it works.
But of course… it’s not plug & play.
If you are trying to make Apple Magic Trackpad work on Ubuntu XFCE, the fix comes down to three things: BlueZ configuration, libinput tuning, and making those settings stick across reboots.
The problem
On Linux, the Magic Trackpad is one of those devices that:
- connects via Bluetooth
- shows up as paired
- looks trusted
- looks connected
…and then does absolutely nothing.
No cursor movement.
No scrolling.
No clicking.
It might as well not exist.
BlueZ can see it.
The kernel can’t.
Classic.
Why I wanted it to work
Not for nerd reasons.
Not for Apple fanboy reasons.
For ergonomics.
I wanted:
- a more central hand position
- less arm extension to the right
- less shoulder tension
- a softer, more natural movement pattern
From a biomechanical point of view, a trackpad makes a lot of sense.
If it actually works.
BlueZ fix: make Magic Trackpad work on Ubuntu XFCE
The real issue is that BlueZ, by default, doesn’t expose Apple HID devices correctly as input devices.
So the trackpad connects, but never becomes a real touchpad.
You have to tell it explicitly.
sudo nano /etc/bluetooth/input.conf
Add:
[General]
ClassicBondedOnly=false
UserspaceHID=true
Then:
sudo systemctl restart bluetooth
Clean re-pair:
bluetoothctl
remove XX:XX:XX:XX:XX:XX
scan on
Turn the trackpad on while holding the button until it starts blinking.
pair XX:XX:XX:XX:XX:XX
trust XX:XX:XX:XX:XX:XX
connect XX:XX:XX:XX:XX:XX
exit
Reboot.
Yes, reboot. Always reboot.
Verify that Ubuntu detects the Magic Trackpad
sudo libinput list-devices
And there it is:
Apple Magic Trackpad
That’s the moment.
Now XFCE finally sees it as a real touchpad.
Fix Magic Trackpad scrolling speed on Ubuntu
Out of the box, scrolling is set to 15.
Which is borderline unusable. It feels like scrolling with a broken clutch.
xinput list
xinput set-prop ID "libinput Scrolling Pixel Distance" 50
At 50 it finally becomes human.
Right click, Mac-style
The Magic Trackpad is designed for physical area clicks.
xinput set-prop ID "libinput Click Method Enabled" 1 0
Now:
- bottom-left = left click
- bottom-right = right click
Exactly like macOS.
If you also want tapping:
xinput set-prop ID "libinput Tapping Enabled" 1
xinput set-prop ID "libinput Tapping Button Mapping Enabled" 1 0
Two-finger tap = right click.
Make Magic Trackpad settings persist across reboots
Getting it to work once is nice.
Getting it to work every single morning without touching anything is better.
So I created a small startup script that runs after login and applies all the trackpad fixes automatically.
nano ~/.config/autostart/trackpad-fix.sh
Paste this inside:
#!/bin/bash
sleep 3
xinput set-prop "Apple Magic Trackpad" "libinput Scrolling Pixel Distance" 50
xinput set-prop "Apple Magic Trackpad" "libinput Click Method Enabled" 1 0
xinput set-prop "Apple Magic Trackpad" "libinput Tapping Enabled" 1
xinput set-prop "Apple Magic Trackpad" "libinput Tapping Button Mapping Enabled" 1 0
Make it executable:
chmod +x ~/.config/autostart/trackpad-fix.sh
Add it to:
Settings → Session and Startup → Application Autostart
Command:
/home/youruser/.config/autostart/trackpad-fix.sh
From now on:
- boot the machine
- log in
- trackpad connects
- scroll is fixed
- right click works
No manual commands. No ritual. No debugging before coffee.
The result
- Magic Trackpad auto-connecting at boot
- controlled scrolling
- native right click
- Apple-level precision
- a more central hand position
- a much happier shoulder
On Ubuntu.
On XFCE.
Why I actually did this
Not for fun.
Not for tinkering.
Because we spend too many hours in front of a screen to ignore biomechanics.
That tiny repeated reach for the mouse was slowly loading my shoulder every single day.
The trackpad lets me work closer to the keyboard, with less extension and less tension.
It’s ergonomics.
Not a gadget.
If you work long hours at a computer, these small things compound over time.
Your body always keeps score.
Better to listen early.
How to show Apple Magic Trackpad battery on Ubuntu XFCE panel
If you are using a Magic Trackpad on Ubuntu XFCE, battery visibility is the last missing quality-of-life tweak.
This adds a lightweight battery indicator in the XFCE panel using Generic Monitor and upower.
Install the plugin:
sudo apt install xfce4-genmon-plugin
Create the script:
nano ~/.local/bin/trackpad-battery
#!/usr/bin/env bash
set -u
device=""
for candidate in $(upower -e 2>/dev/null); do
if upower -i "$candidate" 2>/dev/null | grep -Fqi "Magic Trackpad"; then
device="$candidate"
break
fi
done
if [ -z "$device" ]; then
echo "<txt>◎ ?</txt>"
echo "<tool>Magic Trackpad not found or not connected</tool>"
exit 0
fi
info=$(upower -i "$device" 2>/dev/null)
pct=$(printf '%s\n' "$info" | awk '/percentage/ {print $2}')
state=$(printf '%s\n' "$info" | awk -F: '/state/ {gsub(/^[[:space:]]+/, "", $2); print $2; exit}')
updated=$(printf '%s\n' "$info" | sed -n 's/^[[:space:]]*updated:[[:space:]]*//p' | head -n 1)
if [ -n "$pct" ]; then
echo "<txt>◎ $pct</txt>"
echo "<tool>Apple Magic Trackpad\nState: ${state:-unknown}\nUpdated: ${updated:-unknown}</tool>"
else
echo "<txt>◎ ?</txt>"
echo "<tool>Trackpad battery unavailable</tool>"
fi
Make it executable:
chmod +x ~/.local/bin/trackpad-battery
Add it to the XFCE panel:
- Panel -> Add New Items -> Generic Monitor
- Command:
~/.local/bin/trackpad-battery - Update interval:
30or60seconds
You will get a compact panel label like ◎ 43%, with status details in the tooltip.
FAQ
Does Apple Magic Trackpad work on Ubuntu XFCE?
Yes, but not out of the box. You usually need the BlueZ UserspaceHID=true fix before Ubuntu exposes it correctly as a touchpad.
Why is the Magic Trackpad connected over Bluetooth but not moving the cursor?
Because Bluetooth can pair the device even when Linux is not exposing it as a usable input device yet. Pairing is not the same thing as a working touchpad.
Can I see Magic Trackpad battery percentage on XFCE?
Yes. With upower and the XFCE Generic Monitor plugin, you can show the battery percentage directly in the panel.
