You are not logged in.

#1 2016-10-06 05:05:13

Hacksign
Member
Registered: 2012-07-30
Posts: 131

[SOLVED]DBus sockets file no exists in /tmp

lightdm + gtk greeter + awesome wm

there is no dbus file under /tmp directory :

hacksign@XSign [12:55:53] : ~ 
>> ps aux|grep -i dbus
dbus       274  0.7  0.0  33288  3848 ?        Ss   12:55   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
hacksign   408  0.0  0.0  15364  3416 ?        Ss   12:55   0:00 /bin/sh /etc/lightdm/Xsession dbus-launch --sh-syntax --exit-with-session awesome
hacksign   469  0.0  0.0  32744  2984 ?        Ss   12:55   0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation
hacksign   537  0.0  0.0  32848  2660 ?        Ss   12:55   0:00 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 6 --session
hacksign   546  0.0  0.0  32744  2388 ?        Ss   12:55   0:00 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 6 --session
hacksign   554  0.0  0.0  32744  2484 ?        Ss   12:55   0:00 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 6 --session
hacksign   571  0.0  0.0  32744  2784 ?        Ss   12:55   0:00 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 6 --session
hacksign   625  0.0  0.0  32744  2548 ?        Ss   12:55   0:00 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 6 --session
hacksign   659  0.0  0.0  32744  3044 ?        S    12:55   0:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
hacksign   664  0.0  0.0  32744  3096 ?        S    12:55   0:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
hacksign   665  0.0  0.0      0     0 ?        Z    12:55   0:00 [dbus-daemon] <defunct>
hacksign   925  0.1  0.0  32876  2784 ?        Ss   12:55   0:00 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 6 --config-file /usr/share/fcitx/dbus/daemon.conf
hacksign   929  0.0  0.0  30356   240 ?        SN   12:55   0:00 /usr/bin/fcitx-dbus-watcher unix:abstract=/tmp/dbus-EDZ8fANSa9,guid=1aa7c2afa7a6f152c587afc757f5d956 925
hacksign  1115  0.0  0.0  12520  2620 pts/0    S+   12:55   0:00 grep --color=auto -i dbus
hacksign@XSign [12:55:59] : ~ 
>> env|grep -i dbus
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-HJDsxzu5bi,guid=fc0e6ff5c28e6bc8273839b957f5d954
hacksign@XSign [12:56:02] : ~ 
>> ls /tmp/dbus*
No matches for wildcard '/tmp/dbus*'.
fish: ls /tmp/dbus*
         ^

and some program like thunar show me an error like this :

>> thunar
Thunar: Failed to initialize Xfconf: Failed to connect to socket /tmp/dbus-HJDsxzu5bi: 拒绝连接

Error creating proxy: 无法连接:拒绝连接 (g-io-error-quark, 39)

How can I solved this problem ?

Last edited by Hacksign (2016-10-08 01:52:19)

Offline

#2 2016-10-06 05:07:32

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

Re: [SOLVED]DBus sockets file no exists in /tmp

Stop using dbus-launch.

Offline

#3 2016-10-06 05:14:26

Hacksign
Member
Registered: 2012-07-30
Posts: 131

Re: [SOLVED]DBus sockets file no exists in /tmp

Scimmia wrote:

Stop using dbus-launch.

these dbus-launch is automatically created by system.

and if my program is not started by dbus-launch, some of function is abnormal.

Is there any wiki pages or artical which discribe how can I solve my problem ?

Offline

#4 2016-10-06 05:22:31

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

Re: [SOLVED]DBus sockets file no exists in /tmp

No, they are not automatically created "by system". I have no idea how you've set up your WM to launch with dbus-launch, but undo it.

Offline

#5 2016-10-06 05:41:35

Hacksign
Member
Registered: 2012-07-30
Posts: 131

Re: [SOLVED]DBus sockets file no exists in /tmp

Scimmia wrote:

No, they are not automatically created "by system". I have no idea how you've set up your WM to launch with dbus-launch, but undo it.

These dbus-launch seems like created by lightdm:
/etc/lightm/Xsession

>> cat Xsession 
#!/bin/sh
#
# LightDM wrapper to run around X sessions.

echo "Running X session wrapper"

# Load profile
for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do
    if [ -f "$file" ]; then
        echo "Loading profile from $file";
        . "$file"
    fi
done

# Load resources
for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do
    if [ -f "$file" ]; then
        echo "Loading resource: $file"
        xrdb -merge "$file"
    fi
done

# Load keymaps
for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do
    if [ -f "$file" ]; then
        echo "Loading keymap: $file"
        setxkbmap `cat "$file"`
        XKB_IN_USE=yes
    fi
done

# Load xmodmap if not using XKB
if [ -z "$XKB_IN_USE" ]; then
    for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do
        if [ -f "$file" ]; then
           echo "Loading modmap: $file"
           xmodmap "$file"
        fi
    done
fi

unset XKB_IN_USE

# Run all system xinitrc shell scripts
xinitdir="/etc/X11/xinit/xinitrc.d"
if [ -d "$xinitdir" ]; then
    for script in $xinitdir/*; do
        echo "Loading xinit script $script"
        if [ -x "$script" -a ! -d "$script" ]; then
            . "$script"
        fi
    done
fi

# Run user xsession shell script
script="$HOME/.xsession"
if [ -x "$script" -a ! -d "$script" ]; then
    echo "Loading xsession script $script"
    . "$script"
fi

echo "X session wrapper complete, running session $@"

dbus-launch --exit-with-session $@

If I comment out last line, I can not enter my awesome WM.....

Offline

#6 2016-10-06 05:43:42

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

Re: [SOLVED]DBus sockets file no exists in /tmp

That is not the same file that's included with the current package. What version of lightdm are you running?

Offline

#7 2016-10-06 05:57:15

Hacksign
Member
Registered: 2012-07-30
Posts: 131

Re: [SOLVED]DBus sockets file no exists in /tmp

Scimmia wrote:

That is not the same file that's included with the current package. What version of lightdm are you running?

hacksign@XSign [13:36:46] : ~ 
>> pacman -Qi lightdm
名字           : lightdm
版本           : 1:1.18.3-1
描述           : A lightweight display manager
架构           : x86_64
URL            : https://launchpad.net/lightdm
软件许可       : GPL3  LGPL3
组             : 无
提供           : 无
依赖于         : glib2  glibc  libgcrypt  libx11  libxcb  libxdmcp  libxklavier  pam  polkit
可选依赖       : accountsservice: Enhanced user accounts handling[已安装]
                 lightdm-gtk-greeter: GTK greeter[已安装]
                 lightdm-kde-greeter: Qt greeter
                 xorg-server-xephyr: LightDM test mode[已安装]
要求被         : lightdm-gtk-greeter
被可选依赖     : 无
冲突与         : 无
取代           : 无
安装后大小     : 1748.00 KiB
打包者         : Maxime Gauduin <alucryd@archlinux.org>
编译日期       : 2016年08月20日 星期六 17时37分59秒
安装日期       : 2016年08月28日 星期日 10时03分51秒
安装原因       : 作为其他软件包的依赖关系安装
安装脚本       : 是
验证者         : 数字签名

hacksign@XSign [13:53:24] : ~ 
>> pacman -Qo /etc/lightdm/Xsession 
/etc/lightdm/Xsession 属于 lightdm 1:1.18.3-1

Offline

#8 2016-10-06 05:59:36

Hacksign
Member
Registered: 2012-07-30
Posts: 131

Re: [SOLVED]DBus sockets file no exists in /tmp

well I checked file list of lightdm :
https://www.archlinux.org/packages/extr … 4/lightdm/

there is /etc/lightdm/Xsession with it.

Offline

#9 2016-10-06 05:59:37

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

Re: [SOLVED]DBus sockets file no exists in /tmp

And yet, the file in the package is here: https://git.archlinux.org/svntogit/pack … es/lightdm

Offline

#10 2016-10-06 06:08:57

Hacksign
Member
Registered: 2012-07-30
Posts: 131

Re: [SOLVED]DBus sockets file no exists in /tmp

Scimmia wrote:

And yet, the file in the package is here: https://git.archlinux.org/svntogit/pack … es/lightdm


changing' dbus-launch $@' to 'exec $@' reduced the number of dbus-daemon process.
but...still...some program is work abnormally without dbus-launch command.
such as :

hacksign@XSign [14:00:21] : /tmp 
>> indicator-keylock 

(indicator-keylock:1902): Unique-GDBus-WARNING **: Unable to open a connection to the session bus: 无法连接:拒绝连接

(indicator-keylock:1902): GLib-GIO-CRITICAL **: g_dbus_connection_call_sync_internal: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
fish: 'indicator-keylock' terminated by signal SIGSEGV (Address boundary error)

but with dbus-launch indicator-keylock, it's ok.

So is there any method to create /tmp/dbus-xxxx file when window manager launched ?

Offline

#11 2016-10-06 06:12:13

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

Re: [SOLVED]DBus sockets file no exists in /tmp

Stop obsessing about /tmp. It's wrong. DBUS_SESSION_BUS_ADDRESS should be pointing to a file in /run. If it's not, either you didn't merge a pacnew file for pam, or something else is screwing up the variable.

Last edited by Scimmia (2016-10-06 06:12:48)

Offline

#12 2016-10-06 06:28:30

Hacksign
Member
Registered: 2012-07-30
Posts: 131

Re: [SOLVED]DBus sockets file no exists in /tmp

Scimmia wrote:

Stop obsessing about /tmp. It's wrong. DBUS_SESSION_BUS_ADDRESS should be pointing to a file in /run. If it's not, either you didn't merge a pacnew file for pam, or something else is screwing up the variable.

Would u give me a checklist which is possibly cause this problem?
Thanks~

Offline

#13 2016-10-06 08:26:09

Omar007
Member
Registered: 2015-04-09
Posts: 368

Re: [SOLVED]DBus sockets file no exists in /tmp

I'm not sure how you managed to have a file that differs from the original package on a properly updated system.
Unless you manually edited it or have some pacnew file laying around that you still need to merge, this should not happen.

Make sure your system is up-to-date, then check your system for any pacnew files that you still need to merge manually; https://wiki.archlinux.org/index.php/Pa … c.2A_files
After that you can try to run `pacman -Qk` to check for missing files (optionally you can specify the 'k' twice to check more details of the file, such a modification time)

Also, can you give us the the output of the following command?

printenv DBUS_SESSION_BUS_ADDRESS

EDIT: or if that doesn't work

echo ${DBUS_SESSION_BUS_ADDRESS}

Last edited by Omar007 (2016-10-06 08:31:20)

Offline

#14 2016-10-06 18:18:04

Hacksign
Member
Registered: 2012-07-30
Posts: 131

Re: [SOLVED]DBus sockets file no exists in /tmp

I found if I start X first then start awesome, DBUS_SESSION_BUS_ADDRESS is properly set to /run/user/xxx/dbus
But if I start lightm as login manager then launch awesome with lightdm-gtk-greeter DBUS_SESSION_BUS_ADDRESS is set to /tmp/dbus-xxxxx where xxxxx is an random string.

Last edited by Hacksign (2016-10-06 18:41:25)

Offline

Board footer

Powered by FluxBB