diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2015-10-11 09:49:45 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2015-10-11 09:49:51 +0200 |
commit | aa0711c1432432f178bfdad487a2aee592fd5a32 (patch) | |
tree | 87afd8281c46a846e627013380314303315ad019 /tdm/backend | |
parent | 799e7ef14d52df14ee6b9eea204aa186d6da60ae (diff) | |
download | tdebase-aa0711c1432432f178bfdad487a2aee592fd5a32.tar.gz tdebase-aa0711c1432432f178bfdad487a2aee592fd5a32.zip |
Add support for XDG_SESSION_DESKTOP and XDG_CURRENT_DESKTOP in TDM
This relates to Bug 2521
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'tdm/backend')
-rw-r--r-- | tdm/backend/client.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tdm/backend/client.c b/tdm/backend/client.c index 2676a5d2a..5a699738e 100644 --- a/tdm/backend/client.c +++ b/tdm/backend/client.c @@ -1222,7 +1222,7 @@ int StartClient() #endif { - const char *home, *sessargs, *desksess; + const char *home, *sessargs, *desksess, *deskname; char **env, *xma; char **argv, *fname, *str; #ifdef USE_PAM @@ -1681,6 +1681,7 @@ StartClient() GSendStr( desksess ); close( mstrtalk.pipe->wfd ); userEnviron = setEnv( userEnviron, "DESKTOP_SESSION", desksess ); + userEnviron = setEnv( userEnviron, "XDG_SESSION_DESKTOP", desksess ); for (i = 0; td->sessionsDirs[i]; i++) { fname = 0; if (StrApp( &fname, td->sessionsDirs[i], "/", desksess, ".desktop", (char *)0 )) { @@ -1688,6 +1689,10 @@ StartClient() if (!StrCmp( iniEntry( str, "Desktop Entry", "Hidden", 0 ), "true" ) || !(sessargs = iniEntry( str, "Desktop Entry", "Exec", 0 ))) sessargs = ""; + deskname = iniEntry( str, "Desktop Entry", "DesktopNames", 0 ); + if (deskname) { + userEnviron = setEnv( userEnviron, "XDG_CURRENT_DESKTOP", deskname ); + } free( str ); free( fname ); goto gotit; |