Disable X windows in ubuntu

Peter Garrett peter.garrett at optusnet.com.au
Wed Jul 19 07:15:55 UTC 2006


On Wed, 19 Jul 2006 01:18:31 -0400
"Don Parris" <parrisdc at gmail.com> wrote:

> > Hi,
> >
> > Is there any body can help me how to disable the x window in ubuntu ? I
> > dont need the graphical interface.
> >
> > thanks in advance.
> 
> 
> 
> Why not just boot using init 3?  You should be able to do init 5 when you're
> ready for X.  I've done it on SUSE - I assume you can enter the init level
> at boot time in Ubuntu.

Nope. Or rather, you could, but it wouldn't do what you expect  ;-)

Ubuntu uses the Debian model, and the default runlevel is 2, unless
otherwise configured - so init 3 won't help, I'm afraid, unless you
enjoy reconfiguring runlevels .

If you have the file /etc/X11/default-display-manager  you can edit it or
do

echo "false" | sudo tee /etc/X11/default-display/manager

This will disable gdm/kdm/xdm , or whatever you have in that file

You can put it back with a text editor, or do for example

echo "/usr/sbin/gdm" | sudo tee /etc/X11/default-display-manager

Of course, for a temporary disabling of X you can just do

sudo /etc/init.d/gdm stop        then use the "restart" option or the
"start" option of that init.d script  to restart it.

Peter




More information about the ubuntu-users mailing list