# Dbus problems

## szczelba

Hello,

When I try to run Banshee (music player) i get following errors:

```

localhost ~ # banshee                 

Warning: [06/11/2008 20:51:04] (DBus is not available) - Your environment is not properly set up to use DBus. Please fix your environment or run Banshee through dbus-launch. Failure to do so may cause problems at a later time in Banshee during this instance.

Unable to open the system message bus.

System.Exception: Unable to open the session message bus. ---> System.ArgumentNullException: Argument cannot be null.

Parameter name: address

  at NDesk.DBus.Bus.Open (System.String address) [0x00000] 

  at NDesk.DBus.Bus.get_Session () [0x00000] --- End of inner exception stack trace ---

  at NDesk.DBus.Bus.get_Session () [0x00000] 

  at Banshee.Base.DBusPlayer.FindInstance () [0x00000] 

  at Banshee.BansheeEntry.DetectInstanceAndDbus () [0x00000] 

Warning: [06/11/2008 20:51:05] (Could not connect to D-Bus) - D-Bus support will be disabled for this instance: Unable to open the session message bus.

System.Exception: Unable to open the system message bus. ---> System.NullReferenceException: Object reference not set to an instance of an object

  at NDesk.DBus.Signature.TypeToDType (System.Type type) [0x00000] 

  at NDesk.DBus.Signature.TypeToDType (System.Type type) [0x00000] 

  at NDesk.DBus.MessageWriter.Write (System.Type type, System.Object val) [0x00000] 

  at NDesk.DBus.MessageWriter.WriteStruct (System.Type type, System.Object val) [0x00000] 

  at NDesk.DBus.Message.WriteHeader () [0x00000] 

  at NDesk.DBus.Connection.Send (NDesk.DBus.Message msg) [0x00000] 

  at NDesk.DBus.Connection.SendWithReply (NDesk.DBus.Message msg) [0x00000] 

  at NDesk.DBus.Connection.SendWithReplyAndBlock (NDesk.DBus.Message msg) [0x00000] 

  at NDesk.DBus.BusObject.Invoke (System.Reflection.MethodBase methodBase, System.String methodName, System.Object[] inArgs, System.Object[]& outArgs, System.Object& retVal, System.Exception& exception) [0x00000] 

  at NDesk.DBus.DProxy.Invoke (IMessage message) [0x00000] 

  at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg, System.Exception& exc, System.Object[]& out_args) [0x00000] --- End of inner exception stack trace ---

  at NDesk.DBus.Bus.get_System () [0x00000] 

  at Hal.Manager..ctor () [0x00000] 

  at Banshee.Base.HalCore.Initialize () [0x00000] 

  at Banshee.Base.ComponentInitializer.Run () [0x00000] 

Warning: [06/11/2008 20:51:05] (Cannot connect to NetworkManager) - An available, working network connection will be assumed

Debug: [06/11/2008 20:51:06] (Loading audio profiles) - /usr/share/banshee/audio-profiles

Debug: [06/11/2008 20:51:06] (Default player engine) - GStreamer 0.10

System.ApplicationException: HAL is not initialized

  at Banshee.Base.AudioCdCore..ctor () [0x00000] 

  at Banshee.Base.Globals+<>c__CompilerGenerated58.<>c__AnonymousMethod179 () [0x00000] 

  at Banshee.Base.ComponentInitializer.Run () [0x00000] 

System.ApplicationException: Cannot initialize DapCore because HalCore is not initialized

  at Banshee.Dap.DapCore.Initialize () [0x00000] 

  at Banshee.Base.ComponentInitializer.Run () [0x00000] 

System.ApplicationException: HAL Core is not available

  at Banshee.Cdrom.Nautilus.NautilusDriveFactory..ctor () [0x00000] 

  at Banshee.Burner.BurnerCore.Initialize () [0x00000] 

  at Banshee.Base.ComponentInitializer.Run () [0x00000] 

Warning: [06/11/2008 20:51:07] (Power Management Call Failed) - Cannot find GNOME Power Manager: Unable to open the session message bus.

```

I have already upgrade and restart dbus.

How can I fix that?

----------

## muhsinzubeir

ive never come across this problem...but can you confirm the following:

-dbus && hal flags are set in make.conf, and the entire system is build/compiled with those flags set.

-rc-update show that hald/dbus running.{im not sure about dbus as i dont have my box right now while im writting the post.but the meaning is that they are running}

cheers...hope that help

----------

## pappy_mcfae

Are you starting dbus and hald automatically? 

Blessed be!

Pappy

----------

## szczelba

Dbus and Hal are started automatically and are running properly. 

I don't have dbus and hal flags in make.conf, but banshee was working just two days ago. I wanted to install newest version and it needs ndesk-dbus-1. So I've downloaded and install ndesk-dbus and ndesk-dbus-glib (it was not in portage). After that configure in banshee-1 was completed, but compilation failed. And now, when I run old version of banshee I get this error with dbus...

----------

## muhsinzubeir

 *Quote:*   

> I don't have dbus and hal flags in make.conf

 

its worth buildin your gentoo with those flags

----------

## szczelba

Ok, but rebuilding all system is not the solution I expect to be the best.  :Wink: 

----------

## slackline

 *szczelba wrote:*   

> Ok, but rebuilding all system is not the solution I expect to be the best. 

 

In the long run it will be   :Wink: 

----------

## pappy_mcfae

Yes, it may be. There are many apps that are triggered by the hal and dbus USE flags, and others configure themselves differently depending on whether those flags are there, or not. If you're planning on having a successful, functional GUI, you need to make sure hal and dbus USE flags are set.

And, I have completely recompiled my systems at least twice per machine. It may take a while, but it has a way of clearing some pretty esoteric problems. And, it sort of does some defragmentation, especially if you use tmpfs to compile instead of the hard drive itself.

Blessed be!

Pappy

----------

## szczelba

So, by recompiling whole system you mean emerge -e system?

----------

## slackline

 *szczelba wrote:*   

> So, by recompiling whole system you mean emerge -e system?

 

No, when you change your USE flags you can update only the affected packages by using....

```

emerge -uDNav world

```

Flags explained...

u = update

D = deep (follow all dependency trees)

N = new USE flags

a = ask before starting

v = verbose output

See man portage for more options and explanation, but just add dbus and hal to USE= in /etc/make.conf then run the above and you'll be fine.

slack

----------

## pappy_mcfae

In answer to your question, there are many ways to recompile with new USE flags. You can opt for the emerge -aev world approach. This will take all new USE flags into account. The other approach, using --newflag and -deep works also, and doesn't redo everything, just those things effected by the new USE flags. 

Personally, I prefer the emerge -aev world since it effectively redoes everything. But, fortunately, with Gentoo there are a myriad of methods for removing the epidermal layer of a domesticated feline.

Blessed be!

Pappy

----------

## Gregoire

I don't see the need for hal neither dbus on my system... I found it to be pretty sad to be alsmost forced to have those...

----------

## pappy_mcfae

You're not "forced" to do anything. If you wish to run without X, then yes, there is no need for hal/dbus. If you do run X, and don't want to automount, then don't use hal/dbus. If you want to manually mount all optical USB, or other non-local drives, then you don't need hal/dbus. If; however, you're like me and want automounting optical and USB media, then you need hal/dbus.

It's a choice. I'm sure as hell not going to seek you out and tell you how naughty you are for doing what you want with your system(s). I know it bugs the piss out of me when someone does that. So, go with your choice.

Blessed be!

Pappy

----------

## Gregoire

My fault : I wrote "alsmost forced" for almost forced and you didn't understand... sorry  :Wink: 

----------

## pappy_mcfae

I understood. No problem there. Until an alternative comes along, hal/dbus sure seems the way to the cross.

Blessed be!

Pappy

----------

