Merge lp:~darkxst/ubuntu/saucy/gdm/lp1212408 into lp:ubuntu/saucy/gdm

Proposed by Tim Lunn on 2013-08-31
Status: Merged
Merge reported by: Tim Lunn
Merged at revision: not available
Proposed branch: lp:~darkxst/ubuntu/saucy/gdm/lp1212408
Merge into: lp:ubuntu/saucy/gdm
Diff against target: 114 lines (+94/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/series (+1/-0)
debian/patches/ubuntu_export_XDG_CURRENT_DESKTOP.patch (+86/-0)
To merge this branch: bzr merge lp:~darkxst/ubuntu/saucy/gdm/lp1212408
Reviewer Review Type Date Requested Status
Ubuntu branches 2013-08-31 Pending
Review via email: mp+183303@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-07-30 20:04:14 +0000
3+++ debian/changelog 2013-08-31 03:04:04 +0000
4@@ -1,3 +1,10 @@
5+gdm (3.8.4-0ubuntu2) UNRELEASED; urgency=low
6+
7+ * debian/patches/ubuntu_export_XDG_CURRENT_DESKTOP.patch:
8+ - Set $XDG_CURRENT_DESKTOP if specified in the xsession file. (LP: #1212408)
9+
10+ -- Tim Lunn <tim@feathertop.org> Sat, 31 Aug 2013 13:01:11 +1000
11+
12 gdm (3.8.4-0ubuntu1) saucy; urgency=low
13
14 * New upstream release
15
16=== modified file 'debian/patches/series'
17--- debian/patches/series 2013-07-30 20:04:14 +0000
18+++ debian/patches/series 2013-08-31 03:04:04 +0000
19@@ -15,3 +15,4 @@
20 ubuntu_no_debug.patch
21 ubuntu_xresources_is_a_dir.patch
22 ubuntu_no_LANG_setting_in_Xsession.patch
23+ubuntu_export_XDG_CURRENT_DESKTOP.patch
24
25=== added file 'debian/patches/ubuntu_export_XDG_CURRENT_DESKTOP.patch'
26--- debian/patches/ubuntu_export_XDG_CURRENT_DESKTOP.patch 1970-01-01 00:00:00 +0000
27+++ debian/patches/ubuntu_export_XDG_CURRENT_DESKTOP.patch 2013-08-31 03:04:04 +0000
28@@ -0,0 +1,86 @@
29+From e6024432a560341ddae5ce6873b2030e6b6c886f Mon Sep 17 00:00:00 2001
30+From: Tim Lunn <tim@feathertop.org>
31+Date: Sat, 31 Aug 2013 12:12:12 +1000
32+Subject: [PATCH] session: export XDG_CURRENT_DESKTOP environment
33+
34+---
35+ daemon/gdm-session.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
36+ 1 file changed, 48 insertions(+)
37+
38+diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
39+index d74bed6..26b0c80 100644
40+--- a/daemon/gdm-session.c
41++++ b/daemon/gdm-session.c
42+@@ -2275,6 +2275,46 @@ get_session_command (GdmSession *self)
43+ return command;
44+ }
45+
46++char *
47++get_session_desktop_name (GdmSession *self)
48++{
49++ GError *error;
50++ GKeyFile *key_file;
51++ gboolean res;
52++ char *desktop_name = NULL;
53++ char *filename;
54++
55++ g_return_val_if_fail (self != NULL, FALSE);
56++ g_return_val_if_fail (GDM_IS_SESSION (self), FALSE);
57++
58++ filename = g_strdup_printf ("%s.desktop", get_session_name (self));
59++
60++ key_file = g_key_file_new ();
61++ error = NULL;
62++ res = g_key_file_load_from_dirs (key_file,
63++ filename,
64++ get_system_session_dirs (),
65++ NULL,
66++ G_KEY_FILE_NONE,
67++ &error);
68++ if (! res) {
69++ g_debug ("GdmSession: File '%s' not found: %s", filename, error->message);
70++ goto out;
71++ }
72++
73++ res = g_key_file_has_key (key_file, G_KEY_FILE_DESKTOP_GROUP, "X-LightDM-DesktopName", NULL);
74++ if (!res) {
75++ goto out;
76++ } else {
77++ desktop_name = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, "X-LightDM-DesktopName", NULL);
78++ }
79++
80++out:
81++ g_free (filename);
82++ return desktop_name;
83++}
84++
85++
86+ void
87+ gdm_session_set_environment_variable (GdmSession *self,
88+ const char *key,
89+@@ -2292,6 +2332,7 @@ static void
90+ setup_session_environment (GdmSession *self)
91+ {
92+ const char *locale;
93++ const char *desktop_name;
94+
95+ gdm_session_set_environment_variable (self,
96+ "GDMSESSION",
97+@@ -2299,6 +2340,13 @@ setup_session_environment (GdmSession *self)
98+ gdm_session_set_environment_variable (self,
99+ "DESKTOP_SESSION",
100+ get_session_name (self));
101++ desktop_name = get_session_desktop_name (self);
102++ if (desktop_name != NULL) {
103++ gdm_session_set_environment_variable (self,
104++ "XDG_CURRENT_DESKTOP",
105++ desktop_name);
106++ g_free (desktop_name);
107++ }
108+
109+ locale = get_language_name (self);
110+
111+--
112+1.8.3.2
113+
114+

Subscribers

People subscribed via source and target branches

to all changes: