Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a Linux system (Ubuntu) running in a VM, but now I want to disable the graphical shell. Where in the startup process are the graphical components launched? Is it some run-level dependent config? Which config files must I edit to stop it?

share|improve this question

5 Answers 5

up vote 3 down vote accepted

you can just disable gdm service:

sudo mv /etc/init/gdm.conf /etc/init/gdm.conf.off
share|improve this answer
    
If anyone is doing this in VirtualBox like me, it helps to know the keyboard shortcut for navigating to the virtual terminals, Host Key (e.g. right Ctrl) + e.g. F1 or whatever. –  mydoghasworms Sep 6 '11 at 9:03

You'd need to prevent gdm service from starting at boot. The problem is that Ubuntu uses the weird upstart thing... So there are no simple commands to disable booting of some service. You are left with either removing the gdm init script or editing it so that it doesn't run gdm. See this thread for how this can be done.

share|improve this answer

Open the file /etc/default/grub and add to the variable GRUB_CMDLINE_LINUX_DEFAULT the string text.

Then, update GRUB's configuration file with

sudo update-grub
share|improve this answer

You can try this:

systemctl disable gdm
share|improve this answer
1  
there is no systemctl on Ubuntu (at least not on my 12.04 Ubuntu). On what version of Ubuntu would that work? –  Anthon Jun 11 '13 at 3:01

On newer Ubuntu systems (e.g. version 12.04), there is no gdm as mentioned in some of the other answers. Instead it runs lightdm, you can configure that not to start with:

sudo -s -H
echo "manual" >> /etc/init/lightdm.conf
share|improve this answer

Your Answer

 
discard

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.