I proposed to implement this feature in http://brainstorm.ubuntu.com/idea/27164/, but it was marked as already implemented. Could someone shed light on how i can do it? I would like a shortcut to a specific connection (vpn or broadband) on my panel (one click connect).
I use cnetworkmanager with this python script for convenience. The script first starts LAN connection, then opens VPN.
You should be able to create shortcuts that call nmcli to bring up connections:
nmcli con up id "name of your connection"
Here's the result when I run this in a terminal on my system:
NetworkManager has D-Bus interface, which you can use in other programs or scripts.
For example, I managed to connect one of my network-manager's VPN connections using this command:
You can browse your D-Bus infrastructure with
NetworkManager's D-Bus API is documented here.
When you find your needed parameters (connection number, device number, etc), you could save the lines as a shell script and create a launcher on the panel to quickly access it.
Personally I don't bother and just do the two additinal clicks. After all, I'm not connecting to VPN too often to suffer from them.