1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
diff -Nurp lxdm-0.3.0.orig/src/lxdm.c lxdm-0.3.0/src/lxdm.c
--- lxdm-0.3.0.orig/src/lxdm.c 2011-07-03 01:53:26.262780480 +0200
+++ lxdm-0.3.0/src/lxdm.c 2011-07-03 01:52:11.975780526 +0200
@@ -1174,7 +1174,27 @@ gboolean lxdm_get_session_info(char *ses
}
else
{
- name=g_strdup(session);
+ GKeyFile *f;
+ char *file_path;
+ gboolean loaded;
+
+ f = g_key_file_new();
+ char *desktop_name = g_strconcat(session, ".desktop", NULL);
+ file_path = g_build_filename(XSESSIONS_DIR, desktop_name, NULL);
+ loaded = g_key_file_load_from_file(f, file_path, G_KEY_FILE_NONE, NULL);
+ g_free(file_path);
+ g_free(desktop_name);
+
+ if ( loaded )
+ {
+ name = g_key_file_get_locale_string(f, "Desktop Entry", "Name", NULL, NULL);
+ exec = g_key_file_get_string(f, "Desktop Entry", "Exec", NULL);
+ }
+ else
+ {
+ name=g_strdup(session);
+ }
+ g_key_file_free(f);
}
}
if(name && !exec)
|