Saturday 4 January 2014

Running applications so that they wouldn't close when you close the console

Nohup.

But since it litters nohup.outs everywhere let's make a custom shortcut script for launching it:

#!/bin/sh
nohup "$@" >/dev/null 2>&1 &

Just save it as nh into a bin dir and you can use it:

$ nh wine 2hu.exe
$ nh vlc reincarnation.mp3
$ exit

And applications keep on running! Why did I not bother learning about this useful command earlier?