I made script to start the VPN, connect to a remote desktop and shut down VPN when finished. It works
great via command line. But it would be nice to just click an icon.
I am new to Linux so I don't know a whole lot.

Linux Mint 12 LXDE
You can create a desktop icon, which is actually a text file. I've done that for a few icon short-cuts on my Lubuntu desktop.bjackson60 wrote:Is there a way to make a Windows style desktop shortcut to run a shell script?
I made script to start the VPN, connect to a remote desktop and shut down VPN when finished. It works
great via command line. But it would be nice to just click an icon.
I am new to Linux so I don't know a whole lot.![]()
Linux Mint 12 LXDE
Code: Select all
[Desktop Entry]
Encoding=UTF-8
Name=Trash
Comment=Open Trash folder in PCManFM
Icon=/home/username/.extra-icons/trashcan-128x128(c).png
Exec=/usr/bin/pcmanfm trash:///
Terminal=false
Type=Application
Code: Select all
[Desktop Entry]
Encoding=UTF-8
Name=Nix
Comment=RunNixNote
Icon=/home/username/.extra-icons/Nevernote-164x308.png
Exec=sh /usr/share/nixnote/nixnote.sh
Terminal=false
Type=Application
No problem!bjackson60 wrote:Thanks! I'll play around with this when I get off work.
Edit: Couldn't wait! This works perfectly!!! Thanks M_Mynaardt
I know you can't do much about the order of icons on an LXDE desktop. You're sort of stuck with that. But that ought not affect whether or not they work.bjackson60 wrote:OK, now I have another problem that I don't understand. The shortcut worked like a charm. (Thanks again) But I noticed my script was not disconnecting from the VPN. I edited the script only prepending sudo to the existing line 'vpnc-disconnect'. When I saved the file I noticed the screen refreshed and the icon moved to a new location. The shortcut now does nothing when clicked. The script still works from the command line. Has editing the script file broken something
Maybe you might need to do this first:bjackson60 wrote:It's driving me nuts! The script is working perfectly, but the desktop icon just doesn't. Oh well, I'll just command line it and go learn some more.
Code: Select all
~$ chmod +x shell_name.sh
~$ chmod 755 shell_name.sh