Im using Ubuntu 13.04 with Gnome and I recently set up a (open)VPN. Is there any way to enable it by default? Each time I boot or even lost my connection, I have to enable the VPN manually. Is there an option I am missing?
Im using Ubuntu 13.04 with Gnome and I recently set up a (open)VPN. Is there any way to enable it by default? Each time I boot or even lost my connection, I have to enable the VPN manually. Is there an option I am missing?
Through the Network Manager indicator nm-applet (the GNOME or Unity network tray applet installed by default), you can configure NetworkManager to automatically connect to a VPN when a network is connected.
nm-connection-editor
.When this is enabled, there is a bug in NetworkManager that can break the "automatically connect to this network" function. (Edit: this bug has now been marked as "fix released" in Ubuntu 16.04). If NetworkManager tries to automatically connect and fails, you will see a line like the following in /var/log/syslog
:
<error> [1401130450.367538] [nm-vpn-connection.c:1374] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.
It seems that NetworkManager fails to obtain the user's VPN password from gnome-keyring-daemon
. One workaround is to let NetworkManager store the password in plaintext in the configuration file in /etc/NetworkManager/system-connections/
. To do this:
sudoedit /etc/NetworkManager/system-connections/<VPN>
, where <VPN>
is the configuration file for your VPN (the filename is usually the name you assigned to your VPN).password-flags=1
to password-flags=0
NetworkManager will now store the VPN password itself (see man nm-settings
for details), and the network autoconnect will work once again.