From 49452db82dee83da30a2c3d0f9c1d0be4415889d Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Sat, 13 Jun 2026 08:59:32 +0200 Subject: [PATCH] How to remote into sway --- networking/remote_sway.md | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 networking/remote_sway.md diff --git a/networking/remote_sway.md b/networking/remote_sway.md new file mode 100644 index 0000000..f96b1e7 --- /dev/null +++ b/networking/remote_sway.md @@ -0,0 +1,49 @@ +--- +title: Remote Desktop between Sway +tags: +- networking +requires: +- networking/ssh.md +--- + +# On the Host + +Install and run `wayvnc`. + +```sh +export WAYLAND_DISPLAY=wayland-1 +wayvnc +``` + +Only the `localhost` can access this (highly insecure) desktop sharing, at port 5900. + +# On the Client + +You'll need to disable your main modifier key on the client while accessing the host. +Edit `~/.config/sway/config`, and create a new `passthrough` mode where the modifier key does nothing. + +```config +mode passthrough { + bindsym $mod+c mode default +} +bindsym $mod+c mode passthrough +``` + +Reload sway to make the changes take effect. + +```sh +swaymsg reload +``` + +Use `ssh` to grab the host's port 5900. + +```sh +ssh -L 5900:localhost:5900 ${remote_username}@${remote_ip} +``` + +Leave that session running, and connect with `vncviewer`: + +```sh +vncviewer localhost:5900 +``` +