Commit 20e1fdfa authored by Lucas Martins's avatar Lucas Martins

Ref #1153, Fixes the screen resolution after multiseat is installed.

parent 5f2d9e1d
......@@ -47,6 +47,12 @@ if [ -f $DCONFFILE ]; then
fi
fi
# Set default resolution
LIGHTDM=/etc/lightdm/lightdm.conf
if ! grep 'le-multiterminal-res' $LIGHTDM &>/dev/null; then
echo diplay-setup-script=/usr/sbin/le-multiterminal-res.sh >> $LIGHTDM
fi
# Activate multiseat
# It's gonna be activated by the userful-setup-wizard
#/usr/sbin/userful-umx --enable --silent
......
#!/bin/bash
# Copyright (C) 2004-2008 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-multiterminal
#
# le-multiterminal 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 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
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
# This script fixes the screen resolution. This is needed because the userful
# multiplier software might not do it right for some old machines.
# It is supposed to run only once, so the user might choose to set a different
# resolution manually.
ALREADY_EXEC_FILE="/etc/le-multiterminal/already_executed"
RESOLUTION='1024x768'
defaultResolution() {
MOBONAME="$(dmidecode | grep -A12 "^Base" |
grep "Product Name: " | cut -d':' -f2 | sed -e 's/^ //g')"
if [ $MOBONAME == 'POS-MIG31AG' ] && lspci | egrep -q \
'Display controller:.+TN-502|Display
controller:.+SM501'; then
# Hardware is 832008
RESOLUTION='1360x768'
elif [[ $MOBONAME == G41M* ]] && lspci | grep -q \
'VGA compatible controller: Intel Corporation
4 Series Chipset Integrated Graphics Controller
(rev 03)' ; then
# Hardware is 712010 $MOBONAME == 'G41M-S'
RESOLUTION='1366x768'
else
# 1024x768 works on all screens
RESOLUTION='1024x768'
fi
}
# We believe that the maximum number of session that can be opened at the
# same time is MAX_SESSIONS.
MAX_SESSIONS=6
if dpkg-query -l le-multiterminal &>/dev/null &&
[ ! -f "$ALREADY_EXEC_FILE"] ; then
touch "$ALREADY_EXEC_FILE"
defaultResolution
for ((i=0; i<=$MAX_SESSIONS;i++)); do
userful display --resolution $i $RESOLUTION 60
done
fi
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment