[nzlug] How to switch from desktop mode to server mode?

Daniel Lawson daniel at meta.net.nz
Tue Aug 1 11:43:23 NZST 2006


>
> Why not just change the run level from 5 to 3 in /etc/inittab ?
That's roughly what Craig was sugesting, however: Ubuntu dapper defaults
to runlevel 2. It also doesn't appear to have the same distinction
between runlevels as, say, Redhat does.

# The default runlevel.
id:2:initdefault:

# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS

# What to do in single-user mode.
~~:S:wait:/sbin/sulogin

# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.


There are no special distinctions between runlevels 2, 3, 4 and 5, other
than all 6 console getties are only available in runlevels 2 and 3.  If
you look through the /etc/rcx.d directories, they are all almost identical:

diff <(ls rc2.d) <(ls rc3.d)
4d3
< S10powernowd.early
40d38
< S99stop-readahead

EG: runlevel 2 has those entries, runlevel 3 doesn't. In particular,
they all start gdm

I'm sure there will be an ubuntuforum post somewhere. 

To the OP: if all you want is for X to not start, you can simply remove
gdm from the startup sequence. In a shell, run:

sudo update-rc.d -f gdm remove

This will stop gdm starting on boot, which will stop X loading.  The
packages are all there, but they only consume disk space. If you are
actually running out of disk space it might be worth removing them, or
if you find future updates to them tedious to download, but otherwise I
wouldn't worry about it.




More information about the NZLUG mailing list