Dan Williams wrote: > On Wed, 2008-11-26 at 14:11 +0100, Harald Solheim wrote: >> When at the University I need to use VPN to get internet access. When I >> am at home or at other locations I need to use VPN for access to email >> and scientific journals, so I use a different VPN profile for this. I >> have seen that NetworkManager can run a script when there is a change in >> network status. Is there any way I can have NetworkManager automatically >> connect to a specific VPN profile depending on which network I am >> connected to, and get the normal visual feedback from nm-applet about >> the VPN connection? I sometimes lose the VPN connection, so it's nice to >> get a notification of this. > > This functionality is planned. However, you might be able to get it > implemented by using a dispatcher script based on the connection UUID > that was just activated. Have a list of connection UUIDs that you'd > like the VPN to activate for, and when that connection is brought up, > ask NM to activate that VPN. However, this will only work for > system-wide connections, because the scripts are run as root. Hence why > it's better to get it fully integrated into NM itself.
In fact, it works for user configured vpn connections but not for system-wide ones. While trying to setup something similar to what the OP wanted a couple days ago, I hit a few oddities: - system-wide openvpn connection failed to activate with something like 'couldn't find configuration options' both through the applet and dbus - user configured openvpn connection can be activated from a dispatcher python script run as root through dbus just fine - Auto-ethernet connections without specific configuration, will return connection details (talking dbus here) for the first configured connection (as known by NetworkManagerUserSettings) whatever it is (in this case it was a wireless one). Rationale: have only enabled ethernet connection without specific config, enumerate ActiveConnections, get settings for that object path-> you get config details for a different connection. - nm-applet disappears when using fast user switching (only the first logged on user gets it) - You can't change a configured connection from user to system-wide through nm-applet UI. You can change the checkbox, but it doesn't do anything. I had to re-enter all the details. - Setting up a wireless connection as system-wide with security enabled through the nm-applet UI will not store the key anywhere. These happened in two configurations: - Ubuntu hardy + network-manager PPA (whatever version was available on monday) - F9 all updates applied I'll try to dig the details for each of the issues later this week and fill bugzilla entries with more specific info for each one of them (real repro cases, version numbers, specific error messages, etc). -- Angel Marin http://anmar.eu.org/ _______________________________________________ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list