Linux desktop remote for Roku devices.

A GTK4/libadwaita app that finds Rokus on your network and drives them over Roku's External Control Protocol (ECP) on port 8060. Click the buttons, use the keyboard, or swipe the touchpad.
Features
- Finds devices with SSDP, and falls back to scanning the local /24 for port 8060
- Connects to a manual IP address when discovery comes up empty
- Remembers the last device and reconnects to it on launch
- Keyboard shortcuts for every button, shown in the tooltips
- Touchpad scrolling navigates Up, Down, Left and Right; a right click (two-finger tap) is OK
Install
Requirements
- Python 3.10 or newer
- GTK 4, libadwaita and PyGObject (on Arch:
sudo pacman -S gtk4 libadwaita python-gobject)
There are no other dependencies: the network side uses only the standard library.
From source
git clone https://github.com/slastra/pyku
cd pyku
python3 main.py
Usage
Launch the app, then press Discover or open the device menu (the wireless icon in the header bar) to discover devices or enter an IP address. The first device found is selected, and the others are listed in the menu.
If buttons don't respond after connecting, enable external control on the Roku: Settings > System > Advanced system settings > Control by mobile apps > Permissive. The app shows the same hint when the Roku answers with a 403.
Keyboard
| Key | Roku button |
|---|---|
| Arrow keys | Up, Down, Left, Right |
Enter |
OK |
Esc, Backspace |
Back |
H |
Home |
I |
Info |
P |
Power off |
Space |
Play / Pause |
R / F |
Rewind / Fast forward |
- / + (or =) |
Volume down / up |
M |
Mute |
Configuration
There is no configuration file. The last device's IP is cached in
~/.cache/roku-remote/device.json; delete it to start without a device.
How it works
roku.py holds the protocol side: an SSDP M-SEARCH for roku:ecp, a
threaded scan of the local subnet for port 8060 when SSDP finds nothing,
/query/device-info for the friendly name and model, and a POST to
/keypress/<key> for each button. window.py is the GTK4 window and its
keyboard and touchpad handling, style.css sizes the buttons, and main.py
starts the app.