How do I turn off the Gnome interface for VNC in CentOS?
Posted: Thu Oct 22, 2009 9:20 pm
CentOS 5.x installs for virtual machines are configured to start Gnome by default when the machine boots. You won't see this graphical interface if you log in through SSH, but it will be running in the background, and you can log in through VNC to interact with it.
If you would prefer that it not start when the machine boots -- perhaps because you never use it and want to save the resources -- you'll need to edit the /etc/inittab file and change the default runlevel:
1. Log in to your server through SSH (instructions for this are on the "Server control" page of its control panel).
2. Type this command and hit enter:3. Cursor down to this line:
... and change the "5" to a "3" so it looks like this:
4. Hit Control-X. The text editor will ask you if you want to save the modified buffer; hit "y".
The next time you reboot your machine (such as through the "reboot" command), you will see a normal login prompt in VNC instead of the Gnome GUI.
If you would prefer that it not start when the machine boots -- perhaps because you never use it and want to save the resources -- you'll need to edit the /etc/inittab file and change the default runlevel:
1. Log in to your server through SSH (instructions for this are on the "Server control" page of its control panel).
2. Type this command and hit enter:
Code: Select all
nano /etc/inittab
Code: Select all
id:5:initdefault:
Code: Select all
id:3:initdefault:
The next time you reboot your machine (such as through the "reboot" command), you will see a normal login prompt in VNC instead of the Gnome GUI.