Re: networkmanager causes gnome to not be able to open any programs
Izzy Condie wrote: I have been having this problem for a while now and it has seemed random. All of a sudden I can't open any more programs, nothing happens. If I try to open a program in a console I get something like: gedit No protocol specified Cannot open display: Run 'gedit --help' to see a full list of available command line options. I check the display variable and it looks fine. I finally narrowed it down to something with networkmanager. I will be fine until I switch networks in networkmanager. If networkmanager always stays on the same network I am fine, but if I dare change networks I am then forced to kill X and re-log back in to be able to open anything new. What is causing this? Has anyone else experienced it? I found that the HOSTNAME variable was being reset to localhost.localdomain.com after networkmanager started up on my distro. I don't know where networkmanager was getting its information from on my distro so I simply added a HOSTNAME=$YOURHOSTNAME to my dhcpcd configuration file. On my distro its in /etc/conf.d/dhcpcd Ahhm ok. Mine was set back to localhost. Must have not paid attention when I oncec ran an etc-update on this gentoo system because I didn;t always have this problem.I just corrected it, see if that fixes it. Thanks for the tip. ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: networkmanager causes gnome to not be able to open any programs
Dan Williams wrote: On Wed, 2008-10-29 at 10:38 -0400, Izzy Condie wrote: I have been having this problem for a while now and it has seemed random. All of a sudden I can't open any more programs, nothing happens. If I try to open a program in a console I get something like: gedit No protocol specified Cannot open display: Run 'gedit --help' to see a full list of available command line options. I check the display variable and it looks fine. I finally narrowed it down to something with networkmanager. I will be fine until I switch networks in networkmanager. If networkmanager always stays on the same network I am fine, but if I dare change networks I am then forced to kill X and re-log back in to be able to open anything new. What is causing this? Has anyone else experienced it? I found that the HOSTNAME variable was being reset to localhost.localdomain.com after networkmanager started up on my distro. I don't know where networkmanager was getting its information What is the contents of /etc/NetworkManager/nm-system-settings.conf? There is no such file on my system, all I have is a /etc/NetworkManager/dispatcher.d/ directory. Is that the only location it could be? It could well be that you either have an older snapshot, or your distro hasn't configured it's system settings config correctly. I am using version 0.6.6 Dan from on my distro so I simply added a HOSTNAME=$YOURHOSTNAME to my dhcpcd configuration file. On my distro its in /etc/conf.d/dhcpcd ___ ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Feature request: Add a method to NetworkManagerSettings interface to create a new auto connection for a specified device.
On Thu, 2008-10-30 at 13:45 +0800, Zhe Su wrote: On Thu, Oct 30, 2008 at 12:53 PM, Dan Williams [EMAIL PROTECTED] wrote: On Wed, 2008-10-29 at 22:30 +0800, Zhe Su wrote: Hi, Currently, NetworkManagerSettings interface has method ListConnections() to list all existing connections. NetworkManagerSettings.Connection interface has method Update() to update properties of a connection, and Delete() to delete the connection. But there is no method to create a new auto connection for a specified device. Thus, it's impossible to fully control network manager and its applet from another application without implementing its own settings service. My suggestion is to add a new method to NetworkManagerSettings interface, say NewAutoConnection (or similar), to create a new auto connection for a specified device. Input parameter would be the device path and returns the path to newly created connection. You'd need to take into account different device types, because for some devices (wifi) you also need to specify some AP characteristics (at minimum, the SSID). Just NewAutoConnection() would be too simple. After creating the new connection, application can fill in the required properties by calling connection's Update() method. No, because the connection would be invalid until you fill the properties in. You need to set the properties when the connection is created (and thus it's valid) otherwise it won't be exported by the settings service, and then you wouldn't be able to call Update(). It also shouldn't take a device path, because connections aren't tied to a particular device at all; they can apply to any device of the same class. The way you tie a particular device to a connection is by locking the connection to the MAC address of that device. That's a property of the connection, and something that the caller of NewConnection would pass in the connection settings. Then NewConnection() method can just create a new empty connection without any property. Without this method, there is no way to an application to create a new connection at all. See above. With this new method, the API would be self-contained. 3rd applications would gain full connection manipulation ability solely via dbus, without linking to libnm-glib and libnm-utils. To be fair, libnm-glib and libnm-util have never been requirements, they are simply convenience libraries. Its quite possible to do everything the applet does in Python using plain D-Bus. Yes, it's possible, but if there is no external settings service that supports creating new connection via dbus, application must setup its own settings service and provide connection information by itself. It's far more complex and it's currently impossible in our application. Ah, but there is: the system settings service :) Basically, you can do all of this today using the system settings service if you like, with the keyfile plugin, authenticated by PolicyKit. This is how the connection editor already works when creating new system connections, or when moving a connection from user to system scope. I'd suggest using the system settings service instead of the applet, since that also allows the connection to be used before login and across fast user switches. How to create a new connection in system settings service via dbus? It's not feasible for us to depend on anything else except dbus. You put together the properties you want the connection to have, then you call org.freedesktop.NetworkManagerSettings.System.AddConnection() method of the system settings service, and pass in the dict of dicts that specifies the connection you wish to add. The outer dict is the Connection object, which contains a string::dict mapping of Setting objects. Each Setting object is itself a dict of string::type mappings that specify the properties of that setting. There are settings for wireless, IPv4, wireless security, wired, 802.1x, vpn, pppoe, etc. The settings service has absolutely no idea what sort of connection you want to create; for wireless you need to specify the SSID at least, and you probably want to specify the security options too. For VPNs, you'll need at least the VPN gateway IP address and the username or certificates too. For wired you can usually get away with just DHCP. For mobile broadband, you'll need the dialing # at a minimum, and probably
Re: Feature request: Add a method to NetworkManagerSettings interface to create a new auto connection for a specified device.
Oh, thanks. I didn't notice that there is a AddConnection() method in SystemSettings service. Seems that it's not in current public api documentation. And I'm wondering why user settings service doesn't have similar method. I'll try this method and give you feedback. Regards James Su On Thu, Oct 30, 2008 at 2:42 PM, Dan Williams [EMAIL PROTECTED] wrote: On Thu, 2008-10-30 at 13:45 +0800, Zhe Su wrote: On Thu, Oct 30, 2008 at 12:53 PM, Dan Williams [EMAIL PROTECTED] wrote: On Wed, 2008-10-29 at 22:30 +0800, Zhe Su wrote: Hi, Currently, NetworkManagerSettings interface has method ListConnections() to list all existing connections. NetworkManagerSettings.Connection interface has method Update() to update properties of a connection, and Delete() to delete the connection. But there is no method to create a new auto connection for a specified device. Thus, it's impossible to fully control network manager and its applet from another application without implementing its own settings service. My suggestion is to add a new method to NetworkManagerSettings interface, say NewAutoConnection (or similar), to create a new auto connection for a specified device. Input parameter would be the device path and returns the path to newly created connection. You'd need to take into account different device types, because for some devices (wifi) you also need to specify some AP characteristics (at minimum, the SSID). Just NewAutoConnection() would be too simple. After creating the new connection, application can fill in the required properties by calling connection's Update() method. No, because the connection would be invalid until you fill the properties in. You need to set the properties when the connection is created (and thus it's valid) otherwise it won't be exported by the settings service, and then you wouldn't be able to call Update(). It also shouldn't take a device path, because connections aren't tied to a particular device at all; they can apply to any device of the same class. The way you tie a particular device to a connection is by locking the connection to the MAC address of that device. That's a property of the connection, and something that the caller of NewConnection would pass in the connection settings. Then NewConnection() method can just create a new empty connection without any property. Without this method, there is no way to an application to create a new connection at all. See above. With this new method, the API would be self-contained. 3rd applications would gain full connection manipulation ability solely via dbus, without linking to libnm-glib and libnm-utils. To be fair, libnm-glib and libnm-util have never been requirements, they are simply convenience libraries. Its quite possible to do everything the applet does in Python using plain D-Bus. Yes, it's possible, but if there is no external settings service that supports creating new connection via dbus, application must setup its own settings service and provide connection information by itself. It's far more complex and it's currently impossible in our application. Ah, but there is: the system settings service :) Basically, you can do all of this today using the system settings service if you like, with the keyfile plugin, authenticated by PolicyKit. This is how the connection editor already works when creating new system connections, or when moving a connection from user to system scope. I'd suggest using the system settings service instead of the applet, since that also allows the connection to be used before login and across fast user switches. How to create a new connection in system settings service via dbus? It's not feasible for us to depend on anything else except dbus. You put together the properties you want the connection to have, then you call org.freedesktop.NetworkManagerSettings.System.AddConnection() method of the system settings service, and pass in the dict of dicts that specifies the connection you wish to add. The outer dict is the Connection object, which contains a string::dict mapping of Setting objects. Each Setting object is itself a dict of string::type mappings that specify the properties of that setting. There are settings for wireless, IPv4, wireless security, wired, 802.1x, vpn, pppoe, etc. The settings service has absolutely
Re: openvpn plugin http-proxy support patch
Dan Williams wrote: On Thu, 2008-10-16 at 15:41 +0200, Tomas Kovacik wrote: Hi, this is my first code after 8 years, I hope it's ok . Basically it's only copy/paste :). Proxy auth is not implemented yet. Any idea what other auth options are valid when tunelling through a proxy server? I've seen a config that uses the normal TLS options, but are password+TLS and password usable? I assume static key is not? Tests done, i try all 4 auth options(tls,pass,tls+pass,static key) throuht a proxy server and everthing works perfect t. If proxy support is mutually exclusive of the others (which I don't think it is but don't know for sure) then it should be an additional auth method. If it's not mutually exclusive, then we should add it as a tab in the Advanced dialog for those options. Dan ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Openvpn plugin static key - configuration problem
Hi, today I try static key openvpn configuration, and i have some problems with setup. Oct 30 12:01:20 das NetworkManager: WARN nm_vpn_connection_connect_cb(): VPN connection 'static key' failed to connect: 'Missing required local IP address for static key mode.'. ... Oct 30 12:02:13 das NetworkManager: WARN nm_vpn_connection_connect_cb(): VPN connection 'static key' failed to connect: 'Missing required remote IP address for static key mode.'. Openvpn service(?) expect local-ip and remote-ip keys: I try put in field Local IP Adress values: 10.0.0.2 10.0.0.1 10.0.0.2, 10.0.0.1 10.0.0.2 nothing works, also there is no tooltip or help with usefull information, so i look at source and put these keys in Gconf, then static key work also via openvpn plugin. What do I wrong? t. (sorry for my english) ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Feature request: Add a method to NetworkManagerSettings interface to create a new auto connection for a specified device.
On Thu, 2008-10-30 at 15:43 +0800, Zhe Su wrote: Oh, thanks. I didn't notice that there is a AddConnection() method in SystemSettings service. Seems that it's not in current public api documentation. And I'm wondering why user settings service doesn't have similar method. It's defined in the introspection/ directory, most of which is public API. If you build with --with-docs=yes, you'll get it in the NetworkManager spec in docs/. dan I'll try this method and give you feedback. Regards James Su On Thu, Oct 30, 2008 at 2:42 PM, Dan Williams [EMAIL PROTECTED] wrote: On Thu, 2008-10-30 at 13:45 +0800, Zhe Su wrote: On Thu, Oct 30, 2008 at 12:53 PM, Dan Williams [EMAIL PROTECTED] wrote: On Wed, 2008-10-29 at 22:30 +0800, Zhe Su wrote: Hi, Currently, NetworkManagerSettings interface has method ListConnections() to list all existing connections. NetworkManagerSettings.Connection interface has method Update() to update properties of a connection, and Delete() to delete the connection. But there is no method to create a new auto connection for a specified device. Thus, it's impossible to fully control network manager and its applet from another application without implementing its own settings service. My suggestion is to add a new method to NetworkManagerSettings interface, say NewAutoConnection (or similar), to create a new auto connection for a specified device. Input parameter would be the device path and returns the path to newly created connection. You'd need to take into account different device types, because for some devices (wifi) you also need to specify some AP characteristics (at minimum, the SSID). Just NewAutoConnection() would be too simple. After creating the new connection, application can fill in the required properties by calling connection's Update() method. No, because the connection would be invalid until you fill the properties in. You need to set the properties when the connection is created (and thus it's valid) otherwise it won't be exported by the settings service, and then you wouldn't be able to call Update(). It also shouldn't take a device path, because connections aren't tied to a particular device at all; they can apply to any device of the same class. The way you tie a particular device to a connection is by locking the connection to the MAC address of that device. That's a property of the connection, and something that the caller of NewConnection would pass in the connection settings. Then NewConnection() method can just create a new empty connection without any property. Without this method, there is no way to an application to create a new connection at all. See above. With this new method, the API would be self-contained. 3rd applications would gain full connection manipulation ability solely via dbus, without linking to libnm-glib and libnm-utils. To be fair, libnm-glib and libnm-util have never been requirements, they are simply convenience libraries. Its quite possible to do everything the applet does in Python using plain D-Bus. Yes, it's possible, but if there is no external settings service that supports creating new connection via dbus, application must setup its own settings service and provide connection information by itself. It's far more complex and it's currently impossible in our application. Ah, but there is: the system settings service :) Basically, you can do all of this today using the system
Re: networkmanager causes gnome to not be able to open any programs
On Wed, 2008-10-29 at 23:37 -0700, Xamindar wrote: Dan Williams wrote: On Wed, 2008-10-29 at 10:38 -0400, Izzy Condie wrote: I have been having this problem for a while now and it has seemed random. All of a sudden I can't open any more programs, nothing happens. If I try to open a program in a console I get something like: gedit No protocol specified Cannot open display: Run 'gedit --help' to see a full list of available command line options. I check the display variable and it looks fine. I finally narrowed it down to something with networkmanager. I will be fine until I switch networks in networkmanager. If networkmanager always stays on the same network I am fine, but if I dare change networks I am then forced to kill X and re-log back in to be able to open anything new. What is causing this? Has anyone else experienced it? I found that the HOSTNAME variable was being reset to localhost.localdomain.com after networkmanager started up on my distro. I don't know where networkmanager was getting its information What is the contents of /etc/NetworkManager/nm-system-settings.conf? There is no such file on my system, all I have is a /etc/NetworkManager/dispatcher.d/ directory. Is that the only location it could be? It could well be that you either have an older snapshot, or your distro hasn't configured it's system settings config correctly. I am using version 0.6.6 Ok, then everything I said does not apply. The Gentoo backend for NM 0.6.6 does change the hostname based on DHCP server response. Dan ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: openvpn plugin http-proxy support patch
uf, patch has wrong name, I change it to successfully apply on today svn. t. Tomas Kovacik wrote: version with tab. t. Dan Williams wrote: On Mon, 2008-10-20 at 14:07 +0200, Tomas Kovacik wrote: patch clenup, no verbose, no standalone port import. Can it be reworked to put it into a tab in the Advanced... dialog instead? I'd prefer to have it there since many installations won't necessarily use it. Only the most common options should be in the main dialog. Thanks! Dan Tomas Kovacik wrote: Hi, this is my first code after 8 years, I hope it's ok . Basically it's only copy/paste :). Proxy auth is not implemented yet. t. ___ 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 ___ 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: VPN Only for this address range equivalent
On Thu, 2008-10-30 at 00:12 -0400, Dan Williams wrote: On Wed, 2008-10-29 at 15:10 -0700, Jonathan wrote: In the old NetworkManager I could set a range of addresses to use the VPN connection for and have the rest not use it. I don't see this equivalent in the 0.7.0. Is there somewhere I can configure this? I basically only want it to use the VPN for all addresses on a certain domain. You can add custom routes in the IPv4 tab of the connection editor for the VPN connection. You can also check ignore automatically provided routes if you don't care what the server sends you. Is there some way to see what the server has sent me when a connection is active? TIA. Dan -- Matthew Saltzman Clemson University Math Sciences mjs AT clemson DOT edu http://www.math.clemson.edu/~mjs ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Openvpn plugin static key - configuration problem
If you want here is a patch. t. Tomas Kovacik wrote: Hi, today I try static key openvpn configuration, and i have some problems with setup. Oct 30 12:01:20 das NetworkManager: WARN nm_vpn_connection_connect_cb(): VPN connection 'static key' failed to connect: 'Missing required local IP address for static key mode.'. ... Oct 30 12:02:13 das NetworkManager: WARN nm_vpn_connection_connect_cb(): VPN connection 'static key' failed to connect: 'Missing required remote IP address for static key mode.'. Openvpn service(?) expect local-ip and remote-ip keys: I try put in field Local IP Adress values: 10.0.0.2 10.0.0.1 10.0.0.2, 10.0.0.1 10.0.0.2 nothing works, also there is no tooltip or help with usefull information, so i look at source and put these keys in Gconf, then static key work also via openvpn plugin. What do I wrong? t. (sorry for my english) ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list diff -ur network-manager-openvpn-0.7~~svn20081015t024626/properties/auth-helpers.c network-manager-openvpn-0.7~~svn20081015t024626.static/properties/auth-helpers.c --- network-manager-openvpn-0.7~~svn20081015t024626/properties/auth-helpers.c 2008-10-02 21:41:09.0 +0200 +++ network-manager-openvpn-0.7~~svn20081015t024626.static/properties/auth-helpers.c 2008-10-30 18:10:13.132375413 +0100 @@ -301,6 +301,16 @@ if (value strlen (value)) gtk_entry_set_text (GTK_ENTRY (widget), value); } + +widget = glade_xml_get_widget (xml, sk_remote_address_entry); +gtk_size_group_add_widget (group, widget); +g_signal_connect (G_OBJECT (widget), changed, G_CALLBACK (changed_cb), user_data); +if (s_vpn s_vpn-data) { +value = g_hash_table_lookup (s_vpn-data, NM_OPENVPN_KEY_REMOTE_IP); +if (value strlen (value)) +gtk_entry_set_text (GTK_ENTRY (widget), value); +} + } static gboolean @@ -415,6 +425,17 @@ NM_OPENVPN_KEY_LOCAL_IP); return FALSE; } + +widget = glade_xml_get_widget (xml, sk_remote_address_entry); +str = gtk_entry_get_text (GTK_ENTRY (widget)); +if (!str || !strlen (str)) { +g_set_error (error, + OPENVPN_PLUGIN_UI_ERROR, + OPENVPN_PLUGIN_UI_ERROR_INVALID_PROPERTY, + NM_OPENVPN_KEY_REMOTE_IP); +return FALSE; +} + } else g_assert_not_reached (); @@ -487,6 +508,7 @@ GtkTreeModel *model; GtkTreeIter iter; GtkWidget *widget; + const char *value; if (!strcmp (contype, NM_OPENVPN_CONTYPE_TLS)) { update_tls (xml, tls, s_vpn); @@ -511,6 +527,25 @@ g_free (tmp); } } + + widget = glade_xml_get_widget (xml, sk_local_address_entry); +value = (char *) gtk_entry_get_text (GTK_ENTRY (widget)); + +if (value strlen (value)) { + g_hash_table_insert (s_vpn-data, + g_strdup (NM_OPENVPN_KEY_LOCAL_IP), + g_strdup (value)); +} + +widget = glade_xml_get_widget (xml, sk_remote_address_entry); +value = (char *) gtk_entry_get_text (GTK_ENTRY (widget)); + +if (value strlen (value)) { + g_hash_table_insert (s_vpn-data, + g_strdup (NM_OPENVPN_KEY_REMOTE_IP), + g_strdup (value)); +} + } else g_assert_not_reached (); diff -ur network-manager-openvpn-0.7~~svn20081015t024626/properties/nm-openvpn-dialog.glade network-manager-openvpn-0.7~~svn20081015t024626.static/properties/nm-openvpn-dialog.glade --- network-manager-openvpn-0.7~~svn20081015t024626/properties/nm-openvpn-dialog.glade 2008-10-02 21:41:09.0 +0200 +++ network-manager-openvpn-0.7~~svn20081015t024626.static/properties/nm-openvpn-dialog.glade 2008-10-30 18:28:00.468406458 +0100 @@ -610,7 +610,7 @@ child widget class=GtkTable id=table6 property name=visibleTrue/property -property name=n_rows4/property +property name=n_rows5/property property name=n_columns2/property property name=column_spacing6/property property name=row_spacing6/property @@ -729,6 +729,36 @@ property name=y_options/property /packing /child +