I have a script which does the following:Connect via sshfs to a directory on a serverWithin 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 terminalsudo /.../myscript.shit 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 errorI 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=myscriptExec=mate-terminal -e sudo /.../myscript.shTerminal=falseType=ApplicationCan anyone suggest why running the script from the shell seems to work, but running from the desktop shortcut gives me problems?
bash script problem when run from desktop launcher
bash;shell script;remote;sshfs
Doesn't gksudo /.../myscript.sh do everything you want (assuming you're running Gnome)?   Ken Sharp... actually that does seem to work! Looks like this is an example of the mysterious problems mentioned here http://www.psychocats.net/ubuntu/graphicalsudo