Awesome – as of at least Ubuntu Natty, the nmcli tool, which is the under-development command line utility to interact with network manager, is able to bring up and down connections, including VPN connections!
Right now, as both nvidia and nouveau are failing on my laptop, I’m using wmii. I have a VPN connection that uses a passworded file, which I previously, under gnome, defined using the network manager applet. But now I don’t have a gnome panel.
So what I do is:
Terminal 1: run nm-applet (this is necessary in order for nmcli to be able to see inactive VPN connections)
Terminal 2: I do
to show the connections, and pick out the uuid for the VPN connection that I want to bring up. Then I do
nmcli con up uuid
And voila, a moment later I get the notify-osd message saying my connection is up.