Commit 532d3ed0 authored by Lior Spach's avatar Lior Spach

le-italc-config: Refs #1372 Forgot to put multiterminal script

Signed-off-by: Lior Spach's avatarLior Spach <ls12@inf.ufpr.br>
parent 3b2c08fa
#!/bin/bash
#
# --------------------------------------------------------------------------- #
# This file is aumotically copied to its correct directory by le-italc-config #
# --------------------------------------------------------------------------- #
#
#
# Copyright (C) 2004-2013 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of le-save-config
#
# le-save-config 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.
#Privileged Users don't run ica
if [ "$USER" = "admin" ]; then
return 0
fi
#Resolve Port
PORT="$(( 11000 + $(echo $DISPLAY | awk -F ":" '{print $NF}' | cut -b 1) ))"
#ReSet the default port server for teacher(mobility to teachers computer)
if [ "$USER" = "professor" ]; then
imc -setconfigvalue Network/CoreServerPort=${PORT}
fi
#Do not execute ica on logout
if ps -u $USER -o comm | grep "^ica$"; then
return 0
fi
#Execute ICA
if [ -n "$PORT" ]; then
ica -port $PORT &
fi
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