A job is a concept which is only meaningful inside the shell. Please read the JOB CONTROL section of the bash manual page for an overview (search for upper case JON CONTROL).
When a shell is closed, any backgrounded jobs attached to that terminal are send a signal SIGHUP (hang up). Most programs will terminate when they receive this signal. A program may choose to do something else other than terminate on receiving SIGHUP. At least in Ubuntu, firefox seems to be one of these, so you can just bg the process and then close the terminal.
For programs which terminate when you close the terminal which they are attached to, you have a few options:
- When you start the program by prefixing it with "nohup", for example:
- Run the program in GNU Screen. Screen lets you detach the shell from the terminal, and then re-attach it at a later date. This is particularly useful for programs like terminal-based IRC clients... For you can detach the screen session from the terminal which is funning locally, log out, go to work and ssh to your machine and then re-attach to the shell running the IRC client.
- You can use the disown shell internal to remove the job from the shell's process group. This means it will not be sent a SIGHUP when the terminal is closed.