Skip to content

hokascha/RemoteMouse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remote Mouse PoC

A simple proof-of-concept for a remote mouse app: Python server (Flask + Socket.IO) and a mobile web UI with touchpad, clicks, and scrolling.

Requirements (Linux)

  • Python 3.10+ (recommended)
  • X11 session (pyautogui is often restricted on Wayland)
  • Packages for pyautogui:
    • python3-tk
    • python3-dev

Optional, but recommended:

  • python3-venv

Installation (manual)

sudo apt-get update
sudo apt-get install -y python3-venv python3-tk python3-dev

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Installation (script)

./install.sh

Start

./start.sh

The terminal prints the local URL and shows a QR code.

Open that address on your smartphone browser or scan the QR code.

Autostart with systemd (User service, recommended)

To start the server automatically at boot, use a systemd user service. This variant works without an explicitly set XAUTHORITY and is suitable for X11 desktops.

  1. Create the service file
mkdir -p ~/.config/systemd/user
cp remotemouse.service.example ~/.config/systemd/user/remotemouse.service
  1. Verify/adjust paths in ~/.config/systemd/user/remotemouse.service:
  • WorkingDirectory=/home/user/PycharmProjects/RemoteMouse
  • ExecStart=/home/user/PycharmProjects/RemoteMouse/.venv/bin/python app.py
  1. Load, enable, and start the service
systemctl --user daemon-reload
systemctl --user enable remotemouse.service
systemctl --user start remotemouse.service
  1. Optional: Start even without login (lingering)
sudo loginctl enable-linger <your-username>
  1. Status & logs
systemctl --user status remotemouse.service
journalctl --user -u remotemouse.service -f

Notes:

  • Ensure the virtual environment exists (./install.sh).
  • This setup assumes an X11 session (Wayland is usually unsuitable for pyautogui).
  • Adjust username and paths to match your system.

Notes on X11 vs. Wayland

  • On X11, pyautogui usually works out of the box.
  • On Wayland, mouse control and screenshots are often blocked.
  • Workaround: choose an Xorg/X11 session at login.

Files

  • app.py - Python server (Flask + Socket.IO, mouse control)
  • templates/index.html - Web UI (touchpad, clicks, scrolling)
  • requirements.txt - Python dependencies
  • static/manifest.json, static/sw.js, static/icon.svg - PWA assets

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors