8

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

Rushik Parikh
  • 241
  • 1
  • 2
  • 7

3 Answers3

6

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:

http://upstart.ubuntu.com/cookbook/

SRC : Here

Rushik Parikh
  • 241
  • 1
  • 2
  • 7
4

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:

startx

To enable GUI again:

sudo update-rc.d -f gdm defaults

Source:HTG

Mitch
  • 107,631
0

Another way to avoid the permissions issue, is to use 'tee'. Like so:

echo "manual" | sudo tee /etc/init/lightdm.override
Videonauth
  • 33,355
  • 17
  • 105
  • 120
Ketil
  • 11