Update: November 20th, 2009
I am not sure what I was thinking when I wrote this post, but if you want to easily control the programs that run on boot from a graphical interface go to: System -> Administration -> BootUP-Manager. If you do not have BootUP-Manager do “sudo apt-get install bum”.
If you want to know how to do this from command line, read below.
After I installed vmware server 2.0.2 on my Ubuntu 9.10 machine I realized that it would start every time the computer boots up. This makes total sense to be the default behavior, since you would like your guests to be automatically up and running again after a reboot. But in my case I only used a guest OS every once and a while so I do not want to have all the vmware server processes running on the background for no reason. And since vmware uses a browser based management console it also starts apache and java. That is too much stuff running in vain if you are not going to be using vmware.
My first notion was to check System -> Preferences -> Startup Applications but to my surprise it did not contain the vmware server application.
Since I knew that vmware server can be started or stopped with the /etc/init.d/vmware script, I was fairly sure that the installation had put some links in the rc.d directories to that file.
That meant using the update-rc.d command line utility. It manages all the links in the /etc/rc?.d directories where the “?” is the run level. So you can configure any application that has a script in the /etc/init.d directory to start (or not to start) on boot. You can also easily create your own init.d script by just copying and modifying an existent one.
So, first I checked if vmware has set up any links in the rc.d directories:
ls -l /etc/rc?.d/*vmware lrwxrwxrwx 1 root root 16 2009-11-03 21:44 /etc/rc0.d/K20vmware -> ../init.d/vmware lrwxrwxrwx 1 root root 16 2009-11-03 21:44 /etc/rc1.d/K20vmware -> ../init.d/vmware lrwxrwxrwx 1 root root 16 2009-11-03 21:44 /etc/rc2.d/S20vmware -> ../init.d/vmware lrwxrwxrwx 1 root root 16 2009-11-03 21:44 /etc/rc3.d/S20vmware -> ../init.d/vmware lrwxrwxrwx 1 root root 16 2009-11-03 21:44 /etc/rc4.d/S20vmware -> ../init.d/vmware lrwxrwxrwx 1 root root 16 2009-11-03 21:44 /etc/rc5.d/S20vmware -> ../init.d/vmware lrwxrwxrwx 1 root root 16 2009-11-03 21:44 /etc/rc6.d/K20vmware -> ../init.d/vmware
If you notice some of the link names start with “K” and some with “S”. “K” means “kill” and “S” means “start”.
To prevent vmware from starting at boot run the following command:
sudo update-rc.d -f vmware remove
This will remove all the links to the /etc/init.d/vmware script. The “f” option here is necessary because it forces update-rc.d to remove the links even though the /etc/init.d/vmware still exists. If you do not specify the “f” option you will have to delete this init.d script first.
If you want to restore the vmware application to run at boot again:
sudo update-rc.d vmware defaults
Debuntu.org has a more detailed explanation of update-rc.d.