You are not logged in.

#1 2016-09-18 18:27:33

TJM
Member
Registered: 2016-09-18
Posts: 114

How to launch d-bus session apart from X11 or manual launch?

Hi there,
I always receives some error notice like this:

(process:28020): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
GConf Error: Client failed to connect to the D-BUS daemon:
Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead

Yet it can be solved if I run

export $(dbus-launch)

in a terminal.
But, I cannot manually launch d-bus session while I am using dmenu or other program to start another program.
So, I wonder, if there is some tools can provides the function of D-BUS daemon? Which means it can automatically launch dbus session for all programs.
I will appreciate it if anyone can give me some advice.

Offline

#2 2016-09-18 19:03:56

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: How to launch d-bus session apart from X11 or manual launch?

Fix the underlying issue, don't try and workaround it.

How do you start X? Is your session active? Set your locale properly?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2016-09-18 22:53:29

TJM
Member
Registered: 2016-09-18
Posts: 114

Re: How to launch d-bus session apart from X11 or manual launch?

jasonwryan wrote:

Fix the underlying issue, don't try and workaround it.

How do you start X? Is your session active? Set your locale properly?

I am using lightdm and using it to start X. But, how do I test whether the session is active or not?

Can here comes the output of command locale:

LANG=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=

Offline

#4 2016-09-18 23:00:15

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: How to launch d-bus session apart from X11 or manual launch?

TJM wrote:

But, how do I test whether the session is active or not?

 loginctl show-session $XDG_SESSION_ID --property=Active

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2016-09-18 23:31:24

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: How to launch d-bus session apart from X11 or manual launch?

You'll also want to look at the output of locale -a.

dbus is now handled by by the systemd user session. You should not be using dbus-launch anywhere; there are already multiple threads about this with various solutions (generally old/bad configurations).

Online

#6 2016-09-19 01:32:03

TJM
Member
Registered: 2016-09-18
Posts: 114

Re: How to launch d-bus session apart from X11 or manual launch?

jasonwryan wrote:
TJM wrote:

But, how do I test whether the session is active or not?

 loginctl show-session $XDG_SESSION_ID --property=Active

The output is

Active=yes

Offline

#7 2016-09-19 01:32:51

TJM
Member
Registered: 2016-09-18
Posts: 114

Re: How to launch d-bus session apart from X11 or manual launch?

Scimmia wrote:

You'll also want to look at the output of locale -a.

dbus is now handled by by the systemd user session. You should not be using dbus-launch anywhere; there are already multiple threads about this with various solutions (generally old/bad configurations).

The output is

C
en_US.UTF-8
POSIX
zh_CN.UTF-8
zh_TW.UTF-8

Offline

#8 2016-09-26 07:39:11

TJM
Member
Registered: 2016-09-18
Posts: 114

Re: How to launch d-bus session apart from X11 or manual launch?

It seems that i3wm does not have functions like launching a d-bus session.
I wrote

export $(dbus-launch)

in .xprofile, and the the problem solved.

Offline

Board footer

Powered by FluxBB