A simple setup to run WayVNC on a Hyprland virtual monitor, enabling remote desktop functionality on a headless display.
This project provides scripts and a systemd service to create a virtual monitor in Hyprland, move a workspace to it, and start a WayVNC server for remote access. The setup includes:
hypr_remote.service: Systemd service to manage the WayVNC process.hypr_remote.sh: Script to configure the virtual monitor and start WayVNC.install.sh: Installation script to deploy the service and script.
- Hyprland window manager
- WayVNC installed
- Systemd for service management
- Sudo privileges for installation
- Clone or download this repository.
- Run the installation script:
chmod +x install.sh ./install.sh
- Enable and start the service:
sudo systemctl enable hypr_remote.service sudo systemctl start hypr_remote.service
- Service (
hypr_remote.service): Runshypr_remote.shas a systemd service, starting after Hyprland and graphical target are ready. It uses environment variables from/etc/hyprland_env. - Script (
hypr_remote.sh):- Checks for Hyprland environment variables (
HYPRLAND_INSTANCE_SIGNATURE,WAYLAND_DISPLAY). - Creates a headless monitor (
HEADLESS-2) if it doesn't exist. - Moves workspace 3 to the virtual monitor and focuses back to the primary monitor (
DP-2). - Starts WayVNC on
0.0.0.0:5900for remote access to the virtual monitor. - Cleans up on exit by moving the workspace back and stopping WayVNC.
- Checks for Hyprland environment variables (
- Install Script (
install.sh): Copies files to system locations, replacing placeholders for user and runtime directory, and reloads systemd.
After installation, the service automatically starts WayVNC on a virtual monitor. Connect to the VNC server at <your-ip>:5900 using a VNC client.
- The virtual monitor is named
HEADLESS-2, and workspace 3 is used by default. Modifyhypr_remote.shto change these. - The primary monitor is assumed to be
DP-2. Update this inhypr_remote.shif needed. - Ensure WayVNC and Hyprland are properly configured before running.
MIT License