Im having trouble setting up xdg portals.
Trying to restart xdg-desktop-portal-wlr.service gives:
○ xdg-desktop-portal-wlr.service - Portal service (wlroots implementation)
Loaded: loaded (/etc/systemd/user/xdg-desktop-portal-wlr.service; linked-runtime; preset: ignored)
Drop-In: /nix/store/wa4zmxgf1h1pp50hq3nskaiyvwkz0igz-user-units/xdg-desktop-portal-wlr.service.d
└─overrides.conf
Active: inactive (dead)
May 22 23:23:47 gmktecK8 systemd[1506]: Portal service (wlroots implementation) skipped, unmet condition check ConditionEnvironment=WAYLAND_DISPLAY
even though i can echo $WAYLAND_DISPLAY which evaluates to wayland-0.
My wm is dwl.
i have set XDG_CURRENT_DESKTOP to “dwl”.
UPDATE:
if i import WAYLAND_DISPLAY to systemctl and try restarting the service it works, so maybe it should be imported at some point?
NobbZ
2
How do you start your dwl?
Well, im both using a wrapper on dwl and the default script from nixpkgs dwl module.
so it ends up becoming
#!/nix/store/i27rhb3nr65rkrwz36bchkwmav6ggsmn-bash-5.3p9/bin/bash
# Import environment variables
# Setup systemd user environment
systemctl --user import-environment DISPLAY WAYLAND_DISPLAY
systemctl --user start dwl-session.target
# Start dwl
exec /nix/store/w817q6953fv9yp3gsn49s1f2kr7wgfah-dwl-0.8/bin/dwl
Where the exec is
#!/nix/store/4bwbk4an4bx7cb8xwffghvjjyfyl7m2i-bash-interactive-5.3p9/bin/bash
wrapperSetEnv() { export "$1=$2"; }
wrapperSuffixEnv() { export "$1=${!1:+${!1}$2}$3"; }
wrapperSetEnv MOZ_ENABLE_WAYLAND 1
wrapperSetEnv NIXOS_OZONE_WL 1
wrapperSetEnv XDG_CURRENT_DESKTOP dwl
wrapperSuffixEnv PATH : /nix/store/f1hbsrnl35k5fxk9ny1ikc22q38dmhbm-bibata-cursors-2.0.7/bin:/nix/store/m6z3s1cxlknbpwz4n59xr215cf4nbz0n-nerd-fonts-fira-code-3.4.0+6.2/bin:/nix/store/fc8prj9jwvgyzj8gvmnjajldg9rrql52-source-sans-3.052/bin:/nix/store/y7aj1draf68zk0ml8aq0qnzd8d861d9r-source-serif-4.005/bin
exec -a "$0" /nix/store/hbs1idviwfap09hwmag6djvckyh5kc1x-dwl-0.8/bin/dwl "$@"