Description: TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. . ldm (2:2.2.18-1) unstable; urgency=medium . * New upstream version. - Display LDM only in the first monitor (LP: #693151). - DesktopNames replaced X-LightDM-DesktopName in xsession files (GNOME: #727546). - Fix invalid syntax in .dmrc parsing the default session. . * debian/control: Update Vcs-Browser to use https URL. Author: Vagrant Cascadian Bug-Ubuntu: https://bugs.launchpad.net/bugs/693151 --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: https://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- ldm-2.2.18.orig/screen.d/ldm +++ ldm-2.2.18/screen.d/ldm @@ -139,4 +139,33 @@ fi xinitrc=/usr/share/ltsp/xinitrc -exec xinit $xinitrc /usr/sbin/ldm -- ${DISPLAY} vt${TTY} -auth ${XAUTHORITY} ${X_ARGS} -br >/dev/null 2>&1 + + +# LLIUREX EDIT + +case $LDM_LANGUAGE in + + "es_ES.UTF-8" | "es.UTF-8") + IMG_LANG="es" + ;; + + "ca_ES.UTF-8@valencia" | "ca_ES.UTF-8" ) + IMG_LANG="val" + ;; + + *) + IMG_LANG="en" + ;; + +esac + +eval $(getltscfg -a | grep -v export) +result=$(echo $LTSP_FATCLIENT | grep -iq "true" && echo 1 || echo 0) +if [ "$result" = "1" ]; then + cp /usr/share/ldm/themes/lliurex/bg_fat_$IMG_LANG.png /usr/share/ldm/themes/lliurex/bg.png || true +else + cp /usr/share/ldm/themes/lliurex/bg_thin_$IMG_LANG.png /usr/share/ldm/themes/lliurex/bg.png || true +fi + +LANG=$LDM_LANGUAGE exec xinit $xinitrc /usr/sbin/ldm -- ${DISPLAY} vt${TTY} -auth ${XAUTHORITY} ${X_ARGS} -br >/dev/null 2>&1 + --- /dev/null +++ ldm-2.2.18/screen.d/ldm.orig @@ -0,0 +1,142 @@ +#!/bin/sh +# Depend on the ldm package +# +# Copyright 2005, Canonical Ltd. +# Copyright 2006-2008 Vagrant Cascadian +# +# 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 2, or (at your option) any later version. +# +# This program 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 with your +# Debian GNU system, in /usr/share/common-licenses/GPL. If not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# +# Load code common to X based screen scripts +# + +# NOTE: The while loop has been moved into screen_session (the parent script +# to this one. MAKE SURE YOU HAVE THE LATEST ltsp-trunk + +trap cleanup 0 INT QUIT TERM + +cleanup() +{ + if [ -d "${XAUTHORITY_DIR}" ]; then + rm -Rf "${XAUTHORITY_DIR}" + fi + + if [ -f "${XAUTHORITY}" ]; then + rm -f "${XAUTHORITY}" + fi + + if [ -f "/tmp/.X${TTY}-lock" ]; then + rm -f "/tmp/.X${TTY}-lock" + fi + + if [ -S "/tmp/.X11-unix/X${TTY}" ]; then + rm -f "/tmp/.X11-unix/X${TTY}" + fi +} + +. /usr/share/ltsp/screen-x-common +# backwards compatibility: set DISPLAY from old DISP variable +test -z "$DISPLAY" && DISPLAY="$DISP" +XAUTHORITY_DIR=`mktemp -d /var/run/ldm-xauth-XXXXXXXXX` +export XAUTHORITY_DIR +XAUTHORITY="${XAUTHORITY_DIR}/Xauthority" +touch $XAUTHORITY +export XAUTHORITY + +SESSIONLIST="/etc/X11/xinit/Xsession \ + /etc/X11/Xsession \ + /usr/lib/X11/xdm/Xsession \ + /etc/X11/xdm/Xsession" + +if [ -z "$LDM_LOGIN_TIMEOUT" ] && [ -n "$LDM_TIMEOUT_TIME" ] && [ -n "$LDM_TIMEOUT_ENABLED" ]; then + # implement backwards compatibility with short-lived timeout login options + if boolean_is_true "$LDM_TIMEOUT_ENABLED" ; then + LDM_LOGIN_TIMEOUT="$LDM_TIMEOUT_TIME" + fi +fi + +# +# Server scalability. If there exists a /usr/share/ltsp/get_hosts file, then +# use it to populate the LDM_SERVER environment variable. +# + +if [ -z "${LDM_SERVER}" ]; then + if [ -x /usr/share/ltsp/get_hosts ]; then + LDM_SERVER=$(/usr/share/ltsp/get_hosts) + else + # Use hostname to allow IP changes without need for ltsp-update-sshkeys + LDM_SERVER="server" + fi +fi +export LDM_SERVER + +# +# Loop though each of the hosts, and get their ldminfo +# + +if [ -n "${LDM_SERVER}" ]; then + test ! -d /var/run/ldm && mkdir -p /var/run/ldm + for SRV in $LDM_SERVER ; do + # Write server to /etc/hosts so reverse DNS lookup is not necessary + if ! grep -Fqw "$SRV" /etc/hosts ; then + echo "$SRV server-$SRV" >> /etc/hosts + fi + # For this to work, ldm-server needs to be installed in the chroot + if boolean_is_true "$LTSP_FATCLIENT" && [ -x /usr/share/ldm/ldminfod ]; then + /usr/share/ldm/ldminfod > /var/run/ldm/$SRV + break + else + nc $nc_q_param -w 5 $SRV 9571 > /var/run/ldm/$SRV + fi + done +fi + +get_xfs_settings "$LDM_SERVER" + +MCOOKIE=$(mcookie) +if [ -z "${MCOOKIE}" ]; then + echo "Couldn't create cookie" + exit 1 +fi + +# FIXME: This needs to non-destructively operate in parallel with other +# X servers running on the same machine. See /usr/bin/startx for example. +xauth -q add ${DISPLAY} . ${MCOOKIE} 2>/dev/null +# Might not be necessary to do these... +xauth -q add `hostname`${DISPLAY} . ${MCOOKIE} 2>/dev/null +xauth -q add 127.0.0.1/unix${DISPLAY} . ${MCOOKIE} 2>/dev/null + +# Define our session +if [ -z "${LDM_XSESSION}" ]; then # If admin hasn't specified session + for SESSION in ${SESSIONLIST}; do + if [ -x ${SESSION} ]; then + export LDM_DEFAULT_XSESSION=${SESSION} + break + fi + done +fi + +if boolean_is_true "$LDM_DIRECTX" ; then + if [ $({ echo "1.17"; X -version 2>&1 | sed -n 's/X.Org X Server //p';} | sort -V | head -n 1) = "1.17" ]; then + # Xorg after 1.17 needs `-listen tcp`, see + # http://cgit.freedesktop.org/xorg/xserver/commit/?id=cc59be38b7eff52a1d003b390f2994c73ee0b3e9 + X_ARGS="-listen tcp $X_ARGS" + fi +else + X_ARGS="-nolisten tcp $X_ARGS" +fi + +xinitrc=/usr/share/ltsp/xinitrc + +exec xinit $xinitrc /usr/sbin/ldm -- ${DISPLAY} vt${TTY} -auth ${XAUTHORITY} ${X_ARGS} -br >/dev/null 2>&1