script works, shortcut doesn't
I'm trying to get user homes from the central (debian) server mounted on some shared Dell minis.
I have to pass username and directory to the server, so I adapted a little script that looks like this:
#! /bin/sh
echo -n "user name: "
read user
echo -n "year: "
read year
sshfs $user@server.domain:/path/to/homes/$year/$user ~/myhome
exit
If I run this script in a terminal, it works correctly - the server prompts for password and the share is mounted.
I created a shortcut to the script on the desktop.
When I click the shortcut, Gnome asks what to do and I choose "run in terminal".
The script runs and prompts for username, year and the server prompts for password. Then the terminal closes. However the share is NOT mounted.
Any idea what is going wrong?
thanks
nigel
|