From a3f5b3a4bda1aa378ff85e4466281d7609f14892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 11 Oct 2015 09:49:45 +0200 Subject: Add support for XDG_SESSION_DESKTOP and XDG_CURRENT_DESKTOP in TDM This relates to Bug 2521 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit aa0711c1432432f178bfdad487a2aee592fd5a32) --- tdm/backend/client.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tdm/backend') 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; -- cgit v1.2.1