I have a script which does the following:
- Connect via sshfs to a directory on a server
- Within that directory, there is an encrypted volume. Open it to the device mapper.
- Mount to a local directory (-o rw & -t ext4)
When I run this script from the terminal
sudo /.../myscript.sh
it runs with the expected behaviour. However, when I run this script from a desktop shortcut, it runs, but with problems. In particular:
It appears to be mounted, and I can 'cd' into the mounted directory and list the contents. However, when I try to list the contents of a subdirectory, I get this message:
ls: reading directory .: Input/output error
I don't seem to have write access to the directory. (I can't save files)
My desktop entry looks like this: (... is just for simplicity, again)
[Desktop Entry]
Name=myscript
Exec=mate-terminal -e "sudo /.../myscript.sh"
Terminal=false
Type=Application
Can anyone suggest why running the script from the shell seems to work, but running from the desktop shortcut gives me problems?
Exec=mate-terminal
andTerminal=false
together.env
in the scripts to see what is set. If something fails, it should spit out some errors, so redirect stderr to a log file and post the results.gksudo /.../myscript.sh
do everything you want (assuming you're running Gnome)?