1 # Copyright (C) 2014 Canonical Ltd
2 # Author: Gunnar Hjalmarsson <gunnarhj@ubuntu.com>
4 # This program is free software: you can redistribute it and/or modify it under
5 # the terms of the GNU General Public License as published by the Free Software
6 # Foundation, version 3 of the License.
8 # See http://www.gnu.org/copyleft/gpl.html the full text of the license.
10 # This file may be sourced by the function source_with_error_check() in
11 # /usr/sbin/lightdm-session
13 export TEXTDOMAIN=lightdm
17 PARA1=$(eval_gettext 'The configuration file $CONFIG_FILE contains
18 invalid syntax and could not be loaded:')
20 PARA1=$(eval_gettext 'Error found when loading $CONFIG_FILE:')
23 PARA2=$(gettext 'As a result the session will not be configured correctly.
24 You should fix the problem as soon as feasible.')
26 TEXT="$PARA1\n\n$(fold -s $ERR)\n\n$PARA2"
28 if [ -x /usr/bin/kdialog ]; then
29 TEXT_FILE=$(mktemp --tmpdir config-err-kdialog-XXXXXX)
30 echo -n "$TEXT" > "$TEXT_FILE"
31 kdialog --textbox "$TEXT_FILE" 500 300
33 elif [ -x /usr/bin/zenity ]; then
34 zenity --warning --no-wrap --text="$TEXT"