If I start a process, particularly at session start, what is the difference between using exec p
and dbus-launch p
?
What is the difference between exec and dbus-launch
d-busexec
d-busexec
If I start a process, particularly at session start, what is the difference between using exec p
and dbus-launch p
?
Best Answer
dbus-launch
is DBus-related.exec
is a shell built-in. See their manpages/help pages:So... they basically do two different things... While both are expected to start program
p
passed as a parameter, you can read that in the case ofdbus-launch
, a few other things are done first:In this case, a DBus daemon instance is created prior to creating the process, and it should be running a secondary session bus, which is made available to the child process through environment variables.
Also note that in the case of
exec
, the current shell is replaced by a new program.dbus-launch
will not replace the shell, and nor will the program you start alongside the daemon.