# Help Netwokmanager works in xfce4 - strange dbus? [SOLVED]

## monsm

Hi,

I have recently re-built an old machine (I had a re-gentooised Sabayon installation on it before).  It has one of those acx111 wireless cards so I have to use ndiswrapper.  I also installed kdm as login manager (for the nice splash  :Smile: ).

All of it worked and I was able connect to my wireless lan using the wireless-tools in command line (iwconfig wlan0...).  The trouble was to get network manager do that automatically.

I installed network manager xf-applet and set dbus and hal to load on startup (rc-update add...).

I installed gnome-keyring.

I set the wireless details in the nm-applet.  No connection after reboot.

I found an old howto and added a NetworkManagerDispatcher service, still no luck.

I was reading logs and other posts and eventually decided to rebuild dbus.  However instead of just rebuilding I upgraded from dbus-1.2.3-r1 to dbus-1.2.20.

Before rebooting I also removed the NetworkManagerDispatcher service and added a /etc/wpa_supplicant/wpa_supplicant.conf file with the details of my wlan and keys etc.

So question is, what was it I did that made it work? Was it the upgrading of dbus, would it be enough to just rebuild it?  Something else I did?

MonsLast edited by monsm on Tue Mar 09, 2010 11:13 pm; edited 1 time in total

----------

## Rexilion

You don't need xf-applet since the nm-applet creates a freedesktop standard systray icon which is fully supported by xfce4-panel.

Did you try:

```
emerge -q -1 dbus
```

----------

## monsm

 *Rexilion wrote:*   

> You don't need xf-applet since the nm-applet creates a freedesktop standard systray icon which is fully supported by xfce4-panel.
> 
> Did you try:
> 
> ```
> ...

 

Didn't use that particular command, since I upgraded dbus instead (emerge -DNu).  So a rebuild would have been enough? Any idea what it is with dbus that makes that necessary?

Thanks for the tip on xf-applet.

Mons

----------

## Rexilion

 *monsm wrote:*   

> I installed network manager xf-applet and set dbus and hal to load on startup (rc-update add...).

 

Good

 *monsm wrote:*   

> I installed gnome-keyring.

 

Good

 *monsm wrote:*   

> I set the wireless details in the nm-applet.  No connection after reboot.

 

Good

 *monsm wrote:*   

> I found an old howto and added a NetworkManagerDispatcher service, still no luck.

 

No need for that, I can see that it is started by default with the NetworkManager script.

 *monsm wrote:*   

> I was reading logs and other posts and eventually decided to rebuild dbus.  However instead of just rebuilding I upgraded from dbus-1.2.3-r1 to dbus-1.2.20.

 

I recommend you downgrade to a supported and more fixed version of dbus. I have NetworkManager 0.8rc3 and it works with 1.2.3. Furthermore, yes emerge it twice I had several cases before you that have confirmed that emerging dbus for the second time fixes their issues (I opened a bug for this but I haven't had time to reproduce it).

 *monsm wrote:*   

> Before rebooting I also removed the NetworkManagerDispatcher service and added a /etc/wpa_supplicant/wpa_supplicant.conf file with the details of my wlan and keys etc.

 

Don't do anything 'fancy' like adding those init scripts, it's not neccessary. Furthermore, the wpa_supplicant.conf file is useless, NetworkManager starts wpa_supplicant with it's dbus interface enabled so everything is controlled by networkmanager omiting the entire .conf file infrastructure.

 *monsm wrote:*   

> Didn't use that particular command, since I upgraded dbus instead (emerge -DNu).  So a rebuild would have been enough? Any idea what it is with dbus that makes that necessary?

 

Downgrade dbus and give it a try.

One more question: Are you starting your session with ck-launch-session prefixed?

----------

## Dagger

Define "The trouble was to get network manager do that automatically". Networkmanager can connect automatically to a network if it's saved as system-wide session.

I'm trying to determinate where the problem is - either networkmanager starts up, but no wireless network are visable in nm-applet (dbus problem), or networkmanager doesn't connect automatically to your prefered network on startup (missing system-wide settings).

If you use networkmanager you need to make sure you DO NOT have any gentoo network init running (like /etc/init.d/net.wlan0). If you do, both init script and networkmanager will fight for wpa_supplicant access and noone of them will work.

Anyway, posting some logs will allow us to have a closer look on this issue.

----------

## monsm

Thanks for your replies.

I was formulating it slightly unconventionally I guess.  The network connection works now.  I was just trying to find out what it was that made it work.

I didn't think that rebuilding/upgrading dbus made any difference, but after what Rexilion says, it seem to be what fixed it.

Of course since it works with dbus 1.2.20, I'll keep that on the machine for now.  I'll delete the wpa_supplicant.conf file again since its not needed and has the wifi passwords in it.

Thinking about dbus, it seems dbus either picks up some config things of other components on the machine either at compile time, or when its first run after install. I don't see how re-emerging it would make a difference otherwise.  It did seem to do the trick for me too, even though I upgraded rather then just re-emerged.

Mons

Edit: Yes I did see that elsewhere about not having wlan started by the init scripts. There are bits of useful info in the wikis around (on gentoo-wiki.com and the old one on the gentoo-wiki.info), but none of them are up to date.

----------

