Commit a1c0ccb9 authored by Lior Spach's avatar Lior Spach

le-italc-config: Refs #1372 Ica auto starter update display of teacher

That improvement allow to change the main port(port which teacher is on) automatically on teacher login. BUT there is some issue when try open italc on another display. Seems like italc or system problem.
Signed-off-by: Lior Spach's avatarLior Spach <ls12@inf.ufpr.br>
parent ca21f5a8
......@@ -3,3 +3,8 @@ le-italc-config:
This package provides a wizard to simplify the le-italc-client and
le-italc-master configuration on users machine.
Known issues:
=============
Teacher must execute italc from display 1. Otherwise italc won't open.
......@@ -95,7 +95,7 @@ zenity --question --title="Configurador do Italc" \
\nTipo: $s1 \
\nFunção: $s2" \
--ok-label="Confirma" --cancel-label="Cancelar" ##--cancel-label="Voltar"
[ "$?" = "1" ] && exit 0 #TODO: (NEED: to define directory of this script) execute this script again and exit 0 from this.
[ "$?" = "1" ] && exit 0 #TODO: execute this script again
##---PROCESS RESULTS---------------------------------------------
......@@ -117,18 +117,31 @@ generate_script_multiterminal () {
echo "if [ \"\$USER\" = \"admin\" ]; then" >> $g_file
echo " return 0" >> $g_file
echo "fi" >> $g_file
echo "#Do not execute ica on logout" >> $g_file
echo "if ps -u \$USER -o comm | grep \"^ica\$\"; then" >> $g_file
echo " return 0" >> $g_file
echo "fi" >> $g_file
echo "PORT=\"\$(( 11000 + \$(echo \$DISPLAY | cut -b 2) ))\"" >> $g_file
echo "#Resolve Port" >> $g_file
echo "PORT=\"\$(( 11000 + \$(echo \$DISPLAY | awk -F \":\" '{print \$NF}' | cut -b 1) ))\"" >> $g_file
echo "#ReSet the default port server for teacher(mobility to teachers computer)"
echo "if [ \"\$USER\" = \"professor\" ]; then"
echo " italc_conf=\"/etc/xdg/iTALC Solutions/iTALC.conf\""
echo " if [ -e \"italc_conf\" ]; then #if file exist\""
echo " line=\$(sed -n '/CoreServerPort=/=' \"\$italc_conf\")"
echo " sed -i \"/CoreServerPort=/d\" \"\$italc_conf\""
echo " sed -i \"\${line}iCoreServerPort=\${PORT}\" \"\$italc_conf\""
echo " fi"
echo "fi"
echo "#Execute ICA" >> $g_file
echo "if [ -n \"\$PORT\" ]; then" >> $g_file
echo " ica -port \$PORT &" >> $g_file
echo "fi" >> $g_file
chmod +x $g_file
echo "fi" >> $g_file
chmod +x $g_file
}
config_client_monoterminal () {
......
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