Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed ubuntu-12.04.1-server-i386 and on top of that i have installed Ubuntu desktop environment so that i can maintain server easily.

Hear I totally understand that installing Desktop environment will affect my server efficiency but its quit easy to maintain server with GUI so I am wondering that is there any workaround to enable or disable Ubuntu Desktop Environment whenever we need it like we do in Windows for services ? I searched and reffed many sites but did not found anything related to this.

Thanks in advance and sorry for my poor English.

enter image description here

share|improve this question

2 Answers 2

Try to disable GUI, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo update-rc.d -f gdm remove

When you restart your computer, you’ll get text-mode login. To run GUI again:


To enable GUI again:

sudo update-rc.d -f gdm defaults


share|improve this answer
I execute command "sudo update-rc.d -f gdm remove" nothing happens! then i tried "sudo service lightdm stop" but it stops at checking battery stste and "sudo service gdm stop" is unrecognized service –  Rushik Parikh Jan 9 '14 at 9:22
I installed 12.04 server yesterday, and followed the steps, and it worked. Did exactly as the source said. Let me know. –  Mitch Jan 9 '14 at 9:51
i have have added image in the question. I guess the command is not executing properly –  Rushik Parikh Jan 9 '14 at 10:48
"sudo echo "manual" >> /etc/init/lightdm.override" worked for me –  Rushik Parikh Jan 9 '14 at 11:10
I tried that, and it didn't work for me. see image –  Mitch Jan 9 '14 at 11:27
up vote 2 down vote accepted

This is a specific instance of a generic question, "how do I prevent an upstart service from running at boot".

You can use an override:

sudo echo "manual" >> /etc/init/lightdm.override

To start lightdm on command:

sudo start lightdm

To restore your system so that lightdm is always started on boot:

sudo rm /etc/init/lightdm.override

For more information, the upstart cookbook is your friend:


SRC : Here

share|improve this answer
And how do I shut down the GUI again? –  Håkon K. Olafsen May 6 '14 at 8:17
sudo service lightdm stop –  Rushik Parikh May 7 '14 at 11:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.