I've spent a few hours now trying to get a systemd user instance to run. On a fresh install of CentOS 7, when I try to run a systemctl --user command as a user, this is what happens:
Code:
$ systemctl --user status
Failed to get D-Bus connection: No such file or directory
Compared to my Arch Linux machine:
Code:
$ systemctl --user status
● snowflake
State: running
Jobs: 0 queued
Failed: 0 units
Since: Sun 2016-04-24 10:54:10 MDT; 4 weeks 0 days ago
CGroup: /user.slice/user-1000.slice/user@1000.service
├─dbus.service
│ ├─ 3633 /usr/bin/dbus-daemon --session --address=systemd: --nofork
│ ├─ 3641 /usr/lib/GConf/gconfd-2
│ ├─ 5587 /usr/lib/dconf/dconf-service
│ └─27011 /usr/lib/xfce4/xfconf/xfconfd
├─at-spi-dbus-bus.service
│ ├─ 3647 /usr/lib/at-spi2-core/at-spi-bus-launcher
│ ├─22313 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-s
│ └─22315 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
├─pulseaudio.service
│ └─4764 /usr/bin/pulseaudio --daemonize=no
└─init.scope
├─3512 /usr/lib/systemd/systemd --user
└─3517 (sd-pam)
When Googling around, I found very few results where CentOS users were trying to use systemd user services. In fact, I can't find any mention of user-specific systemd instances in any official Red Hat or CentOS documentation. The first search results you get for "centos systemd user instance" is the
systemd/User page on the Arch wiki. When I search for my problem specifically, I get results from the Arch forums. Most of the solutions from these threads refer to an old version of the Arch wiki systemd/User page saying that dbus.socket and dbus.service files need to be created in /etc/systemd/user/. I pulled up the old version of this page from the page history and followed the instructions, which had no effect on my problem. This enforces my belief that different distributions seem to implement systemd very differently, which leaves me at a dead end since the only potential solutions I can find are from the Arch forums.
The only person I found trying to do this on CentOS was on a mailing list, where another user mentioned that CentOS removed this functionality:
https://marc.ttias.be/systemd-devel/...3/msg00100.php
Has anyone gotten this working on CentOS? Or should I be looking to do this on a different distribution entirely?