Re: Some problems on Gentoo



On Sat, 2008-12-06 at 17:30 +0000, Robert Piasek wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> Hi,
> 
> I've got a few small problems with fresh installation of
> NetworkManager 0.7.0 on Gentoo system.
> 
> 1) When you install NM and run it for the first time, it won't find
> any existing global connections (no gentoo-specific plugin, and none
> are defined at this point in keyfile plugin) and will reset your
> hostname to localhost.localdomain (before you even run X). I think it
> should always check if hostname isn't defined in /etc/conf.d/hostname
> (I think this location is gentoo-specific) or even `hostnmame` before
> falling back to localhost.localdomain (even if you don't have _any_
> active connection).
> 
> [NetworkManager] <info>   Setting system hostname to
> 'localhost.localdomain' (no default device)

nm-system-settings will grab the current hostname and if that is *not*
'localhost' or 'localhost.localdomain', instruct NM to use that.  Are
you sure your dbus policy allows NM to talk to nm-system-settings?

dbus-send --system --print-reply --dest=org.freedesktop.NetworkManagerSystemSettings /org/freedesktop/NetworkManagerSettings org.freedesktop.DBus.Properties.GetAll string:org.freedesktop.NetworkManagerSettings.System

what do you get for the hostname property when you run that?
Alternatively, you could write a really simple gentoo plugin that just
provides persistent hostname support from that file without providing
any connections yet.  That's pretty easy; parsing connections is the
hard part.

> 2) when your Desktop UI (gnome in my case) finish loading (and
> nm-applet start) and you activate first available connection - NM will
> change your hostname to corresponding revdns or /etc/hosts entry. At
> this point gnome stops working. You can't run ANY program. I don't
> think it's a good idea to update your hostname when you're under
> Desktop UI - only system-settings should be able to do it and not
> nm-applet.
> At this point I still don't understand decision behind dynamic name
> changing based on IP - would appreciate any information.

NM is changing the hostname because you have not locked a persistent
hostname with nm-system-settings, and your hostname was 'localhost' or
'localhost.localdomain' or empty when nm-system-settings started up.  If
you had a persistent hostname set (and a system-settings plugin to parse
it) then NM should respect that hostname.

The issue with no X program launching is an X anachronism, where Xauth
uses the hostname as part of the authentication cookie.  When your
hostname changes, the Xauth cookie is no longer valid, and thus you no
longer have permission to talk to the X server.

To fix this, you have your xinit scripts tell the X server to allow all
users who have already authenticated themselves (via the display manager
like gdm or whatever) as long as that user is using unix socket
transport to connect, and is thus obviously local.  On Fedora, we added
this bit to /etc/X11/xinit/xinitrc.d/localuser.sh:

[ -x /usr/bin/xhost ] && [ -x /usr/bin/id ] &&
    xhost +si:localuser:`id -un` >& /dev/null

Since this gets run after GDM has authenticated the user, it allows the
user to bypass Xauth entirely, which is safe because their identity has
already been proven.

The ability to have the machine's domain name follow DHCP provided name
or via reverse DNS is quite useful in most cases, and it was expected
that distros that would ship NM 0.7 would have written minimal system
settings plugins.

Thus, if you have set up your persistent hostname correctly (and it
sounds like you have), your hostname should never change, but of course
there's nothing to tell NM that you do have a persistent hostname.

Dan

> When you try to run anything from the gnome terminal (which needs to
> be opened before network kicks in) you get:
> 
> $ nm-connection-editor
> No protocol specified
> 
> (nm-connection-editor:7141): Gtk-WARNING **: cannot open display: :0.0
> 
> You need to disable networking before you are able to open any program.
> 
> 
> 3) I granted my user policykit rights to enable NM system settings,
> but all options are still grey out. When i run connection-editor from
> the console I get:
> 
> ** (nm-connection-editor:7245): WARNING **: Could not retrieve
> can-modify: Failed to execute program
> /usr/libexec/dbus-daemon-launch-helper: Success
> 
> (nm-connection-editor:7245): Gtk-WARNING **: GtkSpinButton: setting an
> adjustment with non-zero page size is deprecated
> 
> 
> my user belongs to the group which allows you to query nm's dbus
> interface.
> 
> 
> Any ideas about 3) ?
> 
> 
> 
> Thanks,
> Rob
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iQIcBAEBAgAGBQJJOrbNAAoJELvLB8ABrzqYwucQAMf797VCVfj9K7K0GZfmx2B8
> 0iFGAciMcejdk4OXgeJc7cmb1p/bm3eMk4cdE1aXKjgF/Z7MaTQaiP1lV2HP1dPM
> a1CWZQExj+ug0y1hKP2aJOIKNPY1A2W2t18g5LRyB0No19fQbZeEiG/nNPx3O8bP
> eEKNOk26FCydpYUCefEzjc/mcvLfeghgwsXLBjX6pfna2EtcD5nZ8a8Q2KH0NSsB
> gwsfDZgsYHT2hHY4y92Sz3KStQdz5SV+HCjUYrX2H/yroQ7BPKcb7ehDt2WujqIy
> f927PDDWzHip3RLd3OlLrKKzkj0mOrJ3seckfRjD03TgqFU6MrUDI3bJLbMSNewO
> u1j9dWiH9Vx1S68v7RLAMY+qLwNOLd4Ihq40JKTlVSJPVmKEBRIJn02qcxoMycNr
> q6G1H2mICWzFFAQ6FFZu9A1Stx1upACmlf8SVPdWqP2Kiz2efQ5uCD1Ex+G1Ryhs
> BPmV9LMMYK24Yrrt1mwrA4AcKpWFAG0sqpmpuVijEAQFY10GqFbWJ5Uo3PsdiTmD
> ofqz7/kPRywFRIAgOW40V8dJw04vUlHDuinRrRCJTSoGD/ScNRRTwOvBi6MkJUL5
> JCwJTw2AbAbkbUdrUBIcFJGchRgSqxmXLVL14Cg3TYywTmGXiwIHbNOdQoe18KdN
> 9slyX4QxKLeSdpapaOYs
> =4cWz
> -----END PGP SIGNATURE-----
> 
> _______________________________________________
> NetworkManager-list mailing list
> NetworkManager-list gnome org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]