Re: The logic behind user/system settings
On Thursday 18 of March 2010 03:43:36 Dan Williams wrote: > The connection editor only shows connections that *soemthing* has > defined. To close this thread - yes, it turned out I did have these two connections defined as my user connections. I have no idea where did they come from - probably as a result of playing with nm-applet. I use KDE not Gnome so I normally do not use nm-applet at all and I did not know where nm-applet saves user settings. Sorry for the noise. signature.asc Description: This is a digitally signed message part. ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: The logic behind user/system settings
On Tue, 2010-03-16 at 07:04 +0300, Andrey Borzenkov wrote: > On Tuesday 16 of March 2010 02:10:25 Dan Williams wrote: > > On Sat, 2010-03-13 at 08:17 +0300, Andrey Borzenkov wrote: > > > On Friday 12 of March 2010 02:51:33 Dan Williams wrote: > > > > On Wed, 2010-03-10 at 07:04 +0300, Andrey Borzenkov wrote: > > > > > On Wednesday 10 of March 2010 04:12:19 Dan Williams wrote: > > > > > > As you've discovered, there are user-specific settings (which > > > > > > are only available when that user is logged in) and > > > > > > system-wide settings (which are available to all users *and* > > > > > > before any user has logged in). The problem you're hitting > > > > > > is when there aren't any settings at all, like right after > > > > > > an install. > > > > > > > > > > > > So NetworkManager creates an internal "Auto " connection > > > > > > that at least allows your system to get online if there are > > > > > > any DHCP-configured ethernet devices on the system. This is > > > > > > a "system-wide" connection and should be available at boot > > > > > > and before login. > > > > > > > > > > Are they created by NM service or > > > > > nm-connection-editor/nm-applet? Should they be present even if > > > > > other, explicitly defined connections exist? > > > > > > > > It is created by NM itself. It's present only if no other > > > > /system/ connections are defined that apply to that device. > > > > > > How NM decides that /system/ connection applies to device? I always > > > see two auto connections for wlan interface - "Auto Wireless" and > > > "Auto $CURRENT_SSID" even though there are system connections with > > > $CURRENT_SSID defined. > > > > A connection can be applied to a device if it's compatible with that > > device; that means that the connection isn't MAC-locked to a > > different device, or the connection doesn't require encryption > > capabilities that the device doesn't support (ie a WPA2/AES > > connection cannot be used with an old Prism card that only does > > TKIP), etc. > > > > Is the "Auto Wireless" a system connection? > > Actually, now. "Available for all users" is unchecked and greyed out. I > also do not see these connections using cnetworkmanager. They appear to > be created by nm-connection-editor itself for *some* APs in Ok, the fact that the box is grayed out means that either (1) PolicyKit and/or ConsoleKit aren't correctly installed (unlikely), or (2) you don't have a system-settings plugin installed which is capable of saving connections. Check your /etc/NetworkManager/nm-system-settings.conf file to see what system settings plugins you have enabled. If you have 'keyfile' enabled, look in /etc/NetworkManager/system-connections/. If you have 'ifupdown' enabled, look in /etc/network/interfaces. If you have 'ifcfg-rh' enabled, look for files in /etc/sysconfig/network-scripts that start with "ifcfg-". > ./src/applet-device-wifi.c:wireless_new_auto_connection() Yes, the only two places new user connections are created are in the applet, when you click on a scanned network for which there isn't an existing connection, or in the connection editor when you click "New". > I do not understand how APs are selected - n-c-e always shows exactly > two of them. One is my home AP; another has literal name 'Wireless', but > I do not see it in scan result. The connection editor only shows connections that *soemthing* has defined. So it's either provided by some system settings plugin, or it's been created in the applet. The name "Wireless" seems to indicate that it's a system connection, since the applet always names things "Auto ". It could also have been created by a user manually through the connection editor, but by default the connection editor names new connections like "Wireless connection 1" and "Wireless connection 2". So my guess is that this connection is a system connection provided by one of your plugins. Dan ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: The logic behind user/system settings
On Tuesday 16 of March 2010 02:10:25 Dan Williams wrote: > On Sat, 2010-03-13 at 08:17 +0300, Andrey Borzenkov wrote: > > On Friday 12 of March 2010 02:51:33 Dan Williams wrote: > > > On Wed, 2010-03-10 at 07:04 +0300, Andrey Borzenkov wrote: > > > > On Wednesday 10 of March 2010 04:12:19 Dan Williams wrote: > > > > > As you've discovered, there are user-specific settings (which > > > > > are only available when that user is logged in) and > > > > > system-wide settings (which are available to all users *and* > > > > > before any user has logged in). The problem you're hitting > > > > > is when there aren't any settings at all, like right after > > > > > an install. > > > > > > > > > > So NetworkManager creates an internal "Auto " connection > > > > > that at least allows your system to get online if there are > > > > > any DHCP-configured ethernet devices on the system. This is > > > > > a "system-wide" connection and should be available at boot > > > > > and before login. > > > > > > > > Are they created by NM service or > > > > nm-connection-editor/nm-applet? Should they be present even if > > > > other, explicitly defined connections exist? > > > > > > It is created by NM itself. It's present only if no other > > > /system/ connections are defined that apply to that device. > > > > How NM decides that /system/ connection applies to device? I always > > see two auto connections for wlan interface - "Auto Wireless" and > > "Auto $CURRENT_SSID" even though there are system connections with > > $CURRENT_SSID defined. > > A connection can be applied to a device if it's compatible with that > device; that means that the connection isn't MAC-locked to a > different device, or the connection doesn't require encryption > capabilities that the device doesn't support (ie a WPA2/AES > connection cannot be used with an old Prism card that only does > TKIP), etc. > > Is the "Auto Wireless" a system connection? Actually, now. "Available for all users" is unchecked and greyed out. I also do not see these connections using cnetworkmanager. They appear to be created by nm-connection-editor itself for *some* APs in ./src/applet-device-wifi.c:wireless_new_auto_connection() I do not understand how APs are selected - n-c-e always shows exactly two of them. One is my home AP; another has literal name 'Wireless', but I do not see it in scan result. signature.asc Description: This is a digitally signed message part. ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: The logic behind user/system settings
On Sat, 2010-03-13 at 08:17 +0300, Andrey Borzenkov wrote: > On Friday 12 of March 2010 02:51:33 Dan Williams wrote: > > On Wed, 2010-03-10 at 07:04 +0300, Andrey Borzenkov wrote: > > > On Wednesday 10 of March 2010 04:12:19 Dan Williams wrote: > > > > As you've discovered, there are user-specific settings (which are > > > > only available when that user is logged in) and system-wide > > > > settings (which are available to all users *and* before any user > > > > has logged in). The problem you're hitting is when there aren't > > > > any settings at all, like right after an install. > > > > > > > > So NetworkManager creates an internal "Auto " connection that > > > > at least allows your system to get online if there are any > > > > DHCP-configured ethernet devices on the system. This is a > > > > "system-wide" connection and should be available at boot and > > > > before login. > > > > > > Are they created by NM service or nm-connection-editor/nm-applet? > > > Should they be present even if other, explicitly defined > > > connections exist? > > > > It is created by NM itself. It's present only if no other /system/ > > connections are defined that apply to that device. > > > How NM decides that /system/ connection applies to device? I always see > two auto connections for wlan interface - "Auto Wireless" and "Auto > $CURRENT_SSID" even though there are system connections with > $CURRENT_SSID defined. A connection can be applied to a device if it's compatible with that device; that means that the connection isn't MAC-locked to a different device, or the connection doesn't require encryption capabilities that the device doesn't support (ie a WPA2/AES connection cannot be used with an old Prism card that only does TKIP), etc. Is the "Auto Wireless" a system connection? If so, what system settings plugins do you have enabled? Dan ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: The logic behind user/system settings
On Friday 12 of March 2010 02:51:33 Dan Williams wrote: > On Wed, 2010-03-10 at 07:04 +0300, Andrey Borzenkov wrote: > > On Wednesday 10 of March 2010 04:12:19 Dan Williams wrote: > > > As you've discovered, there are user-specific settings (which are > > > only available when that user is logged in) and system-wide > > > settings (which are available to all users *and* before any user > > > has logged in). The problem you're hitting is when there aren't > > > any settings at all, like right after an install. > > > > > > So NetworkManager creates an internal "Auto " connection that > > > at least allows your system to get online if there are any > > > DHCP-configured ethernet devices on the system. This is a > > > "system-wide" connection and should be available at boot and > > > before login. > > > > Are they created by NM service or nm-connection-editor/nm-applet? > > Should they be present even if other, explicitly defined > > connections exist? > > It is created by NM itself. It's present only if no other /system/ > connections are defined that apply to that device. How NM decides that /system/ connection applies to device? I always see two auto connections for wlan interface - "Auto Wireless" and "Auto $CURRENT_SSID" even though there are system connections with $CURRENT_SSID defined. Wired interface OTOH correctly picks up system connection and does not offer "Auto" one. Thank you! signature.asc Description: This is a digitally signed message part. ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: The logic behind user/system settings
On Wed, 2010-03-10 at 07:04 +0300, Andrey Borzenkov wrote: > On Wednesday 10 of March 2010 04:12:19 Dan Williams wrote: > > As you've discovered, there are user-specific settings (which are > > only available when that user is logged in) and system-wide settings > > (which are available to all users *and* before any user has logged > > in). The problem you're hitting is when there aren't any settings > > at all, like right after an install. > > > > So NetworkManager creates an internal "Auto " connection that at > > least allows your system to get online if there are any > > DHCP-configured ethernet devices on the system. This is a > > "system-wide" connection and should be available at boot and before > > login. > > > > Are they created by NM service or nm-connection-editor/nm-applet? Should > they be present even if other, explicitly defined connections exist? It is created by NM itself. It's present only if no other /system/ connections are defined that apply to that device. THe problem is that at boot time, of course the user settings service/applet isn't started yet, thus NM has no idea if any other connections exist for that device. But it's not nice to interrupt connectivity by switching from that connection to some user-scope connection when the user logs in. *But*, if you delete the "Auto" connection in the connection editor, it won't come back; NM will write a key to /etc/NetworkManager/nm-system-settings.conf or /etc/NetworkManager/NetworkManager.conf for the device and will not create the "Auto" connection for that device again. > > The problem with that is that often writing to privileged locations > > requires some permissions, so NetworkManager will ensure that the > > caller is authenticated via PolicyKit before they can change a > > connection to be "system-wide". That's configurable too, so as a > > distro maintainer you could turn that authentication off via the > > file in the policy/ directory in the source. > > > > Is it also run-time settable? Yes, you edit privileged files via PolicyKit mechanisms (either the permissions file in /usr/share/polkit-1/actions/org.freedesktop.network-manager-settings.system.policy or via PolicyKit overrides in /var/lib/polkit-1/localauthority). NM will automagically find the change. Dan ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: The logic behind user/system settings
10 Mart 2010 Çarşamba günü (saat 13:55:35) Marc Herbert şunları yazmıştı: > > There is a checkbox in nm-applet to decide whether a connection is > system-wide versus not. Yes that was always inactive and the reason was that there was no active plugins enabled. When I wrote keyfile to the relevant .conf file in /etc, that became checkable and usable. I can now add system-wide connections through polkit authentication, finally :) Thanks all. --- Ozan Çağlayan TUBITAK/UEKAE - Pardus Linux http://www.pardus.org.tr/eng ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: The logic behind user/system settings
On Wed, 2010-03-10 at 11:26 +0100, Jirka Klimes wrote: > > Out of curiosity, how do you set the persistent hostname with the > > keyfile plugin? > > > > Keyfile plugin reads the hostname from 'hostname' key from [keyfile] section > of > NM configuration file: > [keyfile] > hostname= > > It is described on wiki: > http://live.gnome.org/NetworkManager/SystemSettings > Ah, useful, thanks. I see the docs have improved greatly since I last looked. Simon. signature.asc Description: This is a digitally signed message part ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: The logic behind user/system settings
Ozan Çağlayan a écrit : > > * There's this "Auto ifaceX" default/unremovable connection which is > Up'ped by default when NM is launched. Okay, it's good to have a > default profile which will always try hard to bring the machine > online. But as far as I understand, the connections that I'm adding > from nm-applet are considered as some sort of user-settings so if that > specific user which added that connection profile never loggs in, > should I forcely stick with that automatic dhcp profile? Isn't there > something like system-wide connections which will take effect when NM > is spawned? There is a checkbox in nm-applet to decide whether a connection is system-wide versus not. About "Auto eth0" I suspect you can found a number of relevant discussions in the list archive. > How can the root user setup a manual connection on his > server system which doesn't even have a desktop session? Either through a regular user (using the nm-applet checkbox) or through one of the plugins. > * What are the plugins (ifcfg-rh for redhat/fedora for example) for? This is quite well documented here: http://live.gnome.org/NetworkManager/SystemSettings ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: The logic behind user/system settings
On Wednesday 10 of March 2010 10:37:10 Simon Geard wrote: > > If your distribution does not have a system settings plugin, you can use > > the 'keyfile' plugin which reads/writes connections in a .ini-style > > format in /etc/NetworkManager/system-connections. > > Out of curiosity, how do you set the persistent hostname with the > keyfile plugin? > Keyfile plugin reads the hostname from 'hostname' key from [keyfile] section of NM configuration file: [keyfile] hostname= It is described on wiki: http://live.gnome.org/NetworkManager/SystemSettings Jirka ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: The logic behind user/system settings
On Tue, 2010-03-09 at 17:12 -0800, Dan Williams wrote: > They translate the distribution's native config file format (ifcfg files > for RH, /e/n/i for Debian/Ubuntu, etc) into system-wide configuration > that NetworkManager can use. They also provide the distro's configured > persistent hostname (/etc/hostname for Debian, /etc/sysconfig/network > for RH) to NetworkManager. > > If your distribution does not have a system settings plugin, you can use > the 'keyfile' plugin which reads/writes connections in a .ini-style > format in /etc/NetworkManager/system-connections. Out of curiosity, how do you set the persistent hostname with the keyfile plugin? Simon. signature.asc Description: This is a digitally signed message part ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: The logic behind user/system settings
On Wednesday 10 of March 2010 04:12:19 Dan Williams wrote: > As you've discovered, there are user-specific settings (which are > only available when that user is logged in) and system-wide settings > (which are available to all users *and* before any user has logged > in). The problem you're hitting is when there aren't any settings > at all, like right after an install. > > So NetworkManager creates an internal "Auto " connection that at > least allows your system to get online if there are any > DHCP-configured ethernet devices on the system. This is a > "system-wide" connection and should be available at boot and before > login. > Are they created by NM service or nm-connection-editor/nm-applet? Should they be present even if other, explicitly defined connections exist? > The problem with that is that often writing to privileged locations > requires some permissions, so NetworkManager will ensure that the > caller is authenticated via PolicyKit before they can change a > connection to be "system-wide". That's configurable too, so as a > distro maintainer you could turn that authentication off via the > file in the policy/ directory in the source. > Is it also run-time settable? signature.asc Description: This is a digitally signed message part. ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: The logic behind user/system settings
On Tue, 2010-03-09 at 21:10 +0200, Ozan Çağlayan wrote: > Hi, > > I'm from the core developer team of a linux distribution called Pardus > Linux[0]. > > Years ago, when there wasn't even Network-Manager, we developed a network > management backend in C/Python that we're still using > in our distribution but due to lack of time/interest it's getting older and > older which risks to not fulfill the current > desktop user's needs. > > So we're seriously thinking about migrating to Network-Manager as soon as the > KDE4 manager/plasmoid gets ready as Pardus comes > with KDE by default. > > I'm currently experimenting with NM 0.8 and nm-applet. Here are some > questions: > > * There's this "Auto ifaceX" default/unremovable connection which is Up'ped > by default when NM is launched. Okay, it's > good to have a default profile which will always try hard to bring the > machine online. But as far as I understand, the connections > that I'm adding from nm-applet are considered as some sort of user-settings > so if that specific user which added that connection > profile never loggs in, should I forcely stick with that automatic dhcp > profile? Isn't there something like system-wide connections > which will take effect when NM is spawned? How can the root user setup a > manual connection on his server system which doesn't even have a > desktop session? As you've discovered, there are user-specific settings (which are only available when that user is logged in) and system-wide settings (which are available to all users *and* before any user has logged in). The problem you're hitting is when there aren't any settings at all, like right after an install. So NetworkManager creates an internal "Auto " connection that at least allows your system to get online if there are any DHCP-configured ethernet devices on the system. This is a "system-wide" connection and should be available at boot and before login. NM does not switch away from "Auto ifaceX" when you log in, because we assume that interrupting connectivity is a very bad thing to do. By default, the connections you add by clicking on APs or such from the applet menu are user connections. There is some debate about making them system connections by default, which is probably the right thing to do since it's less confusing (except for VPNs perhaps, which tend to be specific to a user). What you may not have configured on your install is a system-settings plugin. See below. > * Why does nm-applet's tray icon's left-click menu provides a sub-menu to VPN > connections? It's weird. That context menu seems to have > dynamic content e.g. when I add a connection for eth0, it appears alltogether > with Auto eth0; if there are no 802.11 devices, there > are no content related to 802.11 connections but that "VPN connections" is > always there which I think is not at all human-interface > centric and ergonomic. There's an open bug to not show the VPN submenu when no VPN plugins are installed, and there's another open bug to move the VPN connections into the main menu instead of a submenu. Simply a lack of time and more important bugs to handle, but these two should certainly be fixed. If you've got a bit of time to look at either of these two I'd happily take patches for them. > * What are the plugins (ifcfg-rh for redhat/fedora for example) for? They translate the distribution's native config file format (ifcfg files for RH, /e/n/i for Debian/Ubuntu, etc) into system-wide configuration that NetworkManager can use. They also provide the distro's configured persistent hostname (/etc/hostname for Debian, /etc/sysconfig/network for RH) to NetworkManager. If your distribution does not have a system settings plugin, you can use the 'keyfile' plugin which reads/writes connections in a .ini-style format in /etc/NetworkManager/system-connections. So in a perfect world, it doesn't matter that much to the user whether the connection is system or user; they can use nm-connection-editor to move it between system and user scopes as they need to. If you want a connection before login that's available all the time, it should be a system connection and you can make it so in the connection editor. The problem with that is that often writing to privileged locations requires some permissions, so NetworkManager will ensure that the caller is authenticated via PolicyKit before they can change a connection to be "system-wide". That's configurable too, so as a distro maintainer you could turn that authentication off via the file in the policy/ directory in the source. Dan ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
The logic behind user/system settings
Hi, I'm from the core developer team of a linux distribution called Pardus Linux[0]. Years ago, when there wasn't even Network-Manager, we developed a network management backend in C/Python that we're still using in our distribution but due to lack of time/interest it's getting older and older which risks to not fulfill the current desktop user's needs. So we're seriously thinking about migrating to Network-Manager as soon as the KDE4 manager/plasmoid gets ready as Pardus comes with KDE by default. I'm currently experimenting with NM 0.8 and nm-applet. Here are some questions: * There's this "Auto ifaceX" default/unremovable connection which is Up'ped by default when NM is launched. Okay, it's good to have a default profile which will always try hard to bring the machine online. But as far as I understand, the connections that I'm adding from nm-applet are considered as some sort of user-settings so if that specific user which added that connection profile never loggs in, should I forcely stick with that automatic dhcp profile? Isn't there something like system-wide connections which will take effect when NM is spawned? How can the root user setup a manual connection on his server system which doesn't even have a desktop session? * Why does nm-applet's tray icon's left-click menu provides a sub-menu to VPN connections? It's weird. That context menu seems to have dynamic content e.g. when I add a connection for eth0, it appears alltogether with Auto eth0; if there are no 802.11 devices, there are no content related to 802.11 connections but that "VPN connections" is always there which I think is not at all human-interface centric and ergonomic. * What are the plugins (ifcfg-rh for redhat/fedora for example) for? Thanks, Ozan Caglayan [0]: http://www.pardus.org.tr/eng ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list