Is it possible and if so how do I:
- Start a
/bin/bashprocess that is not bound to a terminal from a terminal? Hence, a shell process that shows up in the process tree as
init -- bash. (Shells usually have the process tree structure
terminal-emulator-of-your-choosing -- bash)
- Start a
/bin/bashprocess not bound to a terminal that has as its child another process e.g. a browser like
firefoxfrom a shell session in a terminal? Hence, a shell process with a child that shows up in the process tree as
init -- bash -- firefox.
- It is easy to get
init -- firefoxdirectly from the shell via something along the lines of
exec firefox & exitor
/bin/bash -c firefox & exit.
(This question is part of a series of related questions that first enabled me to formulate these questions precisely (cf. How to "correctly" start an application from a shell and Is reparenting from the shell possible?). The three questions have been formulated and discussed partially in the comments of the two former questions but as I see it not been answered. Furthermore, they do seem more appropriate as short question in their own right not suited for discussion in comments.)