Sophie

Sophie

distrib > Mageia > 6 > i586 > by-pkgid > 3b73981b0707f2b4bf2beb867d2bcc41 > files > 4

lxde-common-0.99.2-1.mga6.src.rpm

--- lxde-common-0.5.6/startlxde.in.0108	2014-09-01 22:17:11.000000000 +0800
+++ lxde-common-0.5.6/startlxde.in	2014-09-05 19:18:35.525148457 +0800
@@ -11,9 +11,23 @@
 	cp @sysconfdir@/xdg/pcmanfm/LXDE/pcmanfm.conf "$PCMANFM_CONF_DIR/pcmanfm.conf"
 fi
 
-# Ensure the existance of openbox config file
+# Ensure the existance of Mageia Desktop icons at first run:
+# Logic is simple, $OPENBOX_CONF_DIR/lxde-rc.xml will be created
+# after first desktop files created. So, this code block will attempt
+# to detect $OPENBOX_CONF_DIR/lxde-rc.xml. If we run lxde session
+# for the first time there will be no $OPENBOX_CONF_DIR/lxde-rc.xml.
+# Then, this code block will create desktop icons and next code 
+# will create $OPENBOX_CONF_DIR/lxde-rc.xml file. At second login and afterwards, 
+# this code block will detect $OPENBOX_CONF_DIR/lxde-rc.xml and will do
+# nothing. Of course, if user prefers to delete $OPENBOX_CONF_DIR/lxde-rc.xml
+# this code block may give us a little headache. This should fix mga#5941
 OPENBOX_CONF_DIR="$XDG_CONFIG_HOME/openbox"
 if [ ! -f "$OPENBOX_CONF_DIR/lxde-rc.xml" ]; then
+	if [ -d @localstatedir@/lib/mageia/lxde-profiles/Desktop-icons ]; then
+		xdg-desktop-icon install --novendor @localstatedir@/lib/mageia/lxde-profiles/Desktop-icons/org.lxde.home.desktop
+		xdg-desktop-icon install --novendor @datadir@/dist/desktop-files/default/register.desktop
+	fi
+	# Ensure the existance of openbox config file:
 	mkdir -p "$OPENBOX_CONF_DIR"
 	cp @sysconfdir@/xdg/openbox/LXDE/rc.xml "$OPENBOX_CONF_DIR/lxde-rc.xml"
 fi