Here is my experience trying to run soffice in the background, following a non-terminating command (e.g. tail). For this example I will use sleep 100.
In all the cases below I execute like this:
./scriptfile <Ctl-C> &
#!/bin/bash /opt/libreoffice4.4/program/soffice -invisible -nofirststartwizard & sleep 100 I see soffice logs / by pressing Ctrl-C soffice stops
nohup .. &
#!/bin/bash nohup /opt/libreoffice4.4/program/soffice -invisible -nofirststartwizard & sleep 100 I don't see soffice logs / by pressing Ctrl-C soffice stops
& disown
#!/bin/bash /opt/libreoffice4.4/program/soffice -invisible -nofirststartwizard & disown sleep 100 I see soffice logs / by pressing Ctrl-C soffice stops
setsid .. &
#!/bin/bash setsid /opt/libreoffice4.4/program/soffice -invisible -nofirststartwizard & sleep 100 I see soffice logs / by pressing Ctrl-C soffice DOES NOT STOP
To save space:
nohup setsid .. : does not show logs / soffice DOES NOT STOP on Ctrl-C
nohup with & disown at the end : does not show logs / soffice stops on Ctrl-C