Re: dbus and OpenVPN Autostart
- From: Dan Williams <dcbw redhat com>
- To: David Guest <davidg koorong com au>
- Cc: networkmanager-list gnome org
- Subject: Re: dbus and OpenVPN Autostart
- Date: Mon, 09 Feb 2009 11:47:20 -0500
On Mon, 2009-02-09 at 11:37 +1100, David Guest wrote:
> I am attempting to create a dispatcher script to autostart an OpenVPN
> connection, I am stuck on how to get the vpn to connect through dbus.
> Would anyone have a working example, preferably in python but any
> language will do?
>
> I am running Ubuntu 8.10 (NetworkManager 0.7), I have found at least one
> example on the web but it appears to be for an earlier dbus Network
> Manager API version as I get errors when running them.
>
> I have looked at the 0.7 dbus API but can't figure out what to send to
> the org.freedesktop.NetworkManager.VPN.Plugin.Connect method or even if
> this is the right approach?
That's actually the wrong approach here; what you want to do is tell
_NetworkManager_ to connect the VPN connection. So you'll be using the
org.freedesktop.NetworkManager.ActivateConnection method, and pass it
the service name of the settings service (either user or system) that
provides the connection, the object path of the connection as exported
by that settings service, and the device you'd like to activate the VPN
on (which would be the object path of the interface your script got
called with, probably).
Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]