Commit d332faec authored by Lior Spach's avatar Lior Spach

le-italc-config: Refs #1372 Several Improves: Open file browser with xdg-open

1. Using xdg-open instead of nautilus to open key directory for config_master_monoterminal
2. Redirection of output from imc -createkeypair command, because it prints confusing messages to user. (It prints some key premission sugestion, but the le-italc-config already does all necessary actions)
3. If for some reason lightdm greeter-setup-exec does not exist, create it. (Not sure if it is possible, but seems to happen)
Signed-off-by: Lior Spach's avatarLior Spach <>
parent 78975ae1
......@@ -30,6 +30,7 @@ fi
#Script path to be created for monoterminal:
#Script path to be created for multiterminal:
......@@ -151,6 +152,9 @@ fi
generate_script_monoterminal_client () {
local g_file="$SCRIPT_MONO_PATH"
if [ ! -d $SCRIPT_MONO_PATH_DIR ]; then #If directory does not exit
mkdir -p $SCRIPT_MONO_PATH_DIR # Create it
echo "#!/bin/sh" > $g_file
echo "ica &" >> $g_file
......@@ -219,7 +223,7 @@ config_client_monoterminal () {
config_master_monoterminal () {
local tmp_dir_chave="$(mktemp -d)"
imc -role teacher -createkeypair
imc -role teacher -createkeypair 1>/dev/null
#Protect private keys
chown $SUDO_USER /etc/italc/keys/ -R
......@@ -233,8 +237,8 @@ config_master_monoterminal () {
#Give key file to user
chown $SUDO_USER $tmp_dir_chave -R
sudo -u $SUDO_USER nautilus $tmp_dir_chave &
sleep 2 #time to open nautilus
sudo -u $SUDO_USER xdg-open $tmp_dir_chave & # I chose to use xdg-open for a broader compatibility
sleep 2 #time to open file browser
zenity --info --title="Configurador do iTalc" --text="Copie o arquivo Chave-Italc para as estações clientes, ele será solicitado pelo configurador."
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