po/*.gmo
po/POTFILES
po/stamp-it
-src/display-glue.h
-src/display-manager-glue.h
-src/session-manager-glue.h
-src/user-manager-glue.h
-src/ldm-marshal.c
-src/ldm-marshal.h
+src/dm-tool
src/lightdm
src/lightdm-guest-session
tests/*.log
tests/src/plymouth
tests/src/test-gobject-greeter
tests/src/test-greeter-wrapper
+tests/src/test-guest-wrapper
tests/src/test-mir-greeter
tests/src/test-qt4-greeter
tests/src/test-qt5-greeter
tests/src/vnc-client
tests/src/X
tests/src/Xvnc
-utils/lightdm-set-defaults
-utils/dm-tool
if COMPILE_TESTS
SUBDIRS += tests
endif
-SUBDIRS += data po src doc help utils
+SUBDIRS += data po src doc help
DISTCHECK_CONFIGURE_FLAGS = --enable-introspection --enable-gtk-doc
src/Makefile
tests/Makefile
tests/src/Makefile
-utils/Makefile
])
AC_OUTPUT
apparmor/abstractions/lightdm_chromium-browser
dist_man1_MANS = dm-tool.1 \
- lightdm.1 \
- lightdm-set-defaults.1
+ lightdm.1
EXTRA_DIST = apparmor/lightdm-guest-session.in
CLEANFILES = lightdm-guest-session
.B add-seat TYPE [NAME=VALUE...]
Add a dynamic seat.
.SH SEE ALSO
-.BR lightdm (1),
-.BR lightdm-set-defaults (1)
+.BR lightdm (1)
+++ /dev/null
-.TH LIGHTDM-SET-DEFAULTS 1 "7 November 2013"
-.SH NAME
-lightdm-set-defaults \- sets configuration options for lightdm
-.SH SYNOPSIS
-.B lightdm-set-defaults
-[
-.I OPTION
-]
-.SH DESCRIPTION
-.B lightdm-set-defaults
-sets configuration options for lightdm. Requires root permissions to run.
-.SH OPTIONS
-.TP
-.B \-h, \-\-help
-Show help options
-.TP
-.B \-k, \-\-keep\-old
-Only update if no default already set
-.TP
-.B \-d, \-\-debug
-Enable debugging messages
-.TP
-.B \-r, \-\-remove
-Remove default value if it's the current one
-.TP
-.B \-s, \-\-session=SESSION_NAME
-Set the default session to SESSION_NAME
-.TP
-.B \-g, \-\-greeter=GREETER_NAME
-Set the default greeter to GREETER_NAME
-.TP
-.B \-a, \-\-autologin=USERNAME
-Set the autologin user to USERNAME
-.TP
-.B \-i, \-\-hide\-users=<true|false>
-Set greeter-hide-users to true or false.
-.TP
-.B \-m, \-\-show\-manual\-login=<true|false>
-Set show-manual-login to true or false.
-.TP
-.B \-R, \-\-show\-remote\-login=<true|false>
-Set show-manual-login to true or false.
-.TP
-.B \-l, \-\-allow\-guest=<true|false>
-Set allow-guest to true or false.
-.SH FILES
-.TP
-.B /etc/lightdm/lightdm.conf
-Configuration
-.SH SEE ALSO
-.BR lightdm (1),
-.BR dm-tool (1)
.B /etc/lightdm/keys.conf
XDMCP keys
.SH SEE ALSO
-.BR dm-tool (1),
-.BR lightdm-set-defaults (1)
+.BR dm-tool (1)
# stdout, which can confuse debconf.
db_stop
-# migrate gdm configuration on first-time installation
-if [ -z "$2" ]; then
- if grep -q '^AutomaticLoginEnable *= *true$' /etc/gdm/custom.conf 2>/dev/null; then
- user=`sed -n '/^AutomaticLogin *=/ { s/^.*= *//; p }' /etc/gdm/custom.conf`
- if [ -n "$user" ]; then
- /usr/lib/lightdm/lightdm-set-defaults --keep-old --autologin="$user"
- fi
- fi
-fi
-
case "$1" in
configure)
# LP: #1189948
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"Project-Id-Version: lightdm\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2007-05-31 08:04+0200\n"
-"PO-Revision-Date: 2010-12-31 05:34+0000\n"
+"PO-Revision-Date: 2013-11-17 12:32+0000\n"
"Last-Translator: Adolfo Jayme Barrientos <fitoschido@gmail.com>\n"
"Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-18 05:39+0000\n"
+"X-Generator: Launchpad (build 16831)\n"
#. Type: select
#. Description
#: ../lightdm.templates:2001
msgid "Default display manager:"
-msgstr ""
+msgstr "Gestor de sesiones predeterminado:"
#. Type: select
#. Description
"A display manager is a program that provides graphical login capabilities "
"for the X Window System."
msgstr ""
+"Un gestor de sesiones es un programa que provee al Sistema de ventanas X de "
+"una forma gráfica de iniciar una sesión."
#. Type: select
#. Description
"manager packages are installed. Please select which display manager should "
"run by default."
msgstr ""
+"Solo un gestor de sesiones puede gestionar un servidor X dado, pero hay "
+"varios gestores instalados. Elija cuál quiere ejecutar de manera "
+"predeterminada."
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:42+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
"Language: sr\n"
#. Type: select
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-11-02 06:07+0000\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
"X-Generator: Launchpad (build 16820)\n"
#. Type: select
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-10-23 04:43+0000\n"
-"X-Generator: Launchpad (build 16810)\n"
+"X-Launchpad-Export-Date: 2013-11-14 05:54+0000\n"
+"X-Generator: Launchpad (build 16820)\n"
#. Type: select
#. Description
rm -r debian/tmp/usr/share/help/C/
# we do install pam through installpam and init through installinit
dh_install -X.a -X.la -Xpam.d -X'etc/init/lightdm.conf' --fail-missing
- mv debian/lightdm/usr/lib/lightdm/lightdm/lightdm-set-defaults debian/lightdm/usr/lib/lightdm
chmod +x debian/lightdm/usr/lib/lightdm/lightdm-greeter-session
override_dh_installinit:
# Please keep this file sorted alphabetically.
[encoding: UTF-8]
src/lightdm.c
-utils/lightdm-set-defaults.c
utils/dm-tool.c
sbin_PROGRAMS = lightdm
+bin_PROGRAMS = dm-tool
lightdm_SOURCES = \
accounts.c \
lightdm_CFLAGS = \
$(LIGHTDM_CFLAGS) \
$(WARN_CFLAGS) \
- -DPKGLIBEXEC_DIR=\"$(pkglibexecdir)\" \
-DSBIN_DIR=\"$(sbindir)\" \
-DCONFIG_DIR=\"$(sysconfdir)/lightdm\" \
-DLOG_DIR=\"$(localstatedir)/log/lightdm\" \
-lgcrypt \
-lpam
+dm_tool_SOURCES = \
+ dm-tool.c
+
+dm_tool_CFLAGS = \
+ $(LIGHTDM_CFLAGS) \
+ -DCONFIG_DIR=\"$(sysconfdir)/lightdm\" \
+ -DLOCALE_DIR=\"$(datadir)/locale\"
+
+dm_tool_LDADD = \
+ $(LIGHTDM_LIBS)
+
libexec_PROGRAMS = lightdm-guest-session
lightdm_guest_session_SOURCES = lightdm-guest-session.c
return g_key_file_get_string (config->priv->key_file, section, key, NULL);
}
+void
+config_set_string_list (Configuration *config, const gchar *section, const gchar *key, const gchar **value, gsize length)
+{
+ g_key_file_set_string_list (config->priv->key_file, section, key, value, length);
+}
+
+gchar **
+config_get_string_list (Configuration *config, const gchar *section, const gchar *key)
+{
+ return g_key_file_get_string_list (config->priv->key_file, section, key, NULL, NULL);
+}
+
void
config_set_integer (Configuration *config, const gchar *section, const gchar *key, gint value)
{
gchar *config_get_string (Configuration *config, const gchar *section, const gchar *key);
+void config_set_string_list (Configuration *config, const gchar *section, const gchar *key, const gchar **value, gsize length);
+
+gchar **config_get_string_list (Configuration *config, const gchar *section, const gchar *key);
+
void config_set_integer (Configuration *config, const gchar *section, const gchar *key, gint value);
gint config_get_integer (Configuration *config, const gchar *section, const gchar *key);
g_free (path);
}
+static void
+set_seat_properties (Seat *seat, const gchar *config_section)
+{
+ gchar **keys;
+ gint i;
+
+ keys = config_get_keys (config_get_instance (), "SeatDefaults");
+ for (i = 0; keys[i]; i++)
+ {
+ gchar *value = config_get_string (config_get_instance (), "SeatDefaults", keys[i]);
+ seat_set_property (seat, keys[i], value);
+ g_free (value);
+ }
+ g_strfreev (keys);
+
+ if (config_section)
+ {
+ keys = config_get_keys (config_get_instance (), config_section);
+ for (i = 0; keys[i]; i++)
+ {
+ gchar *value = config_get_string (config_get_instance (), config_section, keys[i]);
+ seat_set_property (seat, keys[i], value);
+ g_free (value);
+ }
+ g_strfreev (keys);
+ }
+}
+
static void
signal_cb (Process *process, int signum)
{
static void
display_manager_seat_removed_cb (DisplayManager *display_manager, Seat *seat)
{
- if (seat_get_boolean_property (seat, "exit-on-failure"))
+ gchar **types;
+ gchar **iter;
+ Seat *next_seat = NULL;
+ GString *next_types;
+
+ /* If we have fallback types registered for the seat, let's try them
+ before giving up. */
+ types = seat_get_string_list_property (seat, "type");
+ next_types = g_string_new ("");
+ for (iter = types; iter && *iter; iter++)
+ {
+ if (iter == types)
+ continue; // skip first one, that is our current seat type
+
+ if (!next_seat)
+ {
+ next_seat = seat_new (*iter);
+ g_string_assign (next_types, *iter);
+ }
+ else
+ {
+ // Build up list of types to try next time
+ g_string_append_c (next_types, ';');
+ g_string_append (next_types, *iter);
+ }
+ }
+ g_strfreev (types);
+
+ if (next_seat)
+ {
+ const gchar *seat_name;
+ gchar *config_section = NULL;
+
+ seat_name = seat_get_string_property (seat, "seat-name");
+ if (seat_name)
+ config_section = g_strdup_printf ("Seat:%s", seat_name);
+ set_seat_properties (next_seat, config_section);
+ g_free (config_section);
+
+ // We set this manually on default seat. Let's port it over if needed.
+ if (seat_get_boolean_property (seat, "exit-on-failure"))
+ seat_set_property (next_seat, "exit-on-failure", "true");
+
+ seat_set_property (next_seat, "type", next_types->str);
+
+ display_manager_add_seat (display_manager, next_seat);
+ g_object_unref (next_seat);
+ }
+ else if (seat_get_boolean_property (seat, "exit-on-failure"))
{
g_debug ("Required seat has stopped");
exit_code = EXIT_FAILURE;
display_manager_stop (display_manager);
}
+
+ g_string_free (next_types, TRUE);
}
static GVariant *
return result;
}
-static void
-set_seat_properties (Seat *seat, const gchar *config_section)
-{
- gchar **keys;
- gint i;
-
- keys = config_get_keys (config_get_instance (), "SeatDefaults");
- for (i = 0; keys[i]; i++)
- {
- gchar *value = config_get_string (config_get_instance (), "SeatDefaults", keys[i]);
- seat_set_property (seat, keys[i], value);
- g_free (value);
- }
- g_strfreev (keys);
-
- if (config_section)
- {
- keys = config_get_keys (config_get_instance (), config_section);
- for (i = 0; keys[i]; i++)
- {
- gchar *value = config_get_string (config_get_instance (), config_section, keys[i]);
- seat_set_property (seat, keys[i], value);
- g_free (value);
- }
- g_strfreev (keys);
- }
-}
-
static void
handle_display_manager_call (GDBusConnection *connection,
const gchar *sender,
for (i = groups; *i; i++)
{
gchar *config_section = *i;
- gchar *type;
- Seat *seat;
+ gchar **types;
+ gchar **type;
+ Seat *seat = NULL;
const gchar *const seatpfx = "Seat:";
if (!g_str_has_prefix (config_section, seatpfx))
continue;
g_debug ("Loading seat %s", config_section);
- type = config_get_string (config_get_instance (), config_section, "type");
- if (!type)
- type = config_get_string (config_get_instance (), "SeatDefaults", "type");
- seat = seat_new (type);
- g_free (type);
+ types = config_get_string_list (config_get_instance (), config_section, "type");
+ if (!types)
+ types = config_get_string_list (config_get_instance (), "SeatDefaults", "type");
+ for (type = types; type && *type; type++)
+ {
+ seat = seat_new (*type);
+ if (seat)
+ break;
+ }
+ g_strfreev (types);
if (seat)
{
const gsize seatpfxlen = strlen(seatpfx);
/* If no seats start a default one */
if (n_seats == 0 && config_get_boolean (config_get_instance (), "LightDM", "start-default-seat"))
{
- gchar *type;
- Seat *seat;
+ gchar **types;
+ gchar **type;
+ Seat *seat = NULL;
g_debug ("Adding default seat");
- type = config_get_string (config_get_instance (), "SeatDefaults", "type");
- seat = seat_new (type);
- g_free (type);
+ types = config_get_string_list (config_get_instance (), "SeatDefaults", "type");
+ for (type = types; type && *type; type++)
+ {
+ seat = seat_new (*type);
+ if (seat)
+ break;
+ }
+ g_strfreev (types);
if (seat)
{
set_seat_properties (seat, NULL);
}
else
{
- g_warning ("Failed to create default seat %s", type);
+ g_warning ("Failed to create default seat");
return EXIT_FAILURE;
}
}
static DisplayServer *
seat_surfaceflinger_create_display_server (Seat *seat, const gchar *session_type)
-{
- if (strcmp (session_type, "surfaceflinger") == 0)
+{
+ /* Allow mir types too, because Mir sessions usually support surfaceflinger
+ as an alternate mode, since Mir is frequently used on phones. */
+ if (strcmp (session_type, "surfaceflinger") == 0 || strcmp (session_type, "mir") == 0)
return DISPLAY_SERVER (surfaceflinger_server_new ());
else
{
gint next_x_server_id;
gint next_greeter_id;
- /* TRUE if using VT switching fallback */
- gboolean use_vt_switching;
-
/* The currently visible session */
Session *active_session;
DisplayServer *active_display_server;
return;
}
- /* If stopped before it was ready, then revert to VT mode */
- if (!seat->priv->compositor_ready)
- {
- l_debug (seat, "Compositor failed to start, switching to VT mode");
- seat->priv->use_vt_switching = TRUE;
- SEAT_CLASS (seat_unity_parent_class)->start (SEAT (seat));
- return;
- }
-
l_debug (seat, "Stopping Unity seat, compositor terminated");
seat_stop (SEAT (seat));
const gchar *command = NULL, *layout = NULL, *config_file = NULL, *xdmcp_manager = NULL, *key_name = NULL, *xdg_seat = NULL;
gboolean allow_tcp;
gint port = 0;
+ gchar *id;
l_debug (seat, "Starting X server on Unity compositor");
if (command)
x_server_local_set_command (x_server, command);
- if (SEAT_UNITY (seat)->priv->use_vt_switching)
- x_server_local_set_vt (x_server, vt_get_unused ());
- else
- {
- gchar *id;
-
- id = g_strdup_printf ("x-%d", SEAT_UNITY (seat)->priv->next_x_server_id);
- SEAT_UNITY (seat)->priv->next_x_server_id++;
- x_server_local_set_mir_id (x_server, id);
- x_server_local_set_mir_socket (x_server, SEAT_UNITY (seat)->priv->mir_socket_filename);
- g_free (id);
- }
+ id = g_strdup_printf ("x-%d", SEAT_UNITY (seat)->priv->next_x_server_id);
+ SEAT_UNITY (seat)->priv->next_x_server_id++;
+ x_server_local_set_mir_id (x_server, id);
+ x_server_local_set_mir_socket (x_server, SEAT_UNITY (seat)->priv->mir_socket_filename);
+ g_free (id);
layout = seat_get_string_property (seat, "xserver-layout");
if (layout)
mir_server = mir_server_new ();
mir_server_set_parent_socket (mir_server, SEAT_UNITY (seat)->priv->mir_socket_filename);
- if (SEAT_UNITY (seat)->priv->use_vt_switching)
- mir_server_set_vt (mir_server, vt_get_unused ());
-
return DISPLAY_SERVER (mir_server);
}
Greeter *greeter_session;
const gchar *xdg_seat;
gchar *id;
- gint vt = -1;
+ gint vt;
greeter_session = SEAT_CLASS (seat_unity_parent_class)->create_greeter_session (seat);
xdg_seat = seat_get_string_property (seat, "xdg-seat");
session_set_env (SESSION (greeter_session), "MIR_SERVER_NAME", id);
g_free (id);
- if (!SEAT_UNITY (seat)->priv->use_vt_switching)
- vt = SEAT_UNITY (seat)->priv->vt;
-
+ vt = SEAT_UNITY (seat)->priv->vt;
if (vt >= 0)
{
gchar *value = g_strdup_printf ("%d", vt);
Session *session;
const gchar *xdg_seat;
gchar *id;
- gint vt = -1;
+ gint vt;
session = SEAT_CLASS (seat_unity_parent_class)->create_session (seat);
xdg_seat = seat_get_string_property (seat, "xdg-seat");
session_set_env (session, "MIR_SERVER_NAME", id);
g_free (id);
- if (!SEAT_UNITY (seat)->priv->use_vt_switching)
- vt = SEAT_UNITY (seat)->priv->vt;
-
+ vt = SEAT_UNITY (seat)->priv->vt;
if (vt >= 0)
{
gchar *value = g_strdup_printf ("%d", vt);
{
DisplayServer *display_server;
- /* If no compositor, have to use VT switching */
- if (SEAT_UNITY (seat)->priv->use_vt_switching)
- {
- gint vt = display_server_get_vt (session_get_display_server (session));
- if (vt >= 0)
- vt_set_active (vt);
-
- SEAT_CLASS (seat_unity_parent_class)->set_active_session (seat, session);
- return;
- }
-
if (session == SEAT_UNITY (seat)->priv->active_session)
return;
SEAT_UNITY (seat)->priv->active_session = g_object_ref (session);
static Session *
seat_unity_get_active_session (Seat *seat)
{
- if (SEAT_UNITY (seat)->priv->use_vt_switching)
- {
- gint vt;
- GList *link;
- vt = vt_get_active ();
- if (vt < 0)
- return NULL;
-
- for (link = seat_get_sessions (seat); link; link = link->next)
- {
- Session *session = link->data;
- if (display_server_get_vt (session_get_display_server (session)) == vt)
- return session;
- }
-
- return NULL;
- }
-
return SEAT_UNITY (seat)->priv->active_session;
}
if (!session)
return;
- /* If no compositor, don't worry about it */
- if (SEAT_UNITY (seat)->priv->use_vt_switching)
- return;
-
display_server = session_get_display_server (session);
if (IS_X_SERVER_LOCAL (display_server))
return g_hash_table_lookup (seat->priv->properties, name);
}
+gchar **
+seat_get_string_list_property (Seat *seat, const gchar *name)
+{
+ g_return_val_if_fail (seat != NULL, NULL);
+ return g_strsplit (g_hash_table_lookup (seat->priv->properties, name), ";", 0);
+}
+
gboolean
seat_get_boolean_property (Seat *seat, const gchar *name)
{
DisplayServer *display_server;
display_server = create_display_server (seat, session_get_session_type (session));
+ session_set_display_server (session, display_server);
if (!display_server_start (display_server))
{
l_debug (seat, "Failed to start display server for greeter");
seat_stop (seat);
}
-
- session_set_display_server (session, display_server);
}
start_session (seat, SESSION (greeter_session));
return FALSE;
display_server = create_display_server (seat, session_get_session_type (session));
- if (!display_server_start (display_server))
- return FALSE;
if (seat->priv->session_to_activate)
g_object_unref (seat->priv->session_to_activate);
session_set_pam_service (session, AUTOLOGIN_SERVICE);
session_set_display_server (session, display_server);
- return TRUE;
+ return display_server_start (display_server);
}
gboolean
return FALSE;
display_server = create_display_server (seat, session_get_session_type (SESSION (greeter_session)));
- if (!display_server_start (display_server))
- return FALSE;
if (seat->priv->session_to_activate)
g_object_unref (seat->priv->session_to_activate);
greeter_set_hint (greeter_session, "select-user", username);
session_set_display_server (SESSION (greeter_session), display_server);
- return TRUE;
+ return display_server_start (display_server);
}
void
const gchar *seat_get_string_property (Seat *seat, const gchar *name);
+gchar **seat_get_string_list_property (Seat *seat, const gchar *name);
+
gboolean seat_get_boolean_property (Seat *seat, const gchar *name);
gint seat_get_integer_property (Seat *seat, const gchar *name);
g_free (value);
}
- /* Put our tools directory in the path as a hack so we can use the legacy gdmflexiserver interface */
- path = pam_getenv (pam_handle, "PATH");
- if (path)
- pam_putenv (pam_handle, g_strdup_printf ("PATH=%s:%s", PKGLIBEXEC_DIR, path));
-
/* Catch terminate signal and pass it to the child */
signal (SIGTERM, signal_cb);
test-xdg-current-desktop \
test-xdg-seat \
test-language-env \
- test-util-path \
test-session-stdout \
test-session-stderr \
test-session-stderr-multi-write \
test-unity-compositor-command \
test-unity-compositor-fail-start \
test-unity-compositor-fail-ready \
+ test-unity-compositor-fallback \
test-unity-compositor-next-session \
test-unity-compositor-mir-next-session \
test-unity-autologin \
test-unity-mir-autologin \
test-unity-mir-greeter-x-session \
test-unity-mir-greeter-mir-session \
+ test-unity-mir-lock-seat \
test-unity-mir-session-x-greeter \
test-unity-xdg-seat \
test-surfaceflinger-autologin
scripts/unity-compositor-command.conf \
scripts/unity-compositor-fail-ready.conf \
scripts/unity-compositor-fail-start.conf \
+ scripts/unity-compositor-fallback.conf \
scripts/unity-compositor-mir-next-session.conf \
scripts/unity-compositor-next-session.conf \
scripts/unity-login.conf \
scripts/unity-mir-autologin.conf \
scripts/unity-mir-greeter-mir-session.conf \
+ scripts/unity-mir-lock-seat.conf \
scripts/unity-mir-greeter-x-session.conf \
scripts/unity-mir-session-x-greeter.conf \
scripts/unity-plymouth.conf \
scripts/user-layout.conf \
scripts/user-logged-in.conf \
scripts/user-name.conf \
- scripts/util-path.conf \
scripts/user-renamed.conf \
scripts/user-renamed-invalid.conf \
scripts/user-session.conf \
#
-# Check falls back to VT switching when the compositor fails to indicate it is ready
+# Check clean stop when the compositor fails to indicate it is ready
#
[SeatDefaults]
# Timeout and compositor is stopped
#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
-# X server starts in VT mode
-#?XSERVER-0 START VT=7
-
-# Daemon connects when X server is ready
-#?*XSERVER-0 INDICATE-READY
-#?XSERVER-0 INDICATE-READY
-#?XSERVER-0 ACCEPT-CONNECT
-
-# Greeter starts
-#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?XSERVER-0 ACCEPT-CONNECT
-#?GREETER-X-0 CONNECT-XSERVER
-#?GREETER-X-0 CONNECT-TO-DAEMON
-#?GREETER-X-0 CONNECTED-TO-DAEMON
-
# Cleanup
-#?*STOP-DAEMON
-#?GREETER-X-0 TERMINATE SIGNAL=15
-#?XSERVER-0 TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
+#?RUNNER DAEMON-EXIT STATUS=1
#
-# Check falls back to VT switching when the compositor fails to start
+# Check clean stop when the compositor fails to start
#
[unity-system-compositor-config]
#?UNITY-SYSTEM-COMPOSITOR START VT=7 XDG_VTNR=7
#?UNITY-SYSTEM-COMPOSITOR EXIT CODE=1
-# X server starts in VT mode
-#?XSERVER-0 START VT=7
-
-# Daemon connects when X server is ready
-#?*XSERVER-0 INDICATE-READY
-#?XSERVER-0 INDICATE-READY
-#?XSERVER-0 ACCEPT-CONNECT
-
-# Greeter starts
-#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
-#?XSERVER-0 ACCEPT-CONNECT
-#?GREETER-X-0 CONNECT-XSERVER
-#?GREETER-X-0 CONNECT-TO-DAEMON
-#?GREETER-X-0 CONNECTED-TO-DAEMON
-
# Cleanup
-#?*STOP-DAEMON
-#?GREETER-X-0 TERMINATE SIGNAL=15
-#?XSERVER-0 TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
+#?RUNNER DAEMON-EXIT STATUS=1
--- /dev/null
+#
+# Check seat type falls back when the compositor fails to start
+#
+
+[unity-system-compositor-config]
+return-value=1
+
+[SeatDefaults]
+type=unity;INVALID;unity;xlocal;
+
+#?RUNNER DAEMON-START
+
+# System compositor fails to start
+#?UNITY-SYSTEM-COMPOSITOR START VT=7 XDG_VTNR=7
+#?UNITY-SYSTEM-COMPOSITOR EXIT CODE=1
+
+# System compositor fails to start a second time
+#?UNITY-SYSTEM-COMPOSITOR START VT=7 XDG_VTNR=7
+#?UNITY-SYSTEM-COMPOSITOR EXIT CODE=1
+
+# X server starts in VT mode
+#?XSERVER-0 START VT=7
+
+# Daemon connects when X server is ready
+#?*XSERVER-0 INDICATE-READY
+#?XSERVER-0 INDICATE-READY
+#?XSERVER-0 ACCEPT-CONNECT
+
+# Greeter starts
+#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
+#?XSERVER-0 ACCEPT-CONNECT
+#?GREETER-X-0 CONNECT-XSERVER
+#?GREETER-X-0 CONNECT-TO-DAEMON
+#?GREETER-X-0 CONNECTED-TO-DAEMON
+
+# Cleanup
+#?*STOP-DAEMON
+#?GREETER-X-0 TERMINATE SIGNAL=15
+#?XSERVER-0 TERMINATE SIGNAL=15
+#?RUNNER DAEMON-EXIT STATUS=0
--- /dev/null
+#
+# Check can lock a seat from D-Bus with Mir
+#
+
+[SeatDefaults]
+autologin-user=have-password1
+type=unity
+user-session=mir
+
+#?RUNNER DAEMON-START
+
+# System compositor starts
+#?UNITY-SYSTEM-COMPOSITOR START VT=7 XDG_VTNR=7
+#?*UNITY-SYSTEM-COMPOSITOR READY
+
+# Session starts
+#?SESSION-MIR-session-0 START XDG_SEAT=seat0 XDG_VTNR=7 DESKTOP_SESSION=mir USER=have-password1
+
+# System compositor switches to session
+#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=session-0
+
+# Lock the seat
+#?*SESSION-MIR-session-0 LOCK-SEAT
+#?SESSION-MIR-session-0 LOCK-SEAT
+
+# Session is locked
+#?LOGIN1 LOCK-SESSION
+
+# Greeter starts
+#?GREETER-MIR-greeter-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
+#?GREETER-MIR-greeter-0 CONNECT-TO-DAEMON
+#?GREETER-MIR-greeter-0 CONNECTED-TO-DAEMON
+#?GREETER-MIR-greeter-0 LOCK-HINT
+
+# Switch to greeter
+#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=greeter-0
+
+# Cleanup
+#?*STOP-DAEMON
+#?GREETER-MIR-greeter-0 TERMINATE SIGNAL=15
+#?SESSION-MIR-session-0 TERMINATE SIGNAL=15
+#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
+#?RUNNER DAEMON-EXIT STATUS=0
+++ /dev/null
-#
-# Check utility path is set in session
-#
-
-[SeatDefaults]
-autologin-user=have-password1
-user-session=default
-
-#?RUNNER DAEMON-START
-
-# X server starts
-#?XSERVER-0 START VT=7
-
-# Daemon connects when X server is ready
-#?*XSERVER-0 INDICATE-READY
-#?XSERVER-0 INDICATE-READY
-#?XSERVER-0 ACCEPT-CONNECT
-
-# Session starts
-#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 DESKTOP_SESSION=default USER=have-password1
-#?XSERVER-0 ACCEPT-CONNECT
-#?SESSION-X-0 CONNECT-XSERVER
-
-# Check utility path is there
-#?*SESSION-X-0 READ-ENV NAME=PATH
-# FIXME: This is a really crap regex and the path could be overridden in the configure stage
-#?SESSION-X-0 READ-ENV NAME=PATH VALUE=.*/lightdm:.*
-
-# Cleanup
-#?*STOP-DAEMON
-#?SESSION-X-0 TERMINATE SIGNAL=15
-#?XSERVER-0 TERMINATE SIGNAL=15
-#?RUNNER DAEMON-EXIT STATUS=0
--- /dev/null
+#!/bin/sh
+./src/dbus-env ./src/test-runner unity-compositor-fallback test-gobject-greeter
--- /dev/null
+#!/bin/sh
+./src/dbus-env ./src/test-runner unity-mir-lock-seat test-mir-greeter
+++ /dev/null
-#!/bin/sh
-./src/dbus-env ./src/test-runner util-path test-gobject-greeter
+++ /dev/null
-bin_PROGRAMS = dm-tool
-pkglibexec_PROGRAMS = lightdm-set-defaults
-legacydir = $(libexecdir)/lightdm
-dist_legacy_SCRIPTS = gdmflexiserver
-
-dm_tool_SOURCES = \
- dm-tool.c
-
-dm_tool_CFLAGS = \
- $(LIGHTDM_CFLAGS) \
- -DCONFIG_DIR=\"$(sysconfdir)/lightdm\" \
- -DLOCALE_DIR=\"$(datadir)/locale\"
-
-dm_tool_LDADD = \
- $(LIGHTDM_LIBS)
-
-lightdm_set_defaults_SOURCES = \
- lightdm-set-defaults.c
-
-lightdm_set_defaults_CFLAGS = \
- $(LIGHTDM_CFLAGS) \
- -DCONFIG_DIR=\"$(sysconfdir)/lightdm\" \
- -DLOCALE_DIR=\"$(datadir)/locale\"
-
-lightdm_set_defaults_LDADD = \
- $(LIGHTDM_LIBS)
-
-DISTCLEANFILES = \
- Makefile.in
-
+++ /dev/null
-#!/bin/sh
-#
-# Copyright (C) 2011 Canonical Ltd
-# Author: Michael Terry <michael.terry@canonical.com>
-#
-# This program 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, version 3 of the License.
-#
-# See http://www.gnu.org/copyleft/gpl.html for the full text of the license.
-
-if [ -z "$XDG_SEAT_PATH" ]; then
- # something went wrong
- exit 1
-fi
-
-dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.DisplayManager $XDG_SEAT_PATH org.freedesktop.DisplayManager.Seat.SwitchToGreeter
+++ /dev/null
-/*
- * Copyright (C) 2011 Didier Roche.
- * Author: Didier Roche <didrocks@ubuntu.com>
- *
- * This program 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 3 of the License, or (at your option) any later
- * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
- * license.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <unistd.h>
-
-#include <glib.h>
-#include <glib/gi18n.h>
-
-#define SEATDEFAULT_KEY_GROUP "SeatDefaults"
-#define TYPE_KEY_NAME "type"
-#define SESSION_KEY_NAME "user-session"
-#define GREETER_KEY_NAME "greeter-session"
-#define AUTOLOGIN_KEY_NAME "autologin-user"
-#define HIDE_USERS_KEY_NAME "greeter-hide-users"
-#define MANUAL_LOGIN_KEY_NAME "greeter-show-manual-login"
-#define REMOTE_LOGIN_KEY_NAME "greeter-show-remote-login"
-#define ALLOW_GUEST_KEY_NAME "allow-guest"
-
-#define IS_STRING_EMPTY(x) ((x)==NULL||(x)[0]=='\0')
-
-static gboolean debug = FALSE;
-static gboolean keep_old = FALSE;
-static gboolean remove = FALSE;
-static gboolean hide_users = FALSE;
-static gboolean show_manual_login = FALSE;
-static gboolean show_remote_login = FALSE;
-static gboolean allow_guest = FALSE;
-
-static char *type = NULL;
-static char *session = NULL;
-static char *greeter = NULL;
-static char *autologin = NULL;
-static char *str_hide_users = NULL;
-static char *str_show_manual_login = NULL;
-static char *str_show_remote_login = NULL;
-static char *str_allow_guest = NULL;
-
-static GOptionEntry entries[] =
-{
- { "debug", 'd', 0, G_OPTION_ARG_NONE, &debug, N_("Enable debugging"), NULL },
- { "keep-old", 'k', 0, G_OPTION_ARG_NONE, &keep_old, N_("Only update if no default already set"), NULL },
- { "remove", 'r', 0, G_OPTION_ARG_NONE, &remove, N_("Remove default value if it's the current one"), NULL },
- { "type", 't', 0, G_OPTION_ARG_STRING, &type, N_("Set default seat type"), NULL },
- { "session", 's', 0, G_OPTION_ARG_STRING, &session, N_("Set default session"), NULL },
- { "greeter", 'g', 0, G_OPTION_ARG_STRING, &greeter, N_("Set default greeter"), NULL },
- { "autologin",'a', 0, G_OPTION_ARG_STRING, &autologin, N_("Set autologin user"), NULL },
- { "hide-users",'i', 0, G_OPTION_ARG_STRING, &str_hide_users, N_("Set greeter-hide-users to true or false"), NULL },
- { "show-manual-login",'m', 0, G_OPTION_ARG_STRING, &str_show_manual_login, N_("Set show-manual-login to true or false"), NULL },
- { "show-remote-login",'R', 0, G_OPTION_ARG_STRING, &str_show_remote_login, N_("Set show-remote-login to true or false"), NULL },
- { "allow-guest",'l', 0, G_OPTION_ARG_STRING, &str_allow_guest, N_("Set allow-guest to true or false"), NULL },
- { NULL }
-};
-
-void
-show_nothing(const gchar *log_domain,
- GLogLevelFlags log_level,
- const gchar *message,
- gpointer unused_data) {};
-
-int
-update_boolean(const gboolean new_value,
- gboolean keep_old,
- const gchar *key_group,
- const gchar *key_name,
- GKeyFile *keyfile)
-{
- if (keep_old)
- g_debug ("keep-old mode: keep previous default value");
- else {
- g_debug ("Update to %d for %s", new_value, key_name);
- g_key_file_set_boolean (keyfile, key_group, key_name, new_value);
- }
- return(0);
-}
-
-int
-update_string(const gchar *default_value,
- const gchar *new_value,
- gboolean keep_old,
- gboolean remove,
- const gchar *key_group,
- const gchar *key_name,
- GKeyFile *keyfile)
-{
- if (!(default_value) || (strlen(default_value) < 1)) {
- g_debug ("No existing valid value for %s. Set to %s", key_name, new_value);
- g_key_file_set_string (keyfile, key_group, key_name, new_value);
- }
- else {
- if (remove) {
- if (g_strcmp0 (default_value, new_value) == 0) {
- g_debug ("Remove %s as default value for %s", default_value, key_name);
- g_key_file_set_string (keyfile, key_group, key_name, "");
- return(0);
- }
- g_debug ("Can't remove: %s is not the default value for %s", default_value, key_name);
- return(4);
- }
- else {
- g_debug ("Found existing default value(%s) for %s", default_value, key_name);
- if (keep_old)
- g_debug ("keep-old mode: keep previous default value");
- else {
- g_debug ("Update to %s for %s", new_value, key_name);
- g_key_file_set_string (keyfile, key_group, key_name, new_value);
- }
- }
- }
- return(0);
-}
-
-int
-str_to_bool(const gchar *str, gboolean *bool_out)
-{
- if (IS_STRING_EMPTY(str)) {
- return -1;
- }
- else if (strncasecmp(str, "true", 4)==0) {
- *bool_out = TRUE;
- return 0;
- }
- else if (strncasecmp(str, "false", 5)==0) {
- *bool_out = FALSE;
- return 0;
- }
- else {
- return -2;
- }
-}
-
-int
-main (int argc, char *argv[])
-{
- GOptionContext *context = NULL;
- GError *error = NULL;
-
- GKeyFile *keyfile;
- GKeyFileFlags flags;
- gchar *s_data;
- gsize size;
- const gchar *gdm_conf_file = CONFIG_DIR "/lightdm.conf";
-
- gchar *default_type = NULL;
- gchar *default_session = NULL;
- gchar *default_greeter = NULL;
- gchar *default_autologin = NULL;
- gint return_code = 0;
-
- bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
-#if !defined(GLIB_VERSION_2_36)
- g_type_init ();
-#endif
-
- context = g_option_context_new (N_("- set lightdm default values"));
- g_option_context_add_main_entries (context, entries, NULL);
- if (!g_option_context_parse (context, &argc, &argv, &error)) {
- g_printerr (N_("option parsing failed: %s\n"), error->message);
- g_option_context_free (context);
- g_error_free (error);
- return 1;
- }
- if (IS_STRING_EMPTY (type) && IS_STRING_EMPTY (session) && IS_STRING_EMPTY (greeter) && IS_STRING_EMPTY (autologin) && IS_STRING_EMPTY(str_hide_users) && IS_STRING_EMPTY(str_show_manual_login) && IS_STRING_EMPTY(str_show_remote_login) && IS_STRING_EMPTY(str_allow_guest)) {
- g_printerr (N_("Wrong usage of the command\n%s"), g_option_context_get_help (context, FALSE, NULL));
- g_option_context_free (context);
- return 1;
- }
- if (context)
- g_option_context_free (context);
- if (!debug)
- g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, show_nothing, NULL);
-
- keyfile = g_key_file_new ();
- flags = G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS;
- if (!(g_key_file_load_from_file (keyfile, gdm_conf_file, flags, &error))) {
- g_debug ("File doesn't seem to exist or can't be read: create one (%s)", error->message);
- g_error_free (error);
- error = NULL;
- }
-
- // try to get the right keys
- default_type = g_key_file_get_string (keyfile, SEATDEFAULT_KEY_GROUP, TYPE_KEY_NAME, NULL);
- default_session = g_key_file_get_string (keyfile, SEATDEFAULT_KEY_GROUP, SESSION_KEY_NAME, NULL);
- default_greeter = g_key_file_get_string (keyfile, SEATDEFAULT_KEY_GROUP, GREETER_KEY_NAME, NULL);
- default_autologin = g_key_file_get_string (keyfile, SEATDEFAULT_KEY_GROUP, AUTOLOGIN_KEY_NAME, NULL);
-
- if (!(IS_STRING_EMPTY (type)))
- return_code = update_string (default_type, type, keep_old, remove, SEATDEFAULT_KEY_GROUP, TYPE_KEY_NAME, keyfile);
- if (!(IS_STRING_EMPTY (session)))
- return_code = update_string (default_session, session, keep_old, remove, SEATDEFAULT_KEY_GROUP, SESSION_KEY_NAME, keyfile);
- if (!(IS_STRING_EMPTY (greeter)) && (return_code == 0))
- return_code = update_string (default_greeter, greeter, keep_old, remove, SEATDEFAULT_KEY_GROUP, GREETER_KEY_NAME, keyfile);
- if (!(IS_STRING_EMPTY (autologin)) && (return_code == 0))
- return_code = update_string (default_autologin, autologin, keep_old, remove, SEATDEFAULT_KEY_GROUP, AUTOLOGIN_KEY_NAME, keyfile);
- if (!(IS_STRING_EMPTY(str_hide_users)) && (return_code == 0)) {
- if (str_to_bool(str_hide_users, &hide_users) == 0) {
- return_code = update_boolean (hide_users, keep_old, SEATDEFAULT_KEY_GROUP, HIDE_USERS_KEY_NAME, keyfile);
- }
- else {
- g_printerr (N_("true and false are the only valid choices for hide-users\n"));
- return 1;
- }
- }
- if (!(IS_STRING_EMPTY(str_allow_guest)) && (return_code == 0)) {
- if (str_to_bool(str_allow_guest, &allow_guest) == 0) {
- return_code = update_boolean (allow_guest, keep_old, SEATDEFAULT_KEY_GROUP, ALLOW_GUEST_KEY_NAME, keyfile);
- }
- else {
- g_printerr (N_("true and false are the only valid choices for allow-guest\n"));
- return 1;
- }
- }
- if (!(IS_STRING_EMPTY(str_show_manual_login)) && (return_code == 0)) {
- if (str_to_bool(str_show_manual_login, &show_manual_login) == 0) {
- return_code = update_boolean (show_manual_login, keep_old, SEATDEFAULT_KEY_GROUP, MANUAL_LOGIN_KEY_NAME, keyfile);
- }
- else {
- g_printerr (N_("true and false are the only valid choices for show-manual-login\n"));
- return 1;
- }
- }
- if (!(IS_STRING_EMPTY(str_show_remote_login)) && (return_code == 0)) {
- if (str_to_bool(str_show_remote_login, &show_remote_login) == 0) {
- return_code = update_boolean (show_remote_login, keep_old, SEATDEFAULT_KEY_GROUP, REMOTE_LOGIN_KEY_NAME, keyfile);
- }
- else {
- g_printerr (N_("true and false are the only valid choices for show-remote-login\n"));
- return 1;
- }
- }
-
- if (return_code == 0) {
- s_data = g_key_file_to_data (keyfile, &size, &error);
- if (!s_data) {
- g_debug ("Can't convert data to string: %s", error->message);
- g_error_free (error);
- return_code = 1;
- }
- else {
- if(!g_file_set_contents (gdm_conf_file, s_data, size, &error)) {
- g_printerr ("Can't update: %s\n", error->message);
- g_error_free (error);
- return_code = 1;
- }
- g_free (s_data);
- }
- }
-
- g_key_file_free (keyfile);
-
- if (default_type)
- g_free (default_type);
- if (default_session)
- g_free (default_session);
- if (default_greeter)
- g_free (default_greeter);
- if (default_autologin)
- g_free (default_autologin);
-
- return return_code;
-
-}