Re: fragmentation options patch

2010-02-15 Thread Dan Williams
On Thu, 2010-02-04 at 16:11 +0100, Magnus Kulke wrote:
> Hello,
> 
> our openvpn-server needs the following configuration parameters to be set in 
> the client: 
> 
> tun-mtu 1500
> fragment 1300
> mssfix
> 
> the openvpn plugin for nm does not seem to support those. thus, i added an 
> additional 'Fragmentation'-tab to the advanced configuration dialog for 
> connection, where those options can be set. Importing the options from config 
> files is also supported. The patch is based on the ubuntu karmic package 
> (0.8git). 

Looks pretty good; but I can't commit until we push out 0.8 or the
Ubuntu guys will kill me for adding new translatable strings...

Two things, which I'd be very grateful if you could fix up before I get
around to it... (a) lets just put this stuff on the general tab for now,
and (b) add the code to export these options too?

Also, if you could strip out the "bes customization" comment lines that
would be great since those shouldn't get committed to git.

Thanks!
Dan

> to build a new binary on ubuntu karmic do the following:
> 
> create new directory and put fragmentation_options.patch in there.
> 
> apt-get install build-essential
> apt-get build-dep network-manager-openvpn
> apt-get source network-manager-openvpn
> dpkg-source -x 
> network-manager-openvpn_0.8~a~git.20091008t123607.7c184a9-0ubuntu1.dsc
> patch -p0 < fragmentation_options.patch
> cd network-manager-openvpn-0.8~a~git.20091008t123607.7c184a9-0ubuntu1
> fakeroot debian/rules binary
> 
> greets,
> 
> magnus
> 
> ___
> NetworkManager-list mailing list
> NetworkManager-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: OpenVPN Problem

2010-02-15 Thread Dan Williams
On Sat, 2010-02-13 at 12:33 +0100, rh wrote:
> 
> 
> Dan Williams schrieb: 
> > On Thu, 2010-02-11 at 15:40 +0100, rh wrote:
> >   
> > > R.Hnat
> > > 
> > > 
> > > Dan Williams schrieb: 
> > > 
> > > > On Tue, 2010-02-09 at 07:03 +0100, rh wrote:
> > > >   
> > > >   
> > > > > Dan Williams schrieb: 
> > > > > 
> > > > > 
> > > > > > On Sat, 2010-01-30 at 10:00 +0100, rh wrote:
> > > > > >   
> > > > > >   
> > > > > >   
> > > > > > > Dan Williams schrieb: 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > > On Fri, 2010-01-29 at 15:12 +0100, rh wrote:
> > > > > > > >   
> > > > > > > >   
> > > > > > > >   
> > > > > > > >   
> > > > > > > > > I try to connect to an OpenVPN Server (Located on an IPCop) 
> > > > > > > > > from my
> > > > > > > > > Ubuntu Box. I have Configured Netmanager with all necessary 
> > > > > > > > > parameters 
> > > > > > > > > Parameters following an IPCop Howto. But there happens 
> > > > > > > > > nothing when i
> > > > > > > > > try to connect. There are not any Logmessages in 
> > > > > > > > > /var/log/message, there
> > > > > > > > > is no error message, simply no reaction. I have installed
> > > > > > > > > Network-Manager and network-Manager-OpenVpn and the
> > > > > > > > > Network-Manager-Applet. What could that be?
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > You'll need to reboot after installing a new VPN plugin 
> > > > > > > > package.  If you
> > > > > > > > do that, does anything different happen?
> > > > > > > > 
> > > > > > > > Dan
> > > > > > > >   
> > > > > > > >   
> > > > > > > >   
> > > > > > > >   
> > > > > > > No this does not change anything. It is just like network-manager
> > > > > > > was'nt there. But i can see the process whith 'ps ax'. And i can 
> > > > > > > start
> > > > > > > the VPN using the 'openvpn' command from the commandline.
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > Have you configured the connection using nm-connection-editor in 
> > > > > > the VPN
> > > > > > tab?
> > > > > > 
> > > > > > Dan
> > > > > > 
> > > > > >   
> > > > > >   
> > > > > >   
> > > > > Of course I have configured with nm-connection-editor .
> > > > > 
> > > > > 
> > > > Ok, and you're using the applet menu to start the openvpn connection?
> > > > If you do this, then choose your VPN from the applet, do you get any
> > > > messages?
> > > > 
> > > > killall -TERM nm-openvpn-service
> > > > OPENVPN_DEBUG=1 /usr/libexec/nm-openvpn-service
> > > > 
> > > > If that doesn't work, can you attach your ~/.xsession-errors file so we
> > > > can see if it's a problem on the GUI side?
> > > > 
> > > > Dan
> > > > 
> > > >   
> > > >   
> > > No there is no reaction.
> > > 
> > > r...@ligeti:~$ killall -TERM nm-openvpn-service
> > > nm-openvpn-service: no process found
> > > r...@ligeti:~$ OPENVPN_DEBUG=1 /usr/libexec/nm-openvpn-service
> > > bash: /usr/libexec/nm-openvpn-service: No such file or directory
> > > 
> > 
> > Oh sorry... Debian-based distros put it elsewhere.  Try this:
> > 
> > killall -TERM nm-openvpn-service
> > OPENVPN_DEBUG=1 /usr/lib/network-manager-openvpn/nm-openvpn-service
> > 
> > and then lets see what it prints out.  If it's not there, then
> > 
> > dpkg -L network-manager-openvpn | grep nm-openvpn-service
> > 
> > will tell you where the binary is located.
> > 
> > Dan
> > 
> >   
> 
> OPENVPN_DEBUG=1 /usr/lib/network-manager-openvpn/nm-openvpn-service does 
> nothing and has to be stopped with ^C.

It won't print anything until it's told to make a VPN connection by
NetworkManager.  So just to confirm, you run this command, and then
you're choosing your VPN connection from the menu to start it, right?
And you get no output?

And you're running them as root, right?

Can you provide /var/log/daemon.log for me after this failure has
occurred?

> And here is what dpkg... says:
> r...@ligeti:~$ dpkg -L network-manager-openvpn |grep nm-openvpn-service
> /usr/lib/network-manager-openvpn/nm-openvpn-service
> /usr/lib/network-manager-openvpn/nm-openvpn-service-openvpn-helper
> /etc/dbus-1/system.d/nm-openvpn-service.conf
> /etc/NetworkManager/VPN/nm-openvpn-service.name
> 
> Might it be that the problem is that all these files are 'root-owned'
> and not executable from a simple user?

No, they are supposed to be root owned since they are security sensitive
and must launch privileged processes (your VPN).  Normally they are
spawned automatically by NetworkManager when needed, so the only time
they are really run by a user is for debugging.

Hopefully we can get to the bottom of this...

Dan


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: dbus-send examples

2010-02-15 Thread Dan Williams
On Sat, 2010-02-13 at 15:13 +0100, Jaša Bartelj wrote:
> Thank you very much, 代尔欣! Being new to D-Bus this helps a lot.
> 
> Unfortunately figuring out the correct parameters for the calls is
> quite difficult because there are no examples.
> 
> In interface "org.freedesktop.NetworkManager" the method
> "ActivateConnection" has 3 parameters (string, object,object or soo,
> see spec 
> http://projects.gnome.org/NetworkManager/developers/spec-08.html#org.freedesktop.NetworkManager).
> I figured out how to query NetworkManager for the latter two arguments
> but I'm at a loss what the service-name parameter should be.

Connections (profiles, configurations, etc) are a collection of all the
settings needed to connect to a specific network, like a 3G network, a
specific wifi network, etc.  Connections are provided by Settings
Services, of which there are two: user & system.

http://live.gnome.org/NetworkManagerConfiguration

(see "Settings Services")

The system settings service runs in system context (ie, as root) and
because of that, the connections it provides are available to all users.
User settings services (nm-applet, knetworkmanager, etc) run in a user's
login session, and because of that, the connections they provide are
only usable by that user, not by other users.

So the answer to your question depends on what settings service provides
the connection you want to make NetworkManager apply to the device
you're about to activate.  When you know that, you pass that
connection's D-Bus object path (as provided by the settings service that
exports it) and that settings service name to NetworkManager.

So if you know the UUID of the connection you want to connect, you do
something like this (pseudo-code):

my_uuid = "8c47de32-cc4a-437d-b340-ccdd1ccb3073"

my_connection_path = NULL
my_service = NULL

# maybe the connection we're looking for is
# provided by the system settings service
for each connection exported by org.freedesktop.NetworkManagerSystemSettings:
if this connection's UUID == my_uuid:
my_connection_path = this connection D-Bus object path
my_service = "org.freedesktop.NetworkManagerSystemSettings"

# or maybe it's provided by the user settings service
if not my_connection:
for each connection exported by org.freedesktop.NetworkManagerUserSettings:
if this connection's UUID == my_uuid:
my_connection_path = this connection D-Bus object path
my_service = "org.freedesktop.NetworkManagerUserSettings"

org.freedesktop.NetworkManager.ActivateConnection (my_service, 
my_connection_path, ...)

> Can anyone post an example or clarify what this is exactly? Thanks!
> 
> Here are a few script snippets I'm writing:

Python is actually a *lot* easier for this :)

Dan


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list