You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run Firefox remotely on a Fedora Wayland machine, and Google has led me to believe that WayVNC is the best way to achieve this.
I'm still having a bit of difficulty, though. Here's what I've discovered:
I found the WayVNC FAQ:
Q: How can I run wayvnc in headless mode/over an SSH session?
A: Set the environment variables WLR_BACKENDS=headless and WLR_LIBINPUT_NO_DEVICES=1 before starting sway, then set WAYLAND_DISPLAY=wayland-1 and run wayvnc. For older versions of sway, WAYLAND_DISPLAY is wayland-0. Try that if wayland-1 doesn't work.
This leads to the following newbie questions:
Q: What is Sway?
A: It's a Wayland-compatible window manager. You need a window manager running in order to run WayVNC. It doesn't have to be Sway, but Sway is simple enough to set up quickly.
Q: How do I run Sway and WayVNC together?
A: Try this:
$ ssh -L 5901:127.0.0.1:5901 my-server
$ sudo yum install -y sway wayvnc
$ mkdir -p ~/.config/sway/ ~/.config/wayvnc/
$ openssl req -x509 -newkey rsa:4096 -keyout ~/.config/wayvnc/server.pem -out ~/.config/wayvnc/server.pem -sha256 -days 365 -nodes -subj /CN=$(hostname -f)
$ cat <<EOF > ~/.config/sway/vnc.config
exec bash -c "export MOZ_ENABLE_WAYLAND=1 ; firefox"
exec env WAYLAND_DISPLAY=wayland-1 wayvnc 127.0.0.1 5901 -Ldebug
EOF
$ cat <<EOF > ~/.config/wayvnc/config
address=0.0.0.0 enable_auth=true username=test password=test private_key_file=~.config/wayvnc/server.pem
certificate_file=~/.config/wayvnc/server.pem
EOF
$ env WLR_BACKENDS=headless WLR_LIBINPUT_NO_DEVICES=1 sway -c ~/.config/sway/vnc.config
00:00:00.043 [wlr] [types/wlr_drm_lease_v1.c:705] No DRM backend supplied, failed to create wlr_drm_lease_v1_manager
00:00:00.057 [wlr] [xwayland/sockets.c:63] Failed to bind socket @/tmp/.X11-unix/X0: Address already in use
### On the first machine, in a new window:
$ vncviewer 127.0.0.1:1 # Username: test Password: test, from ~/.config/wayvnc/config
Initially this didn't work, but it turns out that Firefox doesn't like running two copies at the same time. Killing the firefox running on my desktop allowed it to work.
Hopefully this helps someone else.
It'd be cool if it ended up in the FAQ entry entitled "How to run Firefox headless through ssh", though. :-)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi;
I'm trying to run Firefox remotely on a Fedora Wayland machine, and Google has led me to believe that WayVNC is the best way to achieve this.
I'm still having a bit of difficulty, though. Here's what I've discovered:
I found the WayVNC FAQ:
This leads to the following newbie questions:
Q: What is Sway?
A: It's a Wayland-compatible window manager. You need a window manager running in order to run WayVNC. It doesn't have to be Sway, but Sway is simple enough to set up quickly.
Q: How do I run Sway and WayVNC together?
A: Try this:
Initially this didn't work, but it turns out that Firefox doesn't like running two copies at the same time. Killing the firefox running on my desktop allowed it to work.
Hopefully this helps someone else.
It'd be cool if it ended up in the FAQ entry entitled "How to run Firefox headless through ssh", though. :-)
Beta Was this translation helpful? Give feedback.
All reactions