<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - systemd-run --user depends on the session dbus-daemon"
href="https://bugs.freedesktop.org/show_bug.cgi?id=79252">79252</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>systemd-run --user depends on the session dbus-daemon
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rodrigorivascosta@gmail.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Product</th>
<td>systemd
</td>
</tr></table>
<p>
<div>
<pre>* 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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>