1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00

x11-wm/niri: set XDG_SESSION_TYPE by default (a la niri-session)

Smithay (unlike wlroots) doesn't seem to set XDG_SESSION_TYPE.
Mainly affects Qt which prefers XDG_SESSION_TYPE over WAYLAND_DISPLAY.
This commit is contained in:
Jan Beich 2023-12-01 09:49:46 +01:00
parent 973d9f4cec
commit 3dee7e5522

View File

@ -42,12 +42,13 @@ Avoid various systemd dependencies
let cli = Cli::parse();
let _client = tracy_client::Client::start();
@@ -128,6 +114,9 @@ fn main() {
@@ -128,6 +114,10 @@ fn main() {
socket_name.to_string_lossy()
);
+ // Advise xdg-desktop-portal which *-portals.conf to load
+ env::set_var("XDG_CURRENT_DESKTOP", "niri");
+ env::set_var("XDG_SESSION_TYPE", "wayland");
+
if is_systemd_service {
// We're starting as a systemd service. Export our variables.