Skip to content

Commit

Permalink
x11-wm/niri: set XDG_SESSION_TYPE by default (a la niri-session)
Browse files Browse the repository at this point in the history
Smithay (unlike wlroots) doesn't seem to set XDG_SESSION_TYPE.
Mainly affects Qt which prefers XDG_SESSION_TYPE over WAYLAND_DISPLAY.
  • Loading branch information
jbeich committed Dec 1, 2023
1 parent 973d9f4 commit 3dee7e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x11-wm/niri/files/patch-no-systemd
Expand Up @@ -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.
Expand Down

0 comments on commit 3dee7e5

Please sign in to comment.