Ubuntu Forums Archive Viewer

Want to Create a shortcut

Archived thread 1000152 from New to Ubuntu. Markdown source: New_to_Ubuntu/thread_1000152_Want_to_Create_a_shortcut.md

Original URL About this archive
#1

Im currently on 8.10 running Gnome and I'd like to create a desktop icon for the following command:

sudo mount 192.168.0.2:/home ~/laptop

When I type this in terminal, it prompts me for my admin password, which I need to input in order to get the sudo mount command to work. Is there any way I can do this automatically? I've tried to create a shortcut (right click on the desktop, create Launcher, type - application, command is as per above.

This doesn't work though. Someone else suggested using connect to server but I can't get anywhere with that as I'm not sure what I type where. I don't want to auto mount at start-up as the machine I'm 'mounting' won't always be on, so I'd like a desktop icon that I can click rather than typing in a command.

#2

Have you tried changing the type to Application in Terminal?

#3

If something requires root permissions then the only way to stop it requiring "sudo" is to modify sudoers, but I wouldn't recommend that.

#4

To automount your network drive check out this thread (I assume you are using NFS in this case) http://ubuntuforums.org/showthread.php?t=646572

#5

oh wait, change sudo to gksu, this will give you a graphical prompt. That may help.