[Solved] Kicker logout/restart/shutdown/dbus mtp fails to initiate

I have been dealing with this on and off for a while now. It seems like every once in a while, after a long time logged in to my desktop (KDE/X11) I lose the ability to use MTP through dophin, and to be able to logout/restart/shut down via the “kicker”. I have to:

  1. use the “ZAP” feature to just kill my KDE session
  2. or login via konsole and shutdown -h/halt
  3. via Konsole “/usr/lib64/libexec/ksmserver-logout-greeter -”

Running the following from Konsole on my desktop restores mtp/kicker login/logout functionalities: dbus-update-activation-environment DISPLAY XAUTHORITY

It’s a problem with a profile.d script that OpenSuSE places for ssh logins and dbus. While

  1. I am logged into my desktop locally;
  2. I ssh from a remote machine to my desktop;
  3. my XAUTH/DISPLAY gets messed up in dbus on my desktop.

Root cause: /etc/profile.d/openssh-dbus.sh /etc/profile.d/openssh-dbus.csh

(Original Credit: 463557 – Logout sometimes(!!) not possible )

I remove those files, and I do not lose control of dbus while logged into my desktop AND i happen to remotely ssh into it.

Please note, I have found a bug submission by someone else just recently to opensuse about this problem: Bug 1206739 – Latest update to systemd causes "theft" of X's dbus session by ssh session for user with same UID