How do I prevent GDM from running at boot on Ubuntu?

I have a Ubuntu (Hardy Heron) sever that currenlty boots up and runs gnome. I would like to make it so that when it boots it only goes into text-mode (e.g. the x server never starts)

I tried:

sudo update-rc.d -f gdm remove

without any avail...how can I do this?

Replay

Messing with the runlevel, through /etc/inittab or /etc/event.d (replacement for inittab) or the kernel boot options, won't help. The default runlevel on Ubuntu is 2 (check with the runlevel command), and there is no runlevel which is configured to be multi-user and text mode by default.

Actually, I think your solution

sudo update-rc.d -f gdm remove

should have worked (and it works for me on 8.04)... Is there still a script named something like S30gdm in your /etc/rc2.d folder?

You need to do this:

mv /etc/rc2.d/S30gdm /etc/rc2.d/K70gdm

See, /etc/rc2.d/README. There's README files in all the /etc/rc?.d directories, as well as /etc/init.d.

Edit: The update-rc.d tool is not for editing these links. From the update-rc.d man page:

Please note that this program was designed for use in package maintainer scripts and, accordingly, has only the very limited functionality required by such scripts. System administrators are not encouraged to use update-rc.d to manage runlevels. They should edit the links directly or use runlevel editors such as sysv-rc-conf and bum instead.

Just an answer here for anyone using Ubuntu 10.10+

Using rcconf or sysv-rc-conf to disable gdm will not stop GDM from running on startup.

That is because 'upstart' (http://upstart.ubuntu.com/getting-started.html) is now being used to manage these services.

To disable GDM absolutely, and prevent it from running ever, do this:

sudo mv /etc/init/gdm.conf ~/gdm.conf

(To restore GDM put the file back in /etc/init)

I know this is slightly unrelated, but have you tried the server edition of Ubuntu? I believe it installs without X11 by default, and is a far cleaner base for a server. This also has the added benefit of making it boot really really fast!

On Ubuntu 8.04, I used sysv-rc-conf to remove gdm from all runlevels. Upon restarting the system, X did not start. So, you should do the same!

Using sysv-rc-conf and telling gdm not to load works here with Jaunty Jackalope.

I've never dwelt into the internal configurations of initd for Ubuntu in particular, but for other linux flavours it's usually in /etc/inittab.

You'll find there, very up the top, a line that defines your default run-level. Hopefully you'll have some comments to help you decide which one it is. I'll bet it's 3.

I think this post has a much better solution for modern Ubuntu (10.X):

... booting with the text kernel parameter will also prevent display managers managed by Upstart (e.g. gdm, kdm and lxdm) from being started at boot time.

If you are using Grub2, then in /etc/default/grub replace:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

with

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash text"

then run:

sudo update-grub

Remove splash to disable the splash screen and/or quiet to make the boot process verbose. If you wish to create a separate boot option for the text and GUI mode then check out this.

Then, if you want to go graphical after booting up, I guess you can use startx or start gdm

Category: linux Time: 2008-09-16 Views: 4
Tags: linux ubuntu gdm

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.219 (s). 12 q(s)