I was wondering if there was a why to add to my shell script ,for running Minecraft, that will shutdown everything that isn't needed to keep the system running. Only the Minecraft process and for it to be reopened when Minecraft is closed? I'm very very new to Ubuntu 12.04 or Linux in general. Been learning as I go along.
First I'll try to answer your question, then I'll explain why you probably shouldn't do it :)
I haven't seen or heard of any shell scripts that would do this, but it will be relatively easy to write one yourself. Simply writing a shell scripts and in there
If you then make a second script to run the processes, e.g.
...you should be able to restart these processes (and to the more experienced folks on the website: please do edit if there is a better way to terminate/restart these processes). It might be better though to restart your session, e.g. log out or kill the X server, and that'll only take you a few seconds.
Now, here's why I think you will be better off with an alternative solution.
Killing too many of these processes is going to leave you with a system that will be unstable, unsecure and probably unusable. If you
It sounds like you need all your computer's resources to run Minecraft.To summarise, it might be a bad idea to simply strip down Ubuntu to free some resources. Instead, you will be better off using a lighter distro, such as Lubuntu or Xubuntu.