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
16 PARA1=$(eval_gettext 'Error found when loading $CONFIG_FILE:')
17 PARA2=$(gettext 'As a result the session will not be configured correctly.
18 You should fix the problem as soon as feasible.')
20 TEXT="$PARA1\n\n$(fold -s $ERR)\n\n$PARA2"
22 if [ -x /usr/bin/kdialog ]; then
23 TEXT_FILE=$(mktemp --tmpdir config-err-kdialog-XXXXXX)
24 echo -n "$TEXT" > "$TEXT_FILE"
25 kdialog --textbox "$TEXT_FILE" 500 300
27 elif [ -x /usr/bin/zenity ]; then
28 zenity --warning --no-wrap --text="$TEXT"