[X2Go-Commits] [x2gothinclient] 01/01: . Launch MATE minidesktop via LightDM autologin feature. + Add D (x2gothinclient-minidesktop): lightdm.

git-admin at x2go.org git-admin at x2go.org
Wed Aug 27 13:00:47 CEST 2014


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2gothinclient.

commit ab119b5d4890be23672f7ffd25e3482eac7a1799
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Aug 27 13:00:25 2014 +0200

        . Launch MATE minidesktop via LightDM autologin feature. + Add D (x2gothinclient-minidesktop): lightdm.
---
 debian/changelog                                   |    5 +--
 debian/control                                     |    1 +
 debian/x2gothinclient-minidesktop.install          |    2 +-
 debian/x2gothinclient-minidesktop.postrm           |    3 ++
 debian/x2gothinclient-minidesktop.preinst          |    3 ++
 management/share/etc/x2gothinclient_init           |    7 ++-
 minidesktop/etc/lightdm.conf                       |   12 ++++++
 .../sbin/x2gothinclient-minidesktop-preseed        |   45 --------------------
 8 files changed, 27 insertions(+), 51 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 71de310..8438ff3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,7 @@ x2gothinclient (1.5.0.0-0x2go1) UNRELEASED; urgency=low
       . Provide init script for x2gothinclient-minidesktop to handle maintenance
         tasks if TCE is installed with in minidesktop flavour.
       . Tweak MATE minidesktop via GScheme overrides.
+      . Launch MATE minidesktop via LightDM autologin feature.
       . Add XDG autostart .desktop file for the TCE's X2Go Client.
       . Add VERSION.<package> file for x2gothinclient-minidesktop.
       . Make X2Go TCE layout / appearance overridable by installing
@@ -30,8 +31,6 @@ x2gothinclient (1.5.0.0-0x2go1) UNRELEASED; urgency=low
       . Use default X2Go Client background for x2gothinclient-minidesktop.
         Provide configurable desktop background instead. Install desktop
         background as desktop-base alternative.
-      . Launch x2gothinclient_init via nodm, which then launches the Xsession.
-        Provide preseeding for nodm bin:package.
       . On minidesktop TCE creation based on wheezy, pull in packages from
         wheezy-backports (i.e. MATE desktop environment).
       . MATE Application menu: Move the default X2Go Client .desktop file out of the
@@ -49,7 +48,7 @@ x2gothinclient (1.5.0.0-0x2go1) UNRELEASED; urgency=low
     + New bin:package: x2gothinclient-common. Commonly shared by
       x2gothinclient-minidesktop and x2gothinclient-displaymanager
     + Add D (displaymanager flavour, minidesktop flavour): pinentry-x2go.
-    + Add D (x2gothinclient-minidesktop): nodm.
+    + Add D (x2gothinclient-minidesktop): lightdm.
     + Add R (x2gothinclient-minidesktop): flashplugin-nonfree.
   * debian/copyright:
     + Use copyright-format 1.0.
diff --git a/debian/control b/debian/control
index 046b12e..67fd79f 100644
--- a/debian/control
+++ b/debian/control
@@ -103,6 +103,7 @@ Package: x2gothinclient-minidesktop
 Architecture: all
 Depends:
  ${misc:Depends},
+ lightdm,
  mate-desktop-environment-core,
  mate-icon-theme,
  mate-themes,
diff --git a/debian/x2gothinclient-minidesktop.install b/debian/x2gothinclient-minidesktop.install
index 3368ec4..87394da 100644
--- a/debian/x2gothinclient-minidesktop.install
+++ b/debian/x2gothinclient-minidesktop.install
@@ -1,5 +1,5 @@
 management/share/etc/x2gothinclient-minidesktop_* etc/x2go/
+minidesktop/etc/lightdm.conf etc/lightdm/
 minidesktop/desktop/x2gothinclient-minidesktop.desktop usr/share/applications/
-minidesktop/sbin/x2gothinclient-minidesktop-preseed usr/sbin/
 minidesktop/schema-overrides/* usr/share/glib-2.0/schemas/
 minidesktop/mate-panel-layout/* usr/share/mate-panel/layouts/
diff --git a/debian/x2gothinclient-minidesktop.postrm b/debian/x2gothinclient-minidesktop.postrm
index 4ad6506..ee23817 100755
--- a/debian/x2gothinclient-minidesktop.postrm
+++ b/debian/x2gothinclient-minidesktop.postrm
@@ -24,6 +24,9 @@ case "$1" in
 		if dpkg-divert --list | grep usr/lib/x2go/x2goclient 1>/dev/null 2>/dev/null; then
 			dpkg-divert --package x2gothinclient-minidesktop --remove /usr/bin/x2goclient
 		fi
+		if dpkg-divert --list | grep lightdm.conf.disabled-by-x2gotce 1>/dev/null 2>/dev/null; then
+			dpkg-divert --package x2gothinclient-minidesktop --remove /etc/lightdm/lightdm.conf
+		fi
 		;;
 	upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
 		;;
diff --git a/debian/x2gothinclient-minidesktop.preinst b/debian/x2gothinclient-minidesktop.preinst
index e274e43..559ca06 100755
--- a/debian/x2gothinclient-minidesktop.preinst
+++ b/debian/x2gothinclient-minidesktop.preinst
@@ -25,6 +25,9 @@ case "$1" in
 		if ! dpkg-divert --list | grep usr/lib/x2go/x2goclient 1>/dev/null 2>/dev/null; then
 			dpkg-divert --add --rename --package x2gothinclient-minidesktop --divert /usr/lib/x2go/x2goclient /usr/bin/x2goclient
 		fi
+		if ! dpkg-divert --list | grep lightdm.conf.disabled-by-x2gotce 1>/dev/null 2>/dev/null; then
+			dpkg-divert --add --rename --package x2gothinclient-minidesktop --divert /etc/lightdm/lightdm.conf.disabled-by-x2gotce /etc/lightdm/lightdm.conf
+		fi
 		;;
 	abort-upgrade)
 		;;
diff --git a/management/share/etc/x2gothinclient_init b/management/share/etc/x2gothinclient_init
index 950dab2..f927d1b 100755
--- a/management/share/etc/x2gothinclient_init
+++ b/management/share/etc/x2gothinclient_init
@@ -22,7 +22,10 @@
 
 if [ -z "$X2GO_HANDLE_DAEMON" ]; then
 	if [ -d ~x2gothinclient ]; then
-		rm -Rf ~x2gothinclient
+		find ~x2gothinclient -mindepth 1 -type f | egrep -v "(\.Xauthority|.dmrc)" | while read file; do
+			rm -vf "$file"
+		done
+		find ~x2gothinclient -mindepth 1 -type d -delete
 	fi
 	mkdir -p ~x2gothinclient
 	mkdir -p ~x2gothinclient/.x2goclient
@@ -49,5 +52,5 @@ if [ -z "$X2GO_HANDLE_DAEMON" ]; then
 fi
 
 if [ -e /usr/share/doc/x2gothinclient-minidesktop ]; then
-	STARTUP=mate-session /etc/X11/Xsession
+	. /etc/X11/Xsession
 fi
diff --git a/minidesktop/etc/lightdm.conf b/minidesktop/etc/lightdm.conf
new file mode 100644
index 0000000..94c20b8
--- /dev/null
+++ b/minidesktop/etc/lightdm.conf
@@ -0,0 +1,12 @@
+# Launch lightdm in autologin mode to facilitate the startup of the
+# X2Go TCE minimal MATE desktop...
+
+[SeatDefaults]
+xserver-allow-tcp=false
+greeter-session=lightdm-greeter
+greeter-hide-users=true
+user-session=mate
+session-wrapper=/etc/x2go/x2gothinclient_init
+autologin-user=x2gothinclient
+autologin-user-timeout=0
+pam-service=lightdm-autologin
diff --git a/minidesktop/sbin/x2gothinclient-minidesktop-preseed b/minidesktop/sbin/x2gothinclient-minidesktop-preseed
deleted file mode 100755
index cf4734f..0000000
--- a/minidesktop/sbin/x2gothinclient-minidesktop-preseed
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2014 by Mike Gabriel <mike.gabriel at it-zukunft-schule.de>
-
-# This script is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This script is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the
-# Free Software Foundation, Inc.,
-# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
-
-set -e
-
-do_preseed() {
-    pkg="$1"
-    template="$2"
-    type="$3"
-    value="$4"
-    echo "Preseeding $template to $value"
-    echo $pkg $template $type "$value" | debconf-set-selections || \
-        echo "Failed to load preseed '$template'" 1>&2
-}
-
-# we need to remove the nodm config as it gets parsed in via DebConf
-rm -f /etc/default/nodm
-
-# and finally preseed ocsinventory-agent
-do_preseed nodm nodm/enabled boolean true
-do_preseed nodm nodm/user string x2gothinclient
-do_preseed nodm nodm/first_vt string 5
-do_preseed nodm nodm/xsession string /etc/x2go/x2gothinclient_init
-
-echo "Silently running dpkg-reconfigure on package \"nodm\" ... "
-dpkg -l nodm 1>/dev/null 2>/dev/null && { 
-    dpkg-reconfigure -pcritical nodm && echo "DONE." || echo "FAILED!!!"
-} || echo "NEEDS INSTALL."
-echo

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gothinclient.git


More information about the x2go-commits mailing list