Fix for XDG Portal expecting XDG_CURRENT_DESKTOP to be set by the Desktop Manager

This commit is contained in:
Cookie Engineer 2024-03-08 17:12:28 +01:00
parent 4ee2b3ecc7
commit 3a56dabfde
1 changed files with 1 additions and 0 deletions

View File

@ -261,6 +261,7 @@ void env_xdg(const char* tty_id, const char* desktop_name)
{ {
char user[20]; char user[20];
snprintf(user, 20, "/run/user/%d", getuid()); snprintf(user, 20, "/run/user/%d", getuid());
setenv("XDG_CURRENT_DESKTOP", desktop_name, 0);
setenv("XDG_RUNTIME_DIR", user, 0); setenv("XDG_RUNTIME_DIR", user, 0);
setenv("XDG_SESSION_CLASS", "user", 0); setenv("XDG_SESSION_CLASS", "user", 0);
setenv("XDG_SESSION_ID", "1", 0); setenv("XDG_SESSION_ID", "1", 0);