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.

This question already has an answer here:

So I installed Ubuntu server to run some tests on a VM. For various reasons I couldn't get a specific DEB file, and instead of using a shared folder I decided it would be a good idea to install ubuntu-desktop so I can run Firefox and grab the file directly from the web.

Now, every time I boot my machine I get the graphical interface, but I have no reason for it since I'm running tests with the LAMP server.

I tried this

How do I boot into console mode?

And this

Possible to install ubuntu-desktop and then boot to no GUI

If anyone has any idea for a solution, I'd appreciate it.

BTW: I thought about simply uninstalling ubuntu-desktop, but I feel like I might need it in the future, so, I really just want to disable the GUI.

EDIT:

While this solution is not perfect I realized, it works for now:

On the How do I boot into console mode? question, user Michael K mentions that:

" Okay another way would be to disable the lightdm service in init:

/etc/init/lightdm.conf

in there there is a section like this:

start on (filesystem
and started dbus
and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
or stopped udev-fallback-graphics))

"

While this worked perfectly, I can't access the GUI with the startx command - the system just crashes. And I guess I'll need to uncomment the section to load startx.

Considering the fact that I want to keep the server running for as long as possible, having to restart it every time I want to log in the GUI is kinda unproductive.

EDIT2:

I guess it's possible simply to kill the GUI ( How to stop the Unity Desktop ) when I log in the system, it's still counter productive, but it works too.

EDIT3:

Michael K's reply worked fine. I just realized that to call the GUI I need to run lightdm and not startx

share|improve this question

marked as duplicate by karel, guntbert, Eric Carvalho, BuZZ-dEE, Braiam Feb 3 at 19:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Maybe you could delete the Unity + 2D sessions and see what happens: cd /usr/share/xsessions, ls, then delete all of them: rm x.desktop rm y.desktop ...etc. –  Marco Scannadinari Aug 10 '12 at 16:10
    
I've got gnome.desktop / gnome-shell.desktop / ubuntu-2d.desktop / ubuntu.desktop - I should remove them all? –  Johnny Bigoode Aug 10 '12 at 16:42
    
Yes. Although I am not sure what could happen, it's only a guess - so it might destroy everything, or it could fallback into a prompt. –  Marco Scannadinari Aug 10 '12 at 16:48
    
Meh, who cares? It's a VMBox, and I already managed to learn a lot =p. Anyways, I deleted them all, and I still get the GUI. –  Johnny Bigoode Aug 10 '12 at 16:49

2 Answers 2

That instructions works like a charm to me in my Ubuntu 12.04.1

Change (edit) in /etc/default/grub file:

From:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

To:

GRUB_CMDLINE_LINUX_DEFAULT="text"

Now you must update the grub configs:

sudo update-grub

And its done! After reboot, to start the gui just login and type:

startx
share|improve this answer
    
In case 'startx' doesnot work try 'sudo start lightdm' –  vincent mathew Jul 19 at 9:15
up vote 3 down vote accepted

On the How do I boot into console mode? question, user Michael K mentions that:

" Okay another way would be to disable the lightdm service in init:

/etc/init/lightdm.conf

in there there is a section like this:

start on (filesystem
and started dbus
and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
or stopped udev-fallback-graphics))

"

Then to call the GUI I just need to run lightdm.

share|improve this answer

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