Re: Ethernet connection not listed through DBus/ListConnections



On Wed, Jun 3, 2009 at 2:25 PM, Dan Williams <dcbw redhat com> wrote:
> On Wed, 2009-06-03 at 00:02 +0200, daniel åkerud wrote:
>> On Wed, May 27, 2009 at 5:56 PM, daniel åkerud
>> <daniel akerud gmail com> wrote:
>>
>>         I am trying to automatically connect to a VPN (PPTP)
>>         connection through DBus. I have used the script posted by
>>         Tambet Ingo as a starting point, found here:
>>         http://www.nabble.com/dbus-and-OpenVPN-Autostart-td21905375.html
>>
(...)
>> Problem solved! I have found the missing connection! :)
>>
(...)
>> The code can be found here:
>> http://pastebin.com/m11349e32
>>
>> $ python nm-vpn-restart.py
>> connections:
>>  org.freedesktop.NetworkManagerSystemSettings:
>> add286bb-da7c-4f39-8a2f-13d5233818d6 - Auto ham0 (802-3-ethernet)
>>  org.freedesktop.NetworkManagerSystemSettings:
>> 12c5b1af-6f44-448e-ba46-be54176efb21 - Auto eth1 (802-3-ethernet)
>>  org.freedesktop.NetworkManagerSystemSettings:
>> 904a6063-5962-41a3-893c-fbfb30d15de9 - Auto eth0 (802-3-ethernet)
>>  org.freedesktop.NetworkManagerUserSettings:
>> 2ce0ec46-ae6b-4d46-9128-78dd8c421345 - Relakks (vpn)
>> connecting to:
>>   '(dbus.ObjectPath('/org/freedesktop/NetworkManagerSettings/0'),
>> 'org.freedesktop.NetworkManagerUserSettings')'
>> with active connection:
>>   '(dbus.ObjectPath('/org/freedesktop/NetworkManagerSettings/0'),
>> 'org.freedesktop.NetworkManagerSystemSettings')'
>> <<SUCCESS>>
>>
>> And you can see in the Network Manager GUI that is connecting to the
>> VPN.
>>
>> /Daniel Åkerud
>>

Since this script still works (even in Ubuntu Karmic) but the pastebin
link has expired, and also since I have gotten off-list requests for
the script, I hereby post the script again (now retained forever):
http://pastebin.com/f37dffb97

BR/Daniel Åkerud


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]