Friday, October 14, 2016

14.04 - .desktop file appears to run a .sh file executable, but doesn't complete

I hope I have done my due diligence in searching previous posts. I am new to ubuntu (14.04), and still learning. I wasn't able to find this problem previously asked.



I have created a .sh file (/home/Desktop/mountServer.sh) and set properties->Execute to allow executing file as program. If I run this .sh from the terminal manually using cd Desktop/, and./mountServer.sh it works perfectly. When I run the .desktop file 'Mount Server.desktop', it opens the terminal as instructed and prompts me for my password. But then, nothing happens. It doesn't mount my disk. No error message.



mountServer.desktop code :



[Desktop Entry]
Name=Mount Server

Comment=Mounts the Server 1.5 from Apple Airport Extreme
Exec=sudo /home/Desktop/mountServer.sh
Icon=/paht/to/icon.png
Terminal=true
Type=Application


mountServer.sh code:



sudo mount -t cifs "//10.0.1.1/The Server 1.5" -o username=myusername,password=pwhere,sec=ntlm ~/capsule

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...