Home > boot > How to disable unity from starting with ubuntu 12.04 LTS

How to disable unity from starting with ubuntu 12.04 LTS

December 6Hits:3
Advertisement

Is it possible to disable X at boot time? I'm setting up a server so it would be nice if it wouldn't load the graphical interface every time I boot.

Answers

Edit /etc/default/grub with your favourite editor, e.g. nano:

sudo nano /etc/default/grub

Find this line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Change it to:

GRUB_CMDLINE_LINUX_DEFAULT="text"

Update GRUB:

sudo update-grub


For systems that use systemd

This is an additional step for systemd releases, e.g. Ubuntu 15.04, the steps above for grub are still necessary.

You need to tell systemd to not load the graphical login manager:

sudo systemctl enable multi-user.target --force
sudo systemctl set-default multi-user.target

You will still be able to use X by typing startx after you logged in.

Installing the GUI will probably cause it to start automatically, but it's very easy to boot to text mode in Ubuntu. Just open /etc/default/grub as root and add text to the

GRUB_CMDLINE_LINUX_DEFAULT=

line. Then run:

sudo update-grub

Your system will then always boot to text mode.

If you want to boot to the GUI, just press e in the boot menu and remove text from the kernel line.

If you want to start the GUI after boot, just run:

sudo /etc/init.d/lightdm start

Hope this helps :)

For 11.04 and previous versions (and perhaps later)

If you want to boot into text mode:

Edit /etc/default/grub. For example:

sudo gedit /etc/default/grub

Find this line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Add text:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash text"

Then update Grub:

sudo update-grub

Note: Removing quiet splash (i.e. GRUB_CMDLINE_LINUX_DEFAULT="") will show text during boot but then show a graphical login screen as usual. Replacing quiet splash with text will leave you at a login prompt; to start a GNOME session, use sudo /etc/init.d/gdm start or startx.

To disable GDM:
Install bum How to disable unity from starting with ubuntu 12.04 LTS .

After installation it will be found under System>>Administration>>Bootup-Manager

Uncheck Gnome Display Manager How to disable unity from starting with ubuntu 12.04 LTS

If you are using lightdm as a login manager it can be prevented from loading by disabling it.

You can use an override:

sudo bash -c 'echo "manual" >> /etc/init/lightdm.override'

And 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:

You could use Ubuntu Server edition.

It has already beed answered in several old questions, but cannot find them just now, so I sum up the various situations here.

  1. To stop an X server started by startx, simply terminate the session.
  2. To stop an X server started by the Login Manager (GDM), run
    sudo service gdm stop
    
    

    then move to a tty, for example pressing Ctrl-Alt-F1, then login here in text mode.

  3. To avoid at all the starting of the Login Manager (and X), modify
    /etc/default/grub
    
    

    changing the line

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    
    

    to become

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash text"
    
    

    then update the grub configuration file with

    sudo update-grub
    
    

    so that the next time you go directly to text mode, and you need startx to initiate a X session, or alternatively sudo service gdm start.

I did following

Step 1 First update your repository by running

sudo apt-get update

Step 2 There is some bug in old version of lightdm, so we need to upgrade the same. To do so run,

sudo apt-get install lightdm

Step 3 Now we have to modify grub config. Step 3a Open /etc/default/grub with your favourite editor and change

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="text"

Step 3b Also comment GRUB_HIDDEN_TIMEOUT=0 This line is for un-hiding the GRUB menu

Step 4 Now we will upgrade GRUB configuration

sudo update-grub

Step 5 Ubuntu 11.10 Desktop edition use lightdm for GUI. We need to disable the same

sudo update-rc.d -f lightdm remove

Step 6 Now restart your machine.

Found at Disable GUI Boot in Ubuntu 11.10

I noticed this thread revolves around assuming you are using LightDM as the Display Manager. Though this may be the usual DM/welcomer, that isn't part of the original question. (And he did not specify..)

In my case:

I use KDE/KDM on my server. Instead, I simply disable the upstart/service from starting under runlevel 2:

/etc/init/kdm.conf: (kdm: 4:4.8.5-0ubuntu0.3 , Upstart Version: 1.5-0ubuntu7.2)

Find:

start on ((filesystem

change

           and runlevel [!06]

to

           and runlevel [!026]

Assuming your default runlevel is 2 on fresh reboot, you will have a console and not KDM. Then you can run DM/DE manually when needed = Use 'startx' /etc. To return machine to console and exit X server completely after this, just use 'log out'.

Other dm .confs scripts are similar. (I setup my server like this.. to be able to work using a GUI occasionally - but, not pull resources when not using/needed or simply rebooting.)



EDIT

(My current system: Upstart 1.12.1 / Ubuntu 14.04)

Due to upstart the way to resolve this lately is to simply disable your Display Manager from starting on boot:

echo "manual" | sudo tee -a /etc/init/{service}.override

For lightdm:

 echo  "manual" | sudo tee -a /etc/init/lightdm.override

This can be any service in /etc/init including kdm/gdm. 'startx' to run as needed following a reboot.

ref:
How to disable lightdm?
How to enable or disable services?

When you install Ubuntu-desktop, it will automatically set lightdm to start with the system. You will have to disable this (probably by editing /etc/rc.local) and use startx to run the graphical interface when you need it.

I did following

Step 1 First update your repository by running

sudo apt-get update

Step 2 There is some bug in old version of lightdm, so we need to upgrade the same. To do so run,

sudo apt-get install lightdm

Step 3 Now we have to modify grub config.

Step 3a Open /etc/default/grub with your faviourite editor and change

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="text"

Step 3b Also comment GRUB_HIDDEN_TIMEOUT=0 This line is for unhiding the GRUB menu

Step 4 Now we will upgrade GRUB configuration

sudo update-grub

Step 5 Now restart your machine.

The steps are:

Customize the grub 2 configuration:

  • sudo nano /etc/default/grub, to open the file with root privilege,

Find the line

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”

and change it to

GRUB_CMDLINE_LINUX_DEFAULT=”text”

Save the changes (hit ctrl + o followed by ENTER) and close the file (ctrl + x).

To apply the new configuration do this

  • sudo update-grub

Now restart your PC

  • sudo reboot

There you are... A text-graphic login screen... Supply your credentials to log-in to the tty (default tty1). You can change the tty's with crtl + alt + [F1 to F6] for tty1 to tty6. You may also start the X session (X11 session), the graphical user interface, with sudo start lightdm (ctrl + alt + F7).



PS: In case you want to revert the changes you've made here follow the link:

How to revert back to GUI as the default interface from CLI in Ubuntu desktop?

If using Lubuntu 15.05 with systemd managing boot processes it is possible to boot to the console and then later from the console start the graphical environment. Follow these steps:

  1. follow the previously mentioned edits to grub per Bruno:
    Edit /etc/default/grub with your favorite editor, eg: nano:

    sudo nano /etc/default/grub
    
    

    Find out this line:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    
    

    Change it to:

    GRUB_CMDLINE_LINUX_DEFAULT="text"
    
    

    Update Grub:

    sudo update-grub
    
    
  2. Bruno suggested sudo systemctl enable multi-user.target --force. The use of force bothered me so I preferred sudo systemctl set-default multi-user.target. open a terminal and do sudo systemctl set-default multi-user.target
  3. reboot will take you into console asking for password
  4. when desiring to enter graphical environment enter sudo systemctl start lightdm. You will be taken to the lightdm login window.
  5. use ctrl alt F1 key combo to get back to console you were at to exit out if so desired. (I exit out of the console mode as I am usually done there till next boot) ctrl alt F7 to get back to lightdm login. or ctrl alt F1 through F7 per need or desire.

Yes, telling the system to start in console at boot time is possible through editing grub command. When you reach grub menu, highlight Ubuntu's entry and press e.

You will see text such as in the image bellow:

How to disable unity from starting with ubuntu 12.04 LTS

Change the text quiet splash to text . Press F10 to launch. (Source: rolling-ubuntu). I have tested this on my system, 14.04, booted into text console, no lightdm in sight. Started lightdm with sudo initctl start lightdm

To avoid doing so every time, you can add permanent grub entry with such option as suggested in this answer

An alternative suggestion, is to change default runlevel and change runlevels at which lightdm starts/stops, as suggested by another answer on the same post

For Ubuntu 14.04 Trusty Tahr and Ubuntu 12.04 Precise Pangolin, systemd has been added to a third party PPA, so testing it on the latest Ubuntu LTS systems is easy. All you have to do is add the ppa to your system

sudo add-apt-repository ppa:pitti/systemd
sudo apt-get update
sudo apt-get dist-upgrade

Now Open the /etc/default/grub file by using any of the text editor (I used gedit here) with sudo privilege via Terminal to edit like follow:

sudo -H gedit /etc/default/grub

change the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT = "init=/lib/systemd/systemd"

save the file and update the Grub:

sudo update-grub

Then restart now the system will boot in to text console tty1.

To Login in to GUI again run

sudo start lightdm

Note: Do not use startx or Ctrl+Alt+F7 For Ubuntu 15.04 that uses systemd use sudo service lightdm start

Related Articles

Copyright (C) 2018 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.837 s.