When I launched GUI programs from a terminal window (with '&' at the end), how can I close the terminal without also closing the GUI programs?
You can use
to omit the program from getting sent a hang-up call from it's starting terminal. This way the GUI program stays open when the terminal is closed.
nohup to run the program, it will "run a command immune to hangups, with output to a non-tty"
Just prefix the command with
nohup, as in
& is even optional, and it's not dependent on bash.
Your desktop shell may provide a CLI utility to start a GUI program as if it were started from the desktop shell (I assume the utility actually asks the shell parent process to start that app). The command returns immediately, while the started app opens. You can close the terminal without killing the started application.
For the KDE/Plasma shell the utility is
kstart dolphin /var/log
You can use
(assuming your have a firefox.desktop).
byobu for this purpose.
- First run
- Then, on a virtual tab of
byobu, run your command
- Then, even if you close the terminal, since
byobuprocess is alive, your command is also alive.
- To reach your command again, open a terminal, call
byobu. It will restore all virtual tabs including the one which contains your command, too.