@velor/remote-mouse
v6.6.0
Published
Remote mouse and keyboard with mobile client
Readme
Remote Mouse
Remote Mouse is a web-based remote control for operating a computer from a phone, tablet, or another browser on the same network. The server exposes a mobile-friendly interface for mouse and keyboard control, browser shortcuts, admin actions, and optional Samsung TV remote commands.
Overview
The application includes:
- a token-based entry path with QR code access
- a mobile touchpad for mouse movement, clicking, and scrolling
- a keyboard panel for text input and special keys
- browser shortcut actions
- VLC media controls when VLC is available on the host
- admin actions from the client UI
- a server info page
- optional Samsung TV remote integration
Screenshots
Regenerate these assets with npm run screenshots:mobile.
| Remote control | Local preferences | | --- | --- | | | |
| VLC remote | Admin configuration | | --- | --- | | | |
| Server info | | --- | | |
Install
Automatic (preferred)
Linux installer:
curl -fsSL https://raw.githubusercontent.com/glennerichall/node-mouse/main/scripts/install-linux.sh | bashFor local development from this repository, run scripts/install-linux.sh:
scripts/install-linux.shUse -y to automatically accept every confirmation prompt:
scripts/install-linux.sh -yWhen running the installer through curl | bash, pass options after bash -s --:
curl -fsSL https://raw.githubusercontent.com/glennerichall/node-mouse/main/scripts/install-linux.sh | bash -s -- -yWindows installer:
powershell -ExecutionPolicy Bypass -File scripts/install-windows.ps1Use -Yes to automatically accept every confirmation prompt:
powershell -ExecutionPolicy Bypass -File scripts/install-windows.ps1 -YesFor a downloaded script:
iwr https://raw.githubusercontent.com/glennerichall/node-mouse/main/scripts/install-windows.ps1 -OutFile install-windows.ps1
powershell -ExecutionPolicy Bypass -File .\install-windows.ps1Downloaded script with automatic confirmations:
iwr https://raw.githubusercontent.com/glennerichall/node-mouse/main/scripts/install-windows.ps1 -OutFile install-windows.ps1
powershell -ExecutionPolicy Bypass -File .\install-windows.ps1 -YesmacOS installer scripts will be added later.
The automatic installer is expected to handle:
- Node.js installation or validation
- platform native dependencies
- npm package installation
- initial
.envcreation - optional local service installation
- first-run access URL and QR code display
Custom
Use the custom installation path when you want to install each dependency yourself, run from source, or tune the host service manually.
Node.js
Install an active Node.js LTS release before installing Remote Mouse. The application uses npm scripts and native Node.js modules, so both node and npm must be available in your terminal.
Linux and macOS
Using nvm is recommended because it keeps the Node.js version isolated from the system packages:
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
nvm install --lts
nvm use --ltsRestart your terminal if nvm is not available immediately after installation.
Windows
Install the Node.js LTS release from the official installer, or use winget:
winget install OpenJS.NodeJS.LTSOpen a new terminal after installation so node and npm are available in PATH.
Verify
node --version
npm --versionPlatform Dependencies
This project relies on @hurdlegroup/robotjs, which requires native dependencies.
VLC media player is optional. Install it on the host machine if you want the VLC remote to appear and control media playback.
Linux
Typical Debian or Ubuntu packages:
sudo apt-get update
sudo apt-get install -y build-essential libx11-dev libxtst-dev libpng++-dev wmctrl yadNotes:
libx11-dev,libxtst-dev, andlibpng++-devare required for the native mouse and keyboard integrationwmctrlis used for browser focus and window activation on Linuxyadis used for the Linux QR overlay- an X11 session is required for the Linux desktop control features
Windows
Typical requirements:
- Microsoft Visual Studio C++ Build Tools for native Node modules
- Python available in
PATHif native module compilation is needed - PowerShell and Windows Forms support for the QR overlay behavior
Notes:
- the Windows QR overlay uses PowerShell with Windows Forms
- depending on your environment,
npm installmay use a prebuilt binary or may require local native compilation
Package Install
Install the published npm package globally:
npm install -g @velor/remote-mouse
remote-mouseOn startup, the server prints the client access URL and the corresponding QR code.
Source Install
Use this path when working from a checked-out repository:
npm install
npm startOn startup, the server prints the client access URL and the corresponding QR code.
Self-Signed HTTPS Certificate
HTTPS can be enabled with a local self-signed certificate. This is useful when a browser feature or deployment context requires a secure origin.
Create a local certificate directory:
mkdir -p certsGenerate a self-signed certificate:
openssl req -x509 -newkey rsa:4096 -sha256 -days 365 -nodes \
-keyout certs/remote-mouse.key \
-out certs/remote-mouse.crt \
-subj "/CN=remote-mouse.local" \
-addext "subjectAltName=DNS:localhost,DNS:remote-mouse.local,IP:127.0.0.1"Enable HTTPS in .env:
HTTPS=true
SSL_KEY_PATH=certs/remote-mouse.key
SSL_CERT_PATH=certs/remote-mouse.crtBrowsers will warn about self-signed certificates until the certificate is trusted locally. This is expected for a local self-signed certificate. Open the advanced/details option in the browser warning and choose to continue to the site.
Linux Deployment
The application can manage its own systemd --user service.
Typical setup:
- Install the package with npm, or use the source install path above.
- Create a
.envfile based on.env.example. - Run
remote-mouse service install. - Use
remote-mouse service restart,remote-mouse service disable, orremote-mouse service uninstallas needed.
The generated unit is equivalent to the following:
[Unit]
Description=Remote Mouse Server
After=graphical-session.target network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/path/to/remote-mouse/bin/remote-mouse.js
Restart=on-failure
RestartSec=2
Environment=PATH=/path/to/nodejs:/usr/local/bin:/usr/bin:/bin
Environment=NODE_ENV=production
PassEnvironment=DISPLAY WAYLAND_DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS
[Install]
WantedBy=default.targetDepending on the graphical environment, passing the user session environment may be necessary for UI-related integrations.
An X11 session is required for the Linux desktop control features.
Windows Deployment
On Windows, the application manages a Task Scheduler entry that runs at user logon.
Typical setup:
- Install the package with npm, or use the source install path above.
- Create a
.envfile based on.env.example. - Run
remote-mouse service install. - Use
remote-mouse service restart,remote-mouse service disable, orremote-mouse service uninstallas needed.
The generated scheduled task follows this model:
- Trigger:
At log on - Action:
schtasks /Create - Task name: the configured
serviceName - Command: launches the
remote-mouseentrypoint withREMOTE_MOUSE_DAEMON=1 - Run only when the user is logged on
Notes:
- running in a user session is usually preferable because mouse, keyboard, browser, and overlay integrations depend on an interactive desktop session
- if you rely on the QR overlay or browser-opening actions, make sure the task runs in the same desktop session as the logged-in user
- if you installed the app globally, the generated task uses the
remote-mouseCLI entrypoint directly
Configuration
Startup configuration is handled through a .env file. Instead of duplicating every environment variable here, use .env.example as the reference.
Access and Administration
Useful server pages:
/qrdisplays the entry QR code/ui/admin/server-infoshows server state, effective configuration, and recent logs/ui/admin/configlets you edit persisted settings grouped to match the configuration object structure
Useful CLI commands:
helpdisplays the available CLI commandsinfoprints the server capabilitiesconfigprints the effective persisted configurationconfig get <path>prints one persisted configuration valueconfig set <path> <value>updates one persisted configuration valuesys-configprints the system configurationsystem-configis an alias ofsys-configservice installinstalls the local daemon/serviceservice disabledisables the local daemon/serviceservice uninstalluninstalls the local daemon/serviceservice restartrestarts the local daemon/servicetasksprints the task manager snapshottask-manageris an alias oftasksupdate-eventsprints persisted update-manager eventssamsung-detectdetects Samsung TVs available on the networktokenslists persisted entry tokensopen-qropens the QR page on the serverqris an alias ofopen-qr
Example:
remote-mouse config get logging.level
Routes
The server exposes two main HTTP surfaces:
- UI routes for HTML pages
- API routes for JSON and SSE
UI Routes
GET /serves the client applicationGET /qrdisplays the entry QR code pageGET /ui/admin/server-infoserves the server info pageGET /ui/admin/configserves the admin configuration page
Session Route
GET /api/sessions/:tokenvalidates an entry token, creates the signed session cookie, and redirects to/
Admin API Routes
GET /api/admin/server-info/datareturns the current server snapshot: version, uptime, connected clients, tasks, tokens, effective config, system config, and recent logsGET /api/admin/configsreturns the managed configuration entries, schema, defaults, and managed pathsGET /api/admin/configs/:configIdreturns one managed configuration entryPATCH /api/admin/configs/:configIdupdates one managed configuration entryDELETE /api/admin/configs/:configIdresets one managed configuration entry to its default valuePOST /api/admin/subs/configscreates a config SSE subscription and returns its id plus the stream URLGET /api/admin/subs/:idopens the SSE stream for a previously created subscriptionDELETE /api/admin/subs/:iddeletes a previously created subscriptionPOST /api/admin/restart-servicerequests a local service restart through the application daemon service
Health Route
GET /healthreturns a simple health payload with the current application version
Static Assets
After session validation, static assets are also available through:
/client/*/utils/shared/*- files served from
public/
Notes
- client access is controlled by either a generated token path or a fixed entry path, depending on configuration
- HTTPS can be enabled when required by the deployment context
- Samsung TV integration is optional and disabled by default
