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:50:40 +0200 |
commit | a3f5b3a4bda1aa378ff85e4466281d7609f14892 (patch) | |
tree | ecc06a418f48bd797ca9ba9c10b994d6b789ddc6 | |
parent | dfa23affa8f3de84b066368461833ba213b69f0d (diff) | |
download | tdebase-a3f5b3a4bda1aa378ff85e4466281d7609f14892.tar.gz tdebase-a3f5b3a4bda1aa378ff85e4466281d7609f14892.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>
(cherry picked from commit aa0711c1432432f178bfdad487a2aee592fd5a32)
-rw-r--r-- | tdm/backend/client.c | 7 | ||||
-rw-r--r-- | tdm/kfrontend/sessions/tde.desktop.cmake | 1 | ||||
-rw-r--r-- | tdm/kfrontend/sessions/tde.desktop.in | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/tdm/backend/client.c b/tdm/backend/client.c index 1dfd97849..33420f30a 100644 --- a/tdm/backend/client.c +++ b/tdm/backend/client.c @@ -1211,7 +1211,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 @@ -1667,6 +1667,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 )) { @@ -1674,6 +1675,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; diff --git a/tdm/kfrontend/sessions/tde.desktop.cmake b/tdm/kfrontend/sessions/tde.desktop.cmake index c23a33205..8eb5ede82 100644 --- a/tdm/kfrontend/sessions/tde.desktop.cmake +++ b/tdm/kfrontend/sessions/tde.desktop.cmake @@ -3,6 +3,7 @@ Encoding=UTF-8 Type=XSession Exec=@TDE_BIN_DIR@/starttde TryExec=@TDE_BIN_DIR@/starttde +DesktopNames=Trinity Name=TDE Name[hi]=केडीई Name[mn]=КДЭ diff --git a/tdm/kfrontend/sessions/tde.desktop.in b/tdm/kfrontend/sessions/tde.desktop.in index b9472453f..fd1e972b4 100644 --- a/tdm/kfrontend/sessions/tde.desktop.in +++ b/tdm/kfrontend/sessions/tde.desktop.in @@ -3,6 +3,7 @@ Encoding=UTF-8 Type=XSession Exec=@TDE_BINDIR@/starttde TryExec=@TDE_BINDIR@/starttde +DesktopNames=Trinity Name=Trinity Name[hi]=केडीई Name[mn]=КДЭ |