Skip to content
Snippets Groups Projects
Commit 7f0c0385 authored by Diego Giovane Pasqualin's avatar Diego Giovane Pasqualin
Browse files

Merge branch 'proinfodata_dialog' of /home/git/repositories/le5/unstable

parents bb156099 d8cafdbc
No related branches found
No related tags found
No related merge requests found
Package: le-proinfodata Package: le-proinfodata
Version: 1.2.38 Version: 1.2.39
Maintainer: <proinfodata@c3sl.ufpr.br> Maintainer: <proinfodata@c3sl.ufpr.br>
Architecture: i386 Architecture: i386
Section: main Section: main
......
...@@ -53,10 +53,15 @@ fi ...@@ -53,10 +53,15 @@ fi
# Set lightdm to open the le-proinfodata configuration script when user # Set lightdm to open the le-proinfodata configuration script when user
# session starts # session starts
if [[ ! -d $MULTISEAT_DIR ]]; then
if ! grep -q "session.*exec_dialog.sh" "/etc/lightdm/lightdm.conf"; then if ! grep -q "session.*exec_dialog.sh" "/etc/lightdm/lightdm.conf"; then
sed -i '/\[SeatDefaults\]/ a\session-setup-script=/usr/local/bin/exec_dialog.sh' \ sed -i '/\[SeatDefaults\]/ a\session-setup-script=/usr/local/bin/exec_dialog.sh' \
/etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf
fi fi
else
sed -i '\,session-setup-script=/usr/local/bin/exec_dialog.sh,d' \
/etc/lightdm/lightdm.conf
fi
# We will no longer need this files, but as the postrm would only remove the # We will no longer need this files, but as the postrm would only remove the
# diverts when this package were removed, we have to do it here # diverts when this package were removed, we have to do it here
......
...@@ -25,18 +25,39 @@ BACKGROUND="/usr/share/backgrounds/le5-wallpaper1600X1200.png" ...@@ -25,18 +25,39 @@ BACKGROUND="/usr/share/backgrounds/le5-wallpaper1600X1200.png"
LE_EDUBAR_POS="/usr/share/gnome/autostart/le-edubar_position.sh" LE_EDUBAR_POS="/usr/share/gnome/autostart/le-edubar_position.sh"
function enable_mouse () { function enable_mouse () {
# Enable mouse right-click and left-click
xmodmap -e "pointer = default" xmodmap -e "pointer = default"
xmodmap -e "keycode 64 = Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L"
} }
function disable_mouse () { function disable_mouse () {
xmodmap -e "pointer = 1 2 32 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 3" if [[ -z "$1" ]]; then
# Disable mouse right-click
xmodmap -e "pointer = 1 2 0 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32"
xmodmap -e "keycode 64 = "
else
# Disable mouse right-click and left-click
xmodmap -e "pointer = 0 2 0 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32"
xmodmap -e "keycode 64 = " xmodmap -e "keycode 64 = "
fi
}
function disable_keyboard () {
# Disable keyboard control-button and alt-button
xmodmap -e "remove Control = Control_L"
xmodmap -e "keycode 64 = "
}
function enable_keyboard () {
# Enable keyboard control-button and alt-button
xmodmap -e "add Control = Control_L"
xmodmap -e "keycode 64 = Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L"
} }
function call_dialog_inep_mult_off () { function call_dialog_inep_mult_off () {
# Disable mouse right-click # Disable mouse right-click
disable_mouse disable_mouse
# Disable keyboard control-button and alt-button
disable_keyboard
# Set background # Set background
xli -onroot -fillscreen $BACKGROUND xli -onroot -fillscreen $BACKGROUND
dialog_inep.sh dialog_inep.sh
...@@ -44,6 +65,8 @@ function call_dialog_inep_mult_off () { ...@@ -44,6 +65,8 @@ function call_dialog_inep_mult_off () {
xli -onroot -background black xli -onroot -background black
# Enable mouse right-click # Enable mouse right-click
enable_mouse enable_mouse
# Enable keyboard control-button and alt-button
enable_keyboard
} }
# Disable user interaction with gnome panel # Disable user interaction with gnome panel
...@@ -88,12 +111,31 @@ function call_dialog_inep_mult_on () { ...@@ -88,12 +111,31 @@ function call_dialog_inep_mult_on () {
# Disable user interaction # Disable user interaction
disable_mouse disable_mouse
disable_gnome disable_gnome
# Disable keyboard control-button and alt-button
disable_keyboard
# Start Inep Dialog
dialog_inep.sh dialog_inep.sh
# Enable user interaction # Enable user interaction
enable_gnome enable_gnome
enable_mouse enable_mouse
enable_keyboard
}
function warning_dialog_inep_on () {
# Disable user interaction
# Disable mouse right-click and left-click
disable_mouse "all"
# Disable keyboard control-button and alt-button
disable_keyboard
# Warning other INEP setting
while [ ! -e $F_LOCK ]; do
echo wait
sleep 1
done | zenity --progress --pulsate --no-cancel --auto-close --title="INEP" \
--text="Aguarde a configuração do PROINFODATA"
# Enable user interaction
enable_keyboard
enable_mouse
} }
export LANG="pt_BR.UTF-8" export LANG="pt_BR.UTF-8"
...@@ -111,18 +153,18 @@ fi ...@@ -111,18 +153,18 @@ fi
# Check whether the computer is running on a the multiterminal # Check whether the computer is running on a the multiterminal
if dpkg --get-selections "le-multiterminal" | grep -q 'install$'; then if dpkg --get-selections "le-multiterminal" | grep -q 'install$'; then
# In the first call (lightdm) in multiterminal this is script must leave, to be called again after. # In the first call (lightdm) in multiterminal this is script must leave, to be called again after.
if [ -f $F_MULT ];then (
touch $F_LOCK flock -n 200
echo "0" > $F_LOCK if [ $? != "0" ]; then
call_dialog_inep_mult_on warning_dialog_inep_on
else else
touch $F_MULT call_dialog_inep_mult_on
exit 0 touch $F_LOCK
fi fi
) 200>$F_MULT
else else
touch $F_LOCK
echo "1" > $F_LOCK
call_dialog_inep_mult_off call_dialog_inep_mult_off
touch $F_LOCK
fi fi
exit 0 exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment