I'm using RaspBMC and have set up a VPN using openVPN and PrivateInternetAccess. I've been following the third comment on this post which I have used previously and has worked. A few weeks ago, it stopped working on boot. If I run it manually, so type

sudo openvpn /etc/openvpn/London.conf

into putty, it works fine, but only until the next time it reboots. The instructions in this post edit the startup file for openVPN, but I've also tried to use a cronjob to launch it on boot with no luck. I'll post the openVPN startup file at the end. Please let me know anything else I should post that may help. Thanks in advance.

Openvpn startup script:

# This is the configuration file for /etc/init.d/openvpn

# Start only these VPNs automatically via init script.
# Allowed values are "all", "none" or space separated list of
# names of the VPNs. If empty, "all" is assumed.
# The VPN name refers to the VPN configutation file name.
# i.e. "home" would be /etc/openvpn/home.conf
#AUTOSTART="home office"
# Refresh interval (in seconds) of default status files
# located in /var/run/openvpn.$NAME.status
# Defaults to 10, 0 disables status file generation
# Optional arguments to openvpn's command line
# If you need openvpn running after sendsigs, i.e.
# to let umountnfs work over the vpn, set OMIT_SENDSIGS
# to 1 and include umountnfs as Required-Stop: in openvpn's
# init.d script (remember to run insserv after that)

2 Answers 2


I have used LXDE's(X11 Desktop environment) 'autostart' file as a start up source for VPN and some other applications. 'autostart' file runs automatically every time the Raspbian starts.

Normally you can find the file at following paths,




Just add your application to be run on boot to the file as shown below, using '@' before application name


  • Thanks for the suggestion, should that be installed already or do I need to apt-get install something? Feb 5, 2015 at 9:05
  • LXDE is the default Desktop environment and it will be installed already. Please check.
    – MVSR
    Feb 5, 2015 at 9:07
  • It's not there, I'm guessing because it's RaspBMC rather than a regular linux build so the default desktop environment is the XBMC user interface. Should I look into installing it or is that likely to just destabilise the entire system? Feb 5, 2015 at 9:43
  • It will be there in Raspbian by default. I am not sure about RaspBMC. Try this command and let me know. "#sudo update-rc.d openvpn defaults"
    – MVSR
    Feb 5, 2015 at 10:42
  • Definitely not there. Can't seem to find a way of installing it as well, I've followed instructions but hasn't worked at the moment. Feb 6, 2015 at 9:34

I couldn't work out what was going on here, but I changed from RaspBMC to Xbian, and it's solved the problem. I think it's because the set up instructions were designed for Raspbian and Xbian is closer to it, though that's just a noob guess.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.