You are not logged in.

#1 2016-12-26 08:23:50

SoleSoul
Member
From: Israel
Registered: 2009-06-29
Posts: 319

[SOLVED]I think I messed up my systemd (or dbus?) session.Help please?

Hi

It happened after an update but I didn't see others complain so I guess it's my fault.
The symptom is that terminator refuses to launch with:

Traceback (most recent call last):
  File "/usr/bin/terminator", line 109, in <module>
    ipc.new_window_cmdline(optionslist)
  File "/usr/lib/python2.7/site-packages/terminatorlib/ipc.py", line 177, in _exec
    bus = dbus.SessionBus()
  File "/usr/lib/python2.7/site-packages/dbus/_dbus.py", line 211, in __new__
    mainloop=mainloop)
  File "/usr/lib/python2.7/site-packages/dbus/_dbus.py", line 100, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/lib/python2.7/site-packages/dbus/bus.py", line 122, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NotSupported: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead

Roxterm also outputs a similar error.

What can I check in order to understand what's wrong?

Thanks!

Last edited by SoleSoul (2016-12-26 13:05:26)

Offline

#2 2016-12-26 08:26:15

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [SOLVED]I think I messed up my systemd (or dbus?) session.Help please?

SoleSoul wrote:
Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead

You could start by checking whether that environment variable is set. If not, please explain how you start your DE/WM.


pkgs │ hacks │ cfg │ blag

Offline

#3 2016-12-26 08:29:25

SoleSoul
Member
From: Israel
Registered: 2009-06-29
Posts: 319

Re: [SOLVED]I think I messed up my systemd (or dbus?) session.Help please?

% env | grep -i dbus

returns nothing.
I have openbox stand-alone and I start it with startx and the .xinitrc is:

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

VBoxClient-all &
exec openbox-session

Offline

#4 2016-12-26 09:39:37

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [SOLVED]I think I messed up my systemd (or dbus?) session.Help please?

Oh, I've mixed up dbus with the startup of X, I'm sorry.

Please post the output of these commands:

systemctl --user show-environment
systemctl status -l --no-pager user@$(id -u).service

pkgs │ hacks │ cfg │ blag

Offline

#5 2016-12-26 11:17:55

SoleSoul
Member
From: Israel
Registered: 2009-06-29
Posts: 319

Re: [SOLVED]I think I messed up my systemd (or dbus?) session.Help please?

% systemctl --user show-environment
Failed to connect to bus: No such file or directory
% systemctl status -l --no-pager user@$(id -u).service                                                                                                                :(
● user@1000.service - User Manager for UID 1000
   Loaded: loaded (/usr/lib/systemd/system/user@.service; static; vendor preset: disabled)
   Active: inactive (dead)

Dec 26 10:12:23 solesoul systemd[1]: Starting User Manager for UID 1000...
Dec 26 10:12:23 solesoul systemd[3465]: pam_unix(systemd-user:session): session opened for user <username> by (uid=0)
Dec 26 10:12:23 solesoul systemd[1]: Started User Manager for UID 1000.

Offline

#6 2016-12-26 11:39:54

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [SOLVED]I think I messed up my systemd (or dbus?) session.Help please?

That's odd - PAM should've started a systemd user session (which would then start a dbus session for your user). How do you usually log in? Through a display manager (if so, which one?) or on the console/TTY?

Could you please paste the content of /etc/pam.d/systemd-user and /etc/pam.d/system-login?
Also, just to confirm my assumptions, the output of

pgrep -a dbus
pgrep -a systemd

Last edited by ayekat (2016-12-26 11:41:04)


pkgs │ hacks │ cfg │ blag

Offline

#7 2016-12-26 11:46:55

SoleSoul
Member
From: Israel
Registered: 2009-06-29
Posts: 319

Re: [SOLVED]I think I messed up my systemd (or dbus?) session.Help please?

How do you usually log in? Through a display manager (if so, which one?) or on the console/TTY?

Console/TTY.

/etc/pam.d/systemd-user

% cat /etc/pam.d/systemd-user
#%PAM-1.0

# Used by systemd when launching systemd user instances.

account include system-auth
session include system-auth
auth required pam_deny.so
password required pam_deny.so

/etc/pam.d/system-login

% cat /etc/pam.d/system-login 
#%PAM-1.0

auth       required   pam_tally.so         onerr=succeed file=/var/log/faillog
auth       required   pam_shells.so
auth       requisite  pam_nologin.so
auth       include    system-auth

account    required   pam_access.so
account    required   pam_nologin.so
account    include    system-auth

password   include    system-auth

session    optional   pam_loginuid.so
session    include    system-auth
session    optional   pam_motd.so          motd=/etc/motd
session    optional   pam_mail.so          dir=/var/spool/mail standard quiet
-session   optional   pam_systemd.so
session    required   pam_env.so
% pgrep -a dbus
238 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
% pgrep -a systemd
1 /sbin/init
148 /usr/lib/systemd/systemd-journald
180 /usr/lib/systemd/systemd-udevd
236 /usr/lib/systemd/systemd-logind

Thank you for your help.

Offline

#8 2016-12-26 12:03:30

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [SOLVED]I think I messed up my systemd (or dbus?) session.Help please?

Okay... there is an issue - that /etc/pam.d/systemd-user is not the version shipped by the package. Have you modified it on your own?

I'm not very experienced with the inner working of PAM during the login procedure, but a blind guess is that PAM does not process systemd-login, thus skipping the inclusion of (among other things) the pam_systemd.so module (and according to its man page, that module seems to be crucial for launching a systemd user session).


pkgs │ hacks │ cfg │ blag

Offline

#9 2016-12-26 13:05:00

SoleSoul
Member
From: Israel
Registered: 2009-06-29
Posts: 319

Re: [SOLVED]I think I messed up my systemd (or dbus?) session.Help please?

After you pointed me to /etc/pam.d/systemd-user I checked and there was a .pacnew file for it. I overwrote the file with the .pacnew after reviewing the change and now it contains:

% cat /etc/pam.d/systemd-user 
# Used by systemd --user instances.

account  include system-login
session  required pam_loginuid.so
session  include system-login

All is back to normal now. Thank you for your help! smile

Last edited by SoleSoul (2016-12-26 13:06:10)

Offline

Board footer

Powered by FluxBB