[systemd-bugs] [Bug 79252] New: systemd-run --user depends on the session dbus-daemon
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon May 26 02:10:01 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=79252
Priority: medium
Bug ID: 79252
Assignee: systemd-bugs at lists.freedesktop.org
Summary: systemd-run --user depends on the session dbus-daemon
QA Contact: systemd-bugs at lists.freedesktop.org
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: rodrigorivascosta at gmail.com
Hardware: All
Status: NEW
Version: unspecified
Component: general
Product: systemd
* 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
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20140526/985dde98/attachment.html>
More information about the systemd-bugs
mailing list