Where to put script to automatically connect to VPN

Asked by Willing2Learn on 2012-05-27

It seems that VPNAutoconnect doesn't work with the latest versoins of ubuntu, so I'm trying to figure out a way to do what VPNAutoconect does. I found this website with a script all written: https://gist.github.com/1547663. My problem is that I'm really new to scripts and such and the suggestion with this script is to place it in /etc/rc.local. I'm running Lubuntu 12.04, and there is no such location, and my attempts at creating a new file or folder named rc.local in /etc have been unsuccessful. Any suggestions to tell openVPN to automatically connect to my VPN when I log on? Thanks.

Question information

English Edit question
Ubuntu gnome-desktop Edit question
No assignee Edit question
Last query:
Last reply:
codemaniac (arijit.dutta) said : #1

search for "startup applications" .-Click on add -Name it and enter the shell script's absolute path you want to execute -Click ok and restart to verify .

Willing2Learn (curious-g74) said : #2

Thanks for the suggestion. Here's what I'm running into:
I'm running Lubuntu 12.04 and there is no item on the menu for Startup Applications and therefore nowhere to click on the add button. I've atttempted to cut the script from the website listed above and pasting it into a text document and saving that document to ~/.config/autostart. I also tried pasting it into the /etc/rc.local file between the lines "# By default this script does nothing." and "exit 0". Neither of these have worked.

I'd be totally stoked if there's an "add" button somewhere and this is an easy fix. Otherwise, do you have any other suggestions?

codemaniac (arijit.dutta) said : #3

Can you help with this problem?

Provide an answer of your own, or ask Willing2Learn for more information if necessary.

To post a message you must log in.