I made Apple’s Magic Trackpad work on Ubuntu XFCE

(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.


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.


The boring part (but necessary)

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.


The moment of truth

sudo libinput list-devices

And there it is:

Apple Magic Trackpad

That’s the moment.

Now XFCE finally sees it as a real touchpad.


Fixing the insane scrolling

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.


Making it stick across reboots (autostart script)

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.