How do I prevent a script from terminating when the shell exits?

In particular, I created a script to start Firefox which I double-click and choose ‘Run in terminal,’ but when the shell exits Firefox is killed immediately.

How do I prevent this from happening?

Answer

You need to put the nohup before the command that launch firefox, so it needs to looks like that:

>$ nohup firefox

Leave a Reply

Your email address will not be published. Required fields are marked *