You are not logged in.

#1 2016-10-20 20:30:42

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,923
Website

[found a workaround] xrdp and "session bus not found"

I run xrdp on my archlinux machine at work, because the only remote desktop client I can use is mstsc.
It ran flawlessly with lxqt as desktop. However after a while it started to behave strangely. The desktop starts with a VNC error message, then only the openbox menu is available on right click and starting some applications (like Krusader) gives this error:

krusader(1302)/kdeui (kdelibs): Session bus not found
To circumvent this problem try the following command (with Linux and bash)
export $(dbus-launch)

I searched the forum, found one thread that suggested deleting the .kde4 folder, but I don't dare to do that yet, this is a production machine and I don't want to mess things up.
Another thread suggests dowgrading dbus, and I'm reluctant to try this too.
Here is the output of systemctl status:

● arch-rf
    State: running
     Jobs: 0 queued
   Failed: 0 units
    Since: Thu 2016-10-20 17:05:32 CEST; 5h 21min ago
   CGroup: /
           ├─user.slice
           │ └─user-620.slice
           │   ├─user@620.service
           │   │ ├─dbus.service
           │   │ │ └─585 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation
           │   │ ├─init.scope
           │   │ │ ├─576 /usr/lib/systemd/systemd --user
           │   │ │ └─577 (sd-pam)
           │   │ └─gvfs-daemon.service
           │   │   ├─588 /usr/lib/gvfs/gvfsd
           │   │   └─593 /usr/lib/gvfs/gvfsd-fuse /run/user/620/gvfs -f -o big_writes
           │   └─session-c1.scope
           │     ├─573 lightdm --session-child 16 19
           │     ├─583 /usr/sbin/lightdm-gtk-greeter
           │     ├─602 /usr/lib/at-spi2-core/at-spi-bus-launcher --launch-immediately
           │     └─615 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
           ├─init.scope
           │ └─1 /sbin/init
           └─system.slice
             ├─lightdm.service
             │ ├─522 /usr/bin/lightdm
             │ ├─549 /usr/lib/xorg-server/Xorg :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
             │ └─617 lightdm --session-child 12 19
             ├─mpd.service
             │ └─519 /usr/bin/mpd --no-daemon
             ├─upower.service
             │ └─756 /usr/lib/upower/upowerd
             ├─dbus.service
             │ └─435 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
             ├─accounts-daemon.service
             │ └─550 /usr/lib/accountsservice/accounts-daemon
             ├─sshd.service
             │ └─518 /usr/bin/sshd -D
             ├─udisks2.service
             │ └─750 /usr/lib/udisks2/udisksd --no-debug
             ├─xrdp.service
             │ ├─547 /usr/bin/xrdp
             │ └─673 /usr/bin/xrdp
             ├─xrdp-sesman.service
             │ ├─ 545 /usr/bin/xrdp-sesman
             │ ├─ 675 /usr/bin/xrdp-sessvc 677 676
             │ ├─ 676 /usr/bin/xrdp-sesman
             │ ├─ 677 Xvnc :10 -geometry 1440x900 -depth 16 -rfbauth /home/frank/.vnc/sesman_frank_passwd -bs -ac -nolisten tcp -localhost -dpi 96
             │ ├─ 679 xrdp-chansrv
             │ ├─ 680 lxqt-session
             │ ├─ 716 openbox --config-file /home/frank/.config/openbox/lxqt-rc.xml
             │ ├─ 722 lxqt-notificationd
             │ ├─ 723 lxqt-panel
             │ ├─ 724 lxqt-policykit-agent
             │ ├─ 726 /usr/bin/xscreensaver -no-splash
             │ ├─ 747 /usr/lib/menu-cache/menu-cached /tmp/.menu-cached-:10-frank
             │ ├─ 796 python2 /usr/bin/anamnesis --restart
             │ ├─ 798 /usr/bin/konsole
             │ ├─ 836 kupfer
             │ ├─2789 firefox
             │ ├─2890 /usr/lib/firefox/plugin-container /usr/lib/mozilla/plugins/libflashplayer.so -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 2789 plugin
             │ ├─3463 /usr/bin/fish
             │ ├─3484 /usr/bin/dbus-daemon --fork --print-pid 7 --print-address 9 --session
             │ ├─3493 kdeinit4: kded4 [kdeinit]
             │ ├─3497 /usr/bin/kglobalaccel5
             │ ├─3506 kdeinit4: kwalletd [kdeinit]
             │ ├─3533 /usr/bin/kactivitymanagerd start-daemon
             │ ├─3543 xclip -selection clipboard
             │ ├─3628 /usr/bin/dbus-daemon --fork --print-pid 7 --print-address 9 --session
             │ ├─3632 kdeinit4: kdeinit4 Running...
             │ ├─3633 kdeinit4: klauncher [kdeinit] --fd=8
             │ ├─3635 kdeinit4: kded4 [kdeinit]
             │ ├─3639 /usr/bin/kglobalaccel5
             │ ├─3648 kdeinit4: kwalletd [kdeinit]
             │ ├─3674 systemctl status
             │ └─3675 less
             ├─systemd-logind.service
             │ └─433 /usr/lib/systemd/systemd-logind
             ├─polkit.service
             │ └─554 /usr/lib/polkit-1/polkitd --no-debug
             ├─systemd-udevd.service
             │ └─252 /usr/lib/systemd/systemd-udevd
             ├─systemd-journald.service
             │ └─211 /usr/lib/systemd/systemd-journald
             ├─system-dhcpcd.slice
             │ └─dhcpcd@eno1.service
             │   └─514 /usr/bin/dhcpcd -q -w eno1
             └─ntpd.service
               └─528 /usr/bin/ntpd -g -u ntp:ntp

Please help me solving this.

Last edited by SanskritFritz (2016-11-03 15:13:36)


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#2 2016-10-30 10:06:30

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,923
Website

Re: [found a workaround] xrdp and "session bus not found"

OK, I took the plunge and I tried this: renamed .kde4 into .kde4_tmp. Sadly that didn't help.


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#3 2016-10-30 11:35:29

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,783
Website

Re: [found a workaround] xrdp and "session bus not found"

Ignore the advice given by krusader, you shouldn't be using dbus-launch anywhere any more. Remove any instances of it from your startup files (e.g. .xinitrc, .profile, etc), and make sure all your pacnew files are merged.

See also:
https://bbs.archlinux.org/viewtopic.php?id=217902
https://bbs.archlinux.org/viewtopic.php?id=217925
https://bbs.archlinux.org/viewtopic.php?id=218064


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2016-10-30 13:53:55

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,923
Website

Re: [found a workaround] xrdp and "session bus not found"

Thank you for those links, I've found some clues about the problem.
https://bbs.archlinux.org/viewtopic.php … 6#p1659106
"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."
I do always merge pacnew files and had no dbus-launch in any startup file.
I noticed that DBUS_SESSION_BUS_ADDRESS points to /tmp here, so something is not working as archlinux expects to.
Now I don't know much (nothing) about dbus-launch, but read in those posts that archlinux has disabled it completely, whatever that means. Given that xrdp is from the AUR, I thought, hey, maybe it still needs dbus launch. So I wrote into my .xinitrc:

export $(dbus-launch)
exec startlxqt

And I got my lxqt desktop back upon connecting to xrdp. However I still get this error message before the desktop is started, but seemingly everything works as before.

I think my solution is exactly the opposite of your advice and I still get the error message at the beginning, so I'd like to know what the real and canonical solution would be. Are changes needed in the xrdp package, so it sould not rely on dbus-launch?


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#5 2016-10-30 16:14:56

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,783
Website

Re: [found a workaround] xrdp and "session bus not found"

At what point does DBUS_SESSION_BUS_ADDRESS point to /tmp? Can you check it before you start the graphical session? As mentioned, it should be set correctly (i.e. pointing to /run) when you initially log in.

I have no idea how xrdp works, but a cursory grep though it's source code does not reveal any dbus related strings. I als tried lxqt on my own system and DBUS_SESSION_BUS_ADDRESS was set correctly both when running with startx and via sddm, so I think the problem is still in your configuration somewhere.

I suggest recursively grepping through all your dotfiles and /etc for any case-insensitive instances of dbus. Also check PAM's integrity with pacman -Qkk as suggested in one of those other threads.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#6 2016-10-30 20:03:16

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,923
Website

Re: [found a workaround] xrdp and "session bus not found"

When I login through ssh, it is set correctly:

~> echo $DBUS_SESSION_BUS_ADDRESS
unix:path=/run/user/1000/bus

Then I log in through xrdp to get the lxqt desktop, it is set differently:

~> echo $DBUS_SESSION_BUS_ADDRESS
unix:abstract=/tmp/dbus-K3oyE2z21L,guid=37867fc84ee1cc71a193585958164c1b

It is the same with or without export $(dbus-launch) in the .xinitrc.
Note that starting KDE or Lxqt from Lightdm works flawlessly, but I cannot check $DBUS_SESSION_BUS_ADDRESS in a local session right now, because I'm miles away from the machine, but I can safely assume that it is set correctly.
pacman -Qkk gives no errors apart from modified config files, which I checked if suspicious, but found nothing dbus related.


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#7 2016-10-30 20:32:49

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

Re: [found a workaround] xrdp and "session bus not found"

I do remember something about VNC using dbus-launch in one of the scripts in the home dir. Make sure to grep though hidden dirs when looking for it.

Offline

#8 2016-10-31 08:40:32

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,923
Website

Re: [found a workaround] xrdp and "session bus not found"

I performed a search on my whole home directory. Here is the list of files that contain the text "dbus-launch":

nohup.out
.bash_history
.viminfo
.xinitrc
.dbus/session-bus/edebb50991594f8e90a0dd6ac028231f-14
.dbus/session-bus/edebb50991594f8e90a0dd6ac028231f-15
.dbus/session-bus/edebb50991594f8e90a0dd6ac028231f-10
.dbus/session-bus/edebb50991594f8e90a0dd6ac028231f-16
.dbus/session-bus/edebb50991594f8e90a0dd6ac028231f-13
.dbus/session-bus/edebb50991594f8e90a0dd6ac028231f-11
.dbus/session-bus/edebb50991594f8e90a0dd6ac028231f-12
.local/share/fish/generated_completions/dbus-launch.fish
.local/share/anamnesis/database
.local/share/anamnesis/anamnesis.log
VirtualBox VMs/Oracle Linux/Oracle Linux.vdi
VirtualBox VMs/Oracle Linux/Oracle Linux 2.vdi
VirtualBox VMs/Oracle Linux/Snapshots/2015-01-05T15-19-29-504099000Z.sav
VirtualBox VMs/Oracle Linux/Snapshots/2016-08-09T12-54-52-716002000Z.sav
VirtualBox VMs/Oracle Linux/Snapshots/{b3eb8416-d382-4d8e-9ed0-bac058238795}.vdi
VirtualBox VMs/Oracle Linux/Snapshots/{ae0fcf43-8ee5-479f-86b7-b9afdcf4b4e9}.vdi
VirtualBox VMs/oel6-64bit-soasuite-11gr1-ps6/oel6-64bit-soasuite-11gr1-ps6-disk2.vmdk
VirtualBox VMs/oel6-64bit-soasuite-11gr1-ps6/Snapshots/2016-10-06T13-53-57-085987000Z.sav
VirtualBox VMs/Debian/Debian.vdi
.kde4/share/config/krusaderrc

zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#9 2016-10-31 15:02:18

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

Re: [found a workaround] xrdp and "session bus not found"

.xinitrc? That one should be obvious

Offline

#10 2016-11-01 09:03:00

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,923
Website

Re: [found a workaround] xrdp and "session bus not found"

Scimmia wrote:

.xinitrc? That one should be obvious

It is, but that was actually the solution to my problem. I didn't mention it now, because I thought it was clear from post #4:

SanskritFritz wrote:

Now I don't know much (nothing) about dbus-launch, but read in those posts that archlinux has disabled it completely, whatever that means. Given that xrdp is from the AUR, I thought, hey, maybe it still needs dbus launch. So I wrote into my .xinitrc:

export $(dbus-launch)
exec startlxqt

And I got my lxqt desktop back upon connecting to xrdp. However I still get this error message before the desktop is started, but seemingly everything works as before.


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#11 2022-10-13 18:32:59

sergei_mipt
Member
Registered: 2019-11-09
Posts: 6

Re: [found a workaround] xrdp and "session bus not found"

i added the following line to my .xinitrc

export DBUS_SESSION_BUS_PID=$(pgrep -u dbus dbus-daemon)

and it solved my problem

background: i had a problem when starting spectacle. the solution from the previous comments

export $(dbus-launch)

starts a new daemon process dbus-daemon each time it is invoked

Offline

#12 2022-10-13 19:53:08

seth
Member
Registered: 2012-09-03
Posts: 49,957

Re: [found a workaround] xrdp and "session bus not found"

Please don't necrobump, but since you're here, have a look at the last link below, specifically what you need to include in your xinitrc at least.
And absolutely do not run dbus-launch there.

Online

Board footer

Powered by FluxBB