I've been observing an unusual behavior from Sway on Fedora 39 (which also has GNOME installed, and I need to keep GNOME installed). The desktop starts up, but any GTK apps I launch won't open until about 25 seconds have passed. Also, my waybar never appears until I reload the configuration after the 25 seconds have elapsed.
How do I prevent this delay?
Answers I've seen and tried:
- Uninstall
xdg-desktop-portalandxdg-desktop-portal-gnome(it turns out these are dependencies for GNOME, so it isn't an option). - Set
GTK_USE_PORTAL=0. - Set
WAYLAND_DISPLAY=wayland-1. - Run
exec systemctl --user import-environmentin my sway config (I tried putting this before and putting it after thewaybarline). - Comment out the
pam_gnome_keyring.soline in a file under/etc/pam.d(in my case,/etc/pam.d/gdm-autologin). - Export a certain set of variables by name
(
WAYLAND_DISPLAY,DISPLAY,XDG_CURRENT_DESKTOP, etc.), so that systemd and dbus can use them.
Unfortunately, the delay persisted after a reboot with each of these changes. I'm posting this because I finally found a solution, but an explanation would be welcome (I don't really understand the solution).