-
Notifications
You must be signed in to change notification settings - Fork 186
Tips & Tricks
This is due to GTK+ waiting for xdg-desktop-portal to start via D-Bus. This times out because the D-Bus activated service doesn't know what WAYLAND_DISPLAY
to connect to. Add the following to your configuration file:
[autostart]
0_environment = dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY XAUTHORITY
For more details: https://github.com/WayfireWM/wayfire/issues/775
This is a small wrapper script that uses xhost
and sudo
to launch x11 clients as root under xwayland. Save to a file, make executable and use in place of sudo to run an x11 client with privileges in wayfire.
#!/bin/bash
# small script to enable root access to x-windows system
# enable root access
xhost +SI:localuser:root
sudo -E $@
# disable root access after application terminates
xhost -SI:localuser:root
If you are having trouble with wine applications, such as input not responding, tearing windows, or buggy mouse behavior in some fullscreen games check the following:
- Make sure xwayland is enabled in wayfire meson configure output and in wayfire.ini [core] xwayland = 1
- In winecfg in the Graphics tab, enable 'Automatically capture mouse in full screen mode', disable 'Allow the window manager to decorate the windows', disable 'Allow the window manager to control the windows' and enable 'Emulate a virtual desktop'
The Idle plugin offers a built in screensaver for wayfire. It has options to choose either DPMS or screensaver timeout. If the cube plugin is enabled, the Idle screensaver timeout will rotate the cube based on settings found in the Idle plugin. Otherwise, the screen will just become black on timeout. There is also swayidle which can be used in conjunction with a special version of xscreensaver. It is recommended to install this version of xscreensaver to a nonstandard prefix because it will not work correctly with X. To use it, make two entries in the Autostart plugin like so:
a2 = /opt/xscreensaver/bin/xscreensaver -nosplash
a3 = swayidle timeout 60 '/opt/xscreensaver/bin/xscreensaver-command -activate' resume '/opt/xscreensaver/bin/xscreensaver-command -deactivate'
Change the prefix accordingly. The first will start the daemon and the second will activate the screensaver after 60 seconds of inactivity. You may change this value to your liking.
This is a sample config that uses gtkgreet and wayland-logout and can be used with wayfire -c
[autostart]
autostart_wf_shell = false
dm = gtkgreet -l && wayland-logout
[core]
plugins = autostart
vheight = 1
vwidth = 1
xwayland = false
Wayfire has a hard coded keybinding Ctrl+Alt+BkSpc to shutdown. It also supports layer shell protocol, which makes it possible to use a program such as wlogout to log out and shut down. There is also wayland-logout which kills the current wayland compositor instance.
With virtual pointer support, programs like wayvnc are possible. No special wayfire configuration is required.
Use the following command to show /dev/video0 in a native window with gst-launch-1.0 (gstreamer). Note that glimagesink must be available.
gst-launch-1.0 -v v4l2src device=/dev/video0 ! glimagesink
Compile wayfire with the release
buildtype to enable performance optimizations.
meson -Dbuildtype=release build
Build wayfire with the flag -Dprint_trace=false
To enable screen sharing in chromium
Add the following lines to the configuration file wayfire.ini
[autostart]
0_0 = systemctl --user import-environment
xdg = sleep 1 && (XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=sway /usr/lib/xdg-desktop-portal --replace & /usr/lib/xdg-desktop-portal-wlr)
(This is for arch linux, for other distributions the path could have /libexec/ instead of /lib/)
Install xdg-desktop-portal
and xdg-desktop-portal-wlr
Edit the configuration file ~/.config/xdg-desktop-portal-wlr/config
[screencast]
output_name=
max_fps=30
chooser_cmd=slurp -f %o -or
chooser_type=simple
(you should add your output_name)
test that this script works: https://gitlab.gnome.org/-/snippets/19
set this flag on chrome
chrome://flags/#enable-webrtc-pipewire-capturer
If your output = kanshi as default, you may need to create a config file in $HOME/.config/kanshi/config with your desired settings e.g:
profile {
`output DP-1 mode [email protected] position 0,0`
}
See kanshi git for more info: https://github.com/emersion/kanshi