Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[grahamc@Petunia:~]$ ls -la $(which systemctl)
lrwxrwxrwx 1 root root 71 Dec 31 1969 /run/current-system/sw/bin/systemctl -> /nix/store/fvh782r1d0wa4qf61c7a98f2b44hqp0v-systemd-243.7/bin/systemctl
[grahamc@Petunia:~]$ nixos-version
20.03.1619.ab3adfe1c76 (Markhor)
$ SYSTEMD_LOG_LEVEL=debug systemd-run --user --shell
Bus n/a: changing state UNSET → OPENING
Bus n/a: changing state OPENING → AUTHENTICATING
Bus n/a: changing state AUTHENTICATING → HELLO
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0 signature=n/a error-name=n/a error-message=n/a
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=AddMatch cookie=2 reply_cookie=0 signature=s error-name=n/a error-message=n/a
Got message type=method_return sender=org.freedesktop.DBus destination=:1.215 path=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 signature=s error-name=n/a error-message=n/a
Bus n/a: changing state HELLO → RUNNING
Successfully forked off '(polkit-agent)' as PID 26351.
Skipping PR_SET_MM, as we don't have privileges.
Sent message type=method_call sender=n/a destination=org.freedesktop.systemd1 path=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=StartTransientUnit cookie=3 reply_cookie=0 signature=ssa(sv)a(sa(sv)) error-name=n/a error-message=n/a
Got message type=error sender=org.freedesktop.DBus destination=:1.215 path=n/a interface=n/a member=n/a cookie=4 reply_cookie=3 signature=s error-name=org.freedesktop.DBus.Error.ServiceUnknown error-message=The name org.freedesktop.systemd1 was not provided by any .service files
Failed to start transient service unit: The name org.freedesktop.systemd1 was not provided by any .service files
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=RemoveMatch cookie=4 reply_cookie=0 signature=s error-name=n/a error-message=n/a
Bus n/a: changing state RUNNING → CLOSED
searching issue trackers for that suggests I should start sway with:
systemctl --user --wait import-environment && exec dbus-run-session sway
which I already do. UPDATE 2020-05-13 10:30EDT: kennylevinson on #sway suggested not using dbus-run-session, and that
fixed it!
[grahamc@Petunia:~]$ busctl list --user
NAME PID PROCESS USER CONNECTION UNIT SESSION DESCRIPTION
:1.0 15794 mako grahamc :1.0 session-3.scope 3 -
:1.1 15792 swaybar grahamc :1.1 session-3.scope 3 -
:1.13 21719 busctl grahamc :1.13 session-3.scope 3 -
:1.3 17792 slack grahamc :1.3 session-3.scope 3 -
:1.5 17925 .firefox-wrappe grahamc :1.5 session-3.scope 3 -
:1.6 17925 .firefox-wrappe grahamc :1.6 session-3.scope 3 -
ca.desrt.dconf - - - (activatable) - - -
org.bluez.obex - - - (activatable) - - -
org.freedesktop.DBus 15782 dbus-daemon grahamc - session-3.scope 3 -
org.freedesktop.Notifications 15794 mako grahamc :1.0 session-3.scope 3 -
org.freedesktop.StatusNotifierHost-15792 15792 swaybar grahamc :1.1 session-3.scope 3 -
org.freedesktop.StatusNotifierWatcher 15792 swaybar grahamc :1.1 session-3.scope 3 -
org.gnome.keyring.PrivatePrompter - - - (activatable) - - -
org.gnome.keyring.SystemPrompter - - - (activatable) - - -
org.kde.StatusNotifierHost-15792 15792 swaybar grahamc :1.1 session-3.scope 3 -
org.kde.StatusNotifierWatcher 15792 swaybar grahamc :1.1 session-3.scope 3 -
org.mozilla.firefox.ZGVmYXVsdA__ 17925 .firefox-wrappe grahamc :1.6 session-3.scope 3 -
notably I don't have one of these:
org.freedesktop.systemd1 - - - (activatable) - - -
adisbladis(opens in new tab) 8:08 AM
org.freedesktop.systemd1 is curious though
8:10
That would indicate to me that you don't actually have a proper user session?
[grahamc@Petunia:~]$ loginctl
SESSION UID USER SEAT TTY
3 1000 grahamc seat0 tty1
adisbladis(opens in new tab) 8:11 AM
My org.freedesktop.systemd1 is at unix:abstract=/tmp/dbus-xxxxxxxxxx,guid=xxxxxxxxxxxxxxxxxxxxxx
graham(opens in new tab) 8:11 AM
how do I get a proper session?
8:11
[grahamc@Petunia:~]$ env | grep -i dbu
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-xxxxxxxx,guid=xxxxxxxxx
adisbladis(opens in new tab) 8:14 AM
Nah, I don't know :confused:
8:15
Can you run any user service?
graham(opens in new tab) 8:15 AM
I run several!
graham(opens in new tab) 8:15 AM
[grahamc@Petunia:~]$ systemctl --user status
● Petunia
State: running
Jobs: 0 queued
Failed: 0 units
Since: Tue 2020-05-12 22:51:06 EDT; 9h ago
CGroup: /user.slice/user-1000.slice/user@1000.service
├─pulseaudio.service
│ ├─26509 /nix/store/kf6vah1n55ak7zsvr44zfnq3h9qpgbwk-pulseaudio-13.0/bin/pulseaudio --daemonize=no
│ └─26512 /nix/store/kf6vah1n55ak7zsvr44zfnq3h9qpgbwk-pulseaudio-13.0/libexec/pulse/gsettings-helper
├─swayidle.service
│ ├─15802 /nix/store/9si14qjcz8072c0v42zbkglq08s2cg04-bash-4.4-p23/bin/bash -e /nix/store/xfcdzqpgiyc3bs66pakhfix0wzgsymiv-unit-script-swayidle-start
│ └─15804 swayidle -w timeout 120 /nix/store/l99f1bx4mgw1g1va121k4ngjy2x5xvxg-backlight.sh down resume /nix/store/l99f1bx4mgw1g1va121k4ngjy2x5xvxg-backlight.sh up timeout 150 swaylock -elfF -s fill -i>
├─init.scope
│ ├─26183 /nix/store/fvh782r1d0wa4qf61c7a98f2b44hqp0v-systemd-243.7/lib/systemd/systemd --user
│ └─26184 (sd-pam)
├─gpg-agent.service
│ ├─26205 /nix/store/w18sj325ndhwy3svl2mlf9cynjlh7zzd-gnupg-2.2.19/bin/gpg-agent --supervised --pinentry-program /nix/store/psvzhlpa78rk25l33cwr74c8nmfw4fl6-pinentry-1.1.0-gnome3/bin/pinentry
│ └─29682 scdaemon --multi-server
├─emacs.service
│ └─26200 /nix/store/cr0vwpsb777bmpv4zgns5mir5wbqbk26-emacs-26.3/bin/emacs --daemon
├─lock-screen-hook.service
│ ├─26474 /nix/store/9si14qjcz8072c0v42zbkglq08s2cg04-bash-4.4-p23/bin/bash -e /nix/store/wl7s4x57vi5lny63a3iznfxkr9z33zx5-unit-script-lock-screen-hook-start
│ └─26479 /nix/store/z4y3q5nsm1hhk7g18ywpnsdgqcgsvc2i-python3-3.7.6/bin/python3 /nix/store/572yn4ix7ik723dv76y669xd0xnlcp39-systemd-lock-handler /nix/store/cbdl0ghl3k7f09lhlc6wjig8y2ljdaj1-i3lock-2.12>
├─redshift.service
│ └─17591 /nix/store/mfhda1dc15hvf40nn02xwk6zv1xajf7w-redshift-wayland/bin/redshift -l 42.500000 -73.200000 -t 5500 3400 -b 1 1 -m wayland
└─dbus.service
└─26472 /nix/store/yfy7cvybd7gfh77373lk271s99n5xqj9-dbus-1.12.16/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
8:15
[grahamc@Petunia:~]$ systemd-run --user true
Running as unit: run-rd516a5bea8384a0499f58239d96e43f9.service
8:15
I was even running google-chrome-stable under systemd-run yesterday
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.