Can you reword your question? I'm assuming you don't want background processes to be running when you close a front-end to an application.
To see if there are any leftover processes, use this command to check:
sudo ps -aux | grep "unity"
For example, this command will check if there's any Unity-related processes running in the background. Replace unity
with any other program name and repeat. You may omit the sudo
prefix if your distro allows processes to be scanned without sudo permissions.
By default, Chrome runs in the background unless you uncheck "Keep Chrome open in background". Other than that, processes should close by their own if you terminate their front-end. If the processes stay alive, then it's a bug. You should file a bug report with the aforementioned programs' developers.
Also, to kill a program manually, issue this command (find the PID with the above command):
sudo kill -9 <pid>
So if a program has a PID of 2831, then you'd write
sudo kill -9 2831
If you kill system services you may crash your Linux distro. Be careful! You can also try to omit the sudo
prefix here, but many distros won't allow you to kill processes as a normal user by default.