by mackowiakp » Mar 15th, '15, 11:31
OK. Finally I got it working.
Main script loos like this:
- Code: Select all
#!/bin/bash
sudo encfs --extpass=/home/maciek/Pobrane/zen --public /home/maciek/dir/.dir_c /home/maciek/dir_v >/dev/null 2>/dev/null
status=$?
if test $status -eq 0
then
mount /home/maciek/.ssh
zenity --timeout=10 --info --text "Połączono SSH"
exit
else
umount /home/maciek/.ssh 2>/dev/null
sudo fusermount -u ~/dir_v 2>/dev/null
zenity --timeout=10 --error --text "Rozłączono SSH lub błędne hasło"
fi
Where "zen" script is:
- Code: Select all
#!/bin/bash
xhost local:maciek > /dev/null
zenity --entry --title="password dialog" --text="wprowaź hasło do SSH:" --hide-text
So i placed icon on pulpit, linked to main script. But I must set in options "Run in terminal". In other case, script always fails that is "zen" script does not start.
Is any possibility to hide or turn off terminal window during call such script?
Linux is like wigwam. No Windows, no Gates but Apache inside
WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause