<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Network Manager - Autostart VPN</title>
	<atom:link href="http://blog.mithis.net/archives/ideas/51-nm-autovpn/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.mithis.net/archives/ideas/51-nm-autovpn</link>
	<description></description>
	<pubDate>Wed, 07 Jan 2009 19:55:49 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: sam</title>
		<link>http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-7153</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Tue, 11 Nov 2008 23:07:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-7153</guid>
		<description>Not really hard:

http://www.linuxquestions.org/questions/linux-networking-3/openvpn-client-682343/</description>
		<content:encoded><![CDATA[<p>Not really hard:</p>
<p><a href="http://www.linuxquestions.org/questions/linux-networking-3/openvpn-client-682343/" rel="nofollow">http://www.linuxquestions.org/questions/linux-networking-3/openvpn-client-682343/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cougar</title>
		<link>http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-7147</link>
		<dc:creator>Cougar</dc:creator>
		<pubDate>Tue, 26 Aug 2008 21:37:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-7147</guid>
		<description>I couldn't get nm-startvpn running under opensuse 11.0. It gives me error:

Traceback (most recent call last):
  File "/usr/local/bin/nm-startvpn", line 29, in 
    print interface.getVPNConnections()
  File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 68, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 607, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "getVPNConnections" with signature "" on interface "org.freedesktop.NetworkManager.VPNConnections" doesn't exist

However, I changed 02runcmd so that is just starts/stops openvpn and this works fine

#! /bin/sh

case "$2" in 
        up)
                /usr/sbin/rcopenvpn start
                ;;
        down)
                /usr/sbin/rcopenvpn stop
                ;;
esac

exit 0</description>
		<content:encoded><![CDATA[<p>I couldn&#8217;t get nm-startvpn running under opensuse 11.0. It gives me error:</p>
<p>Traceback (most recent call last):<br />
  File &#8220;/usr/local/bin/nm-startvpn&#8221;, line 29, in<br />
    print interface.getVPNConnections()<br />
  File &#8220;/usr/lib/python2.5/site-packages/dbus/proxies.py&#8221;, line 68, in __call__<br />
    return self._proxy_method(*args, **keywords)<br />
  File &#8220;/usr/lib/python2.5/site-packages/dbus/proxies.py&#8221;, line 140, in __call__<br />
    **keywords)<br />
  File &#8220;/usr/lib/python2.5/site-packages/dbus/connection.py&#8221;, line 607, in call_blocking<br />
    message, timeout)<br />
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method &#8220;getVPNConnections&#8221; with signature &#8220;&#8221; on interface &#8220;org.freedesktop.NetworkManager.VPNConnections&#8221; doesn&#8217;t exist</p>
<p>However, I changed 02runcmd so that is just starts/stops openvpn and this works fine</p>
<p>#! /bin/sh</p>
<p>case &#8220;$2&#8243; in<br />
        up)<br />
                /usr/sbin/rcopenvpn start<br />
                ;;<br />
        down)<br />
                /usr/sbin/rcopenvpn stop<br />
                ;;<br />
esac</p>
<p>exit 0</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mithro</title>
		<link>http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-6759</link>
		<dc:creator>mithro</dc:creator>
		<pubDate>Mon, 18 Feb 2008 23:11:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-6759</guid>
		<description>You are correct. For newer versions of ubuntu this change appears to be needed (I just recently upgraded to Hardy Heron and needed to make this change also).</description>
		<content:encoded><![CDATA[<p>You are correct. For newer versions of ubuntu this change appears to be needed (I just recently upgraded to Hardy Heron and needed to make this change also).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raporu78</title>
		<link>http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-6758</link>
		<dc:creator>raporu78</dc:creator>
		<pubDate>Mon, 18 Feb 2008 16:57:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-6758</guid>
		<description>thx for this little piece of goodness

but since i tested it an my configuration I think there is a problem in the sed command

your iwconfig $IFACE 2&#62;&#38;1 &#124; grep ESSID &#124; sed -e's/.*ESSID:"\(.*\)"/\1/' -e's/ //g'
give me 
802.1X"Nickname:"

so I changed it a little bit to
iwconfig $IFACE 2&#62;&#38;1 &#124; grep ESSID &#124; sed -e's/.*ESSID:"\(.*\)".*".*"/\1/' -e's/ //g'

thx anyway
raporu</description>
		<content:encoded><![CDATA[<p>thx for this little piece of goodness</p>
<p>but since i tested it an my configuration I think there is a problem in the sed command</p>
<p>your iwconfig $IFACE 2&gt;&amp;1 | grep ESSID | sed -e&#8217;s/.*ESSID:&#8221;\(.*\)&#8221;/\1/&#8217; -e&#8217;s/ //g&#8217;<br />
give me<br />
802.1X&#8221;Nickname:&#8221;</p>
<p>so I changed it a little bit to<br />
iwconfig $IFACE 2&gt;&amp;1 | grep ESSID | sed -e&#8217;s/.*ESSID:&#8221;\(.*\)&#8221;.*&#8221;.*&#8221;/\1/&#8217; -e&#8217;s/ //g&#8217;</p>
<p>thx anyway<br />
raporu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Quail</title>
		<link>http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-6718</link>
		<dc:creator>Quail</dc:creator>
		<pubDate>Mon, 07 Jan 2008 00:37:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-6718</guid>
		<description>Hi Mithro,

Thanks for the scripts I have implemented them for my home vpn connection I run over wireless.  The only prob I have is that it fail to make the initial connection when you login after reboot or boot up and you get the pop up error saying it can't establish the openvpn connection and you have to manually start it.  Do you have the same problem? if not how have you got it to auto connect on login?

Nice scripts to by the way

Regards
Quail</description>
		<content:encoded><![CDATA[<p>Hi Mithro,</p>
<p>Thanks for the scripts I have implemented them for my home vpn connection I run over wireless.  The only prob I have is that it fail to make the initial connection when you login after reboot or boot up and you get the pop up error saying it can&#8217;t establish the openvpn connection and you have to manually start it.  Do you have the same problem? if not how have you got it to auto connect on login?</p>
<p>Nice scripts to by the way</p>
<p>Regards<br />
Quail</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mithro</title>
		<link>http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-162</link>
		<dc:creator>mithro</dc:creator>
		<pubDate>Tue, 30 Oct 2007 03:38:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-162</guid>
		<description>I don’t have any Feisty of Edgy installs to test with, hence why I didn’t comment initially. It seems to be a problem with either the older NetworkManager or the older python-dbus binding.

I found out what had to be done through reading the source code and much trial and error. Took me about 6 hours to figure out that tiny script!</description>
		<content:encoded><![CDATA[<p>I don’t have any Feisty of Edgy installs to test with, hence why I didn’t comment initially. It seems to be a problem with either the older NetworkManager or the older python-dbus binding.</p>
<p>I found out what had to be done through reading the source code and much trial and error. Took me about 6 hours to figure out that tiny script!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philip Peitsch</title>
		<link>http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-160</link>
		<dc:creator>Philip Peitsch</dc:creator>
		<pubDate>Tue, 30 Oct 2007 00:26:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-160</guid>
		<description>Ahh... Gutsy only.  Would explain why it crashes on my Feisty install too :-)

Might be good to update the earlier parts of the page to make this more explicit.  Just out of interest, how did you find the details to write your script?</description>
		<content:encoded><![CDATA[<p>Ahh&#8230; Gutsy only.  Would explain why it crashes on my Feisty install too <img src='http://blog.mithis.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Might be good to update the earlier parts of the page to make this more explicit.  Just out of interest, how did you find the details to write your script?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mithro</title>
		<link>http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-150</link>
		<dc:creator>mithro</dc:creator>
		<pubDate>Sat, 27 Oct 2007 02:48:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-150</guid>
		<description>What version of Ubuntu are you using? It &lt;b&gt;does not work on Feisty&lt;/b&gt;. It works fine for both me and another person on Gusty.

I have not tested with any other VPN connection apart from openvpn as well.</description>
		<content:encoded><![CDATA[<p>What version of Ubuntu are you using? It <b>does not work on Feisty</b>. It works fine for both me and another person on Gusty.</p>
<p>I have not tested with any other VPN connection apart from openvpn as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mathijs</title>
		<link>http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-147</link>
		<dc:creator>Mathijs</dc:creator>
		<pubDate>Fri, 26 Oct 2007 11:03:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-147</guid>
		<description>I have tried the script as Robin did and I get the exact same result.

(To help Robin out: you can restart nm-applet by restarting NetworkManager and NetworkManagerDispatcher sevices if those should have bailed out as well (happende to me once while testing), in a terminal type:
&lt;code&gt;
ps -A &#124;grep -i Network
# With the pid numbers you can now do:
sudo kill #PIDNRS
&lt;/code&gt;
Do the same for nm-applet (grep -i nm)
Then restart NetworkManager and NetworkManagerDispatcher as root and start nm-applet using ctrl+F2)

I have taken a look at the source code of the networkmanager vpn dbus interface and I could not find any error's in the code you used (then again, this was my first time I took a look at a phython script :p )

However we should get an output from the nm-applet (when running inside the console) saying it is connection to the VPN. (Don't know the exact message, but run nm-applet inside the terminal and break the VPN cpnnection and set it up again, you'll see what I mean)

I believe the script works for you Mithro? Are you running it as root, have got anything special configured? (eg inside your keyring) Anyhting that might explain the script to fail us?

I have been trying to autoconnect my vpn for a long time and basicly gave up because I didn't feel like 'hacking' a script together, but this is reeeaaal close to a solution...

I hope I'll hearing from you,
Mathijs</description>
		<content:encoded><![CDATA[<p>I have tried the script as Robin did and I get the exact same result.</p>
<p>(To help Robin out: you can restart nm-applet by restarting NetworkManager and NetworkManagerDispatcher sevices if those should have bailed out as well (happende to me once while testing), in a terminal type:<br />
<code><br />
ps -A |grep -i Network<br />
# With the pid numbers you can now do:<br />
sudo kill #PIDNRS<br />
</code><br />
Do the same for nm-applet (grep -i nm)<br />
Then restart NetworkManager and NetworkManagerDispatcher as root and start nm-applet using ctrl+F2)</p>
<p>I have taken a look at the source code of the networkmanager vpn dbus interface and I could not find any error&#8217;s in the code you used (then again, this was my first time I took a look at a phython script :p )</p>
<p>However we should get an output from the nm-applet (when running inside the console) saying it is connection to the VPN. (Don&#8217;t know the exact message, but run nm-applet inside the terminal and break the VPN cpnnection and set it up again, you&#8217;ll see what I mean)</p>
<p>I believe the script works for you Mithro? Are you running it as root, have got anything special configured? (eg inside your keyring) Anyhting that might explain the script to fail us?</p>
<p>I have been trying to autoconnect my vpn for a long time and basicly gave up because I didn&#8217;t feel like &#8216;hacking&#8217; a script together, but this is reeeaaal close to a solution&#8230;</p>
<p>I hope I&#8217;ll hearing from you,<br />
Mathijs</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robin</title>
		<link>http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-128</link>
		<dc:creator>Robin</dc:creator>
		<pubDate>Tue, 25 Sep 2007 03:56:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mithis.net/archives/ideas/51-nm-autovpn#comment-128</guid>
		<description>I was pretty excited to find your blog posting - unfortunately it doesn't work on my ubuntu feisty system.  More specifically the python script causes nm-applet to crash and I get this feedback:

Starting 'VPN_Name' VPN
dbus.Array([dbus.String(u'VPN_Name')], signature=dbus.Signature('s'))
(dbus.String(u'VPN_Name'), dbus.String(u'username'), dbus.String(u'org.freedesktop.NetworkManager.vpnc'), dbus.UInt32(1L))
None

I can't restart the script manually afterwards.  Not sure if that help to identify the problem.</description>
		<content:encoded><![CDATA[<p>I was pretty excited to find your blog posting - unfortunately it doesn&#8217;t work on my ubuntu feisty system.  More specifically the python script causes nm-applet to crash and I get this feedback:</p>
<p>Starting &#8216;VPN_Name&#8217; VPN<br />
dbus.Array([dbus.String(u'VPN_Name')], signature=dbus.Signature(&#8217;s&#8217;))<br />
(dbus.String(u&#8217;VPN_Name&#8217;), dbus.String(u&#8217;username&#8217;), dbus.String(u&#8217;org.freedesktop.NetworkManager.vpnc&#8217;), dbus.UInt32(1L))<br />
None</p>
<p>I can&#8217;t restart the script manually afterwards.  Not sure if that help to identify the problem.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
