Tag: NetworkManager

  • Quieting dbus

    I run a program called logcheck which regularly scans the logfiles looking for “interesting things”. One of these interesting things (to logcheck, not to me at first) was dbus complaining about mythtv.  The logs look something like this:

    Nov 17 05:08:18 elmo dbus-daemon[1621]: dbus[1621]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.236" (uid=999 pid=3669 comm="/usr/bin/mythfilldatabase --verbose general --logl") interface="org.freedesktop.NetworkManager" member="GetDevices" error name="(unset)" requested_reply="0" destination="org.freedesktop.NetworkManager" (uid=0 pid=1930 comm="/usr/sbin/NetworkManager ")

    What this is is the dbus daemon rejecting a message being sent from mythfilldatabase that wants to go to NetworkManager.  Looking at NetworkManager’s dbus configuration, its doing all the right things.

    So it’s a simple matter of just fixing up the dbus configuration and you’re done. Then I hit the first snag; the dbus documentation is a little sad. I remember seeing a show where they MRI scanned some artifacts to get to the writing and then used a maker-bot to recreate the hidden writing. They then painstakingly translated it using a team of experts to work out the English translation.  Working out the dbus configurations is not quite that difficult, but it’s close.  The easiest way is to copy something and see if it works, which is what I did.

    I created a file /etc/dbus-1/system.d/mythtv.conf which permitted the myth user access to the GetDevices method. It looks like:

    
    
            
                    
            
    
    
    

    Reloaded dbus and all went quiet.

     

     

    Enhanced by Zemanta
  • Making peace with Network Manager

    Painless they say, automatically they say.  This is what the NetworkManager manual page describes the daemon.  I’d like to say annoying and intrusive and I know there are a lot of people out there that feel the same.  The program is used to set-up network connections and provides a system tray thingy for Gnome and for simple set-ups its great.

    Sure, I got NetworkManager running on my laptop and we’re all friends over there.  It just works, it just works for my local network, wireless network and even 3G and VPNs work just like they should.  This is the environment where it was designed for and it shows.

    What about on the server where I login using gdm?  We’ve had nothing but a world of pain there.  It used to be bad enough when it fiddled with /etc/resolv.conf meaning DNS stopped working everytime i logged out.  Every “stop playing around with my settings and leave me alone” option fails to do just that.  It got so bad I had to use chattr to make the file immutable; so if you are tearing your hair out, then chattr +i /etc/resolv.conf is your friend.

    The latest version of NetworkManager takes this insanity to a new level.  Now not content with messing around with my resolver files, it reconfigures my statically assigned IP address to a dynamic DNS one AND removes it when I logout. No doubt if it let it, it would muck around with resolver files too.  Again, by default on a laptop this is fine.  The problem is the ‘would you leave me alone’ options fail to work, or mean stupid things happen like pidgin doesnt think there is a network so never logs in.

    So I resorted to reading more about this intrusive program and was there a way of stopping it doing what it was doing.  The directory /etc/NetworkManager/system-connections looked promising as they were connections available at boot time and across all users.  But then there is the funky format and wow, nothing saying what you might need versus what if you have missing makes the thing fail.

    What’s not obvious is that if you edit your network connections and then select ‘available to all users’ then your settings go into that system-connections directory and that for the moment appears to be working.  It means I have my network settings configured in two places which means all sorts of fun if I change them and forget about the other.

    This isn’t an ideal situation and network manager should start to behave properly and read the ifupdown stuff and use it but not muck around with settings if it is told to.  There are options that imply they do this but they don’t work.  Despite the title, I don’t think peace has broken out between me and Network Manager but rather an uneasy truce; I’m sure that program is just sitting there thinking of what other settings it could play with when my back is turned.

    Enhanced by Zemanta