| Summary: |
when "systemd-anaylze --user" is used it might read hostname data from the user session, rather than from the system hostnamed |
| Product: |
systemd
|
Reporter: |
rodrigo <rodrigorivascosta> |
| Component: |
general | Assignee: |
systemd-bugs |
| Status: |
RESOLVED
FIXED
|
QA Contact: |
systemd-bugs |
| Severity: |
normal
|
|
|
| Priority: |
medium
|
|
|
| Version: |
unspecified | |
|
| Hardware: |
All | |
|
| OS: |
Linux (All) | |
|
| Whiteboard: |
|
|
i915 platform:
|
|
i915 features:
|
|
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
* Overview In my machine `systemctl --user` works perfectly, while `systemd-run --user` fails. * Steps to Reproduce & Actual Results $ systemd-run --user /usr/bin/ls Failed to create bus connection: No such file or directory * Expected Results I would expect it to create a transient unit to run the program. I can manually create an unit in ~/.config/systemd/user and start it with `systemctl --user` so why not with `systemd-run --user`? * Platform - ArchLinux x86_64 - systemd 212 * Additional Information I've found that it is because `systemd-run --user` tries to connect to the systemd daemon using the session dbus-daemon, while `systemctl --user` connects to the systemd daemon directly, using the private socket. If I configure the session dbus-daemon then it will work fine, but since the `systemctl --user` works without it, I don't see why it should be required by `systemd-run --user`. It can be proved that the session dbus-daemon is not a requirement by running the following command: $ gdbus call -a unix:path=/run/user/$(id -u)/systemd/private \ -o /org/freedesktop/systemd1 \ -m org.freedesktop.systemd1.Manager.StartTransientUnit \ run-$RANDOM.service fail \ "[('ExecStart', <[('/usr/bin/ls', ['/usr/bin/ls'], false)]>)]" \ "[]" It does create the transient unit, equivalent to `systemd-run --user /usr/bin/ls`, but using the private socket instead of the session dbus-daemon. Now that we are into it, why is there a command `systemd-run` instead of `systemctl run`? Too different syntax? TIA