LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Big problem with dbus in ubuntu (https://www.linuxquestions.org/questions/linux-software-2/big-problem-with-dbus-in-ubuntu-721487/)

froff 04-24-2009 04:16 PM

Big problem with dbus in ubuntu
 
Hello
I have already posted this post into ubuntu forum but I'm sure problem is not strictly connected to ubuntu. So maybe there is any expert who can save my soul!

---------------------------------------
I had some problems with hp printer and during investigation being in desperate decided to compile myself and manual install dbus package.
And then problems begin....

After reboot: "failed to initialize hal".
After hours of investigation using google I realized that meritum of the problem is that some programs begin too look for some dbus resources into /usr/local/var instead of /var.
Reinstalation of dbus and hal without any positive effect.
I found some dbus configuration files and replaced every occurence of /usr/local/var to /var.
No effects. I'm very confused and suprised that HAL and some other programss still stubbornly looks into /usr/local/var. I scanned almost all filesystem searching for string "/usr/local/var/run/dbus" and "/usr/local/var/lib/dbus" - no matches. I wonder - WHAT IS GOING ON AND WHY? How dare any program to look for dbus resources into directory that isn't written in any config file?

Next I found some "lame" solution. Works but it's not satisfying me: I made two symbolic links: /usr/local/var/run/dbus and /usr/local/var/lib/dbus. the HAL started to work.

But: there are still problems with some programs, previously working perfectly. For example:
gksudo polkit-gnome-authorization gives:
"WARNING **: Couldn't connect to session bus: dbus-launch failed to autolaunch D-Bus session: Autolaunch requested, but X11 support not compiled in." .... and fails to start.

gksudo gnome-terminal gives:
"terminal_app_init: assertion failed: (app->default_profile_id != NULL)" ...and fails to start.

Now I'm near REAL DESPERATION. I think seriously about throwing computer throguh the window (it's on 11-th floor!). Is there any expert who can explain to me like to the child what is going on with this stuff and what is the solution (excluding reinstallation, switichng to back windows or throwing out the computer)?

Forgive me my English. It is poor even i'm not in desperation...

Best regards for all!

norobro 04-25-2009 12:15 PM

First of all, I am by no means an expert. I find problems like this interesting and like to delve into them.

I downloaded dbus-1.2.12 and found the following in the "INSTALL" file:
Quote:

By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'.

You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix
So, to override the default, I ran:
Code:

./configure --prefix="" --exec-prefix=/usr
Looking in the config.log files it seems to put everything in the same directories as they are on my Debian sid system.

From the config.log with prefixes:
Code:

. . .
#define DBUS_SYSTEM_SOCKET "/var/run/dbus/system_bus_socket"
#define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "unix:path=/var/run/dbus/system_bus_socket"
. . .
#define DBUS_DAEMONDIR "/usr/bin"
#define DBUS_BINDIR "/usr/bin"
. . .

And from the default config.log (i.e. no prefixes):
Code:

. . .
#define DBUS_SYSTEM_SOCKET "/usr/local/var/run/dbus/system_bus_socket"
#define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "unix:path=/usr/local/var/run/dbus/system_bus_socket"
. . .
#define DBUS_DAEMONDIR "/usr/local/bin"
#define DBUS_BINDIR "/usr/local/bin"
. . .

I tried "./configure --exec-prefix=/usr" and it put the system_bus_socket in "/usr/local/var/run/dbus"

Also, it compiled with no errors but I did not run "make install" because I didn't want to risk messing up my system.

By the way no need to apologize for your English, it is very good.

HTH
Norm


All times are GMT -5. The time now is 01:26 AM.