Stop GDM / xserver on boot

Associate
Joined
9 Nov 2005
Posts
767
Location
places..
Hi all,

I am setting up a file-server, (ubuntu server edition 9.10) and found myself stuck so I installed the xserver (along with gnome gdm) all 2 GB of it!

However, I would like to now like the server to startup without loading GDM and the xserver etc! (whats the point its a headless server!)

I assume that I most likely need to edit a startup file (init.d or a .conf file?) using nano / vi.

I would also like to be able to load the xserver by typing startx if i get stuck with the command line at any point!

If anybody can point me in the right direction it would be appreciated! (cookies available!)

Thanks!
 
whats the point its a headless server!
What's the point in a server with a head? A server's job is to serve, not to be the client, so what's the point in having a monitor (except for when things go badly wrong...)

I assume that I most likely need to edit a startup file (init.d or a .conf file?) using nano / vi.
Nah - Ubuntu has a command to do it. I can't remember what it's called, but I'm sure a google of "rc-update ubuntu equivalent" will give you the answer (or even a search of these very forums...)

I would also like to be able to load the xserver by typing startx if i get stuck with the command line at any point!
For local access, it will be
Code:
/etc/init.d/gdm start
But why bother? why not set up ssh and X forward any apps that you need to your desktop (or if you absolutely *need* a full desktop on your server, then you can start gdm over ssh... or you can use one of the other remote access utils)

If anybody can point me in the right direction it would be appreciated! (cookies available!)
worthy of a cookie? :)
 
I got this: "sudo update-rc.d -f gdm remove" from here.

I am yet to see if this works, but from the looks of it it probably does.

Yup up can have a cookie for putting me in the right direction:)! But theres a whole jar waiting for when I setup my real file-server!


And double check what i wrote about the server having a head, I didn't say whats the point in a headless server like I think you read.;)
 
Last edited:
And double check what i wrote about the server having a head, Ii didn't say whats the point in a headless server like I think you read.;)

Lol... that'll teach me to read properly ;)

Once you've removed gdm from sys init, you can stop gdm with /etc/init.d/gdm stop and that will drop you down into a console.
 
I wonder if "sudo apt-get remove ubuntu-desktop" would work since it was "sudo apt-get install ubuntu-desktop" that installed everything! (2GB worth!)
 
Just change the default run level from 5 to 3, (multi user with network and X to multi user with network).

I suspect you will be able to do that by editting /etc/inittab and changing the 5 to a 3 on the initdefault line (I am not sitting in front of a ubuntu box at the moment but I'll check later when I bring up my 9.10 VM at work).

You'll still be able to manually start a graphic login if needed (as per above) but by default the system will boot to a point with no graphical systems running. Uninstalling software will prevent you from using it in the future if you do need it for something, unless you are short on space that's overkill ... just stop it from starting up.


Edit: well it appears that Ubuntu is completely non-standard when it comes to the above, (why?!?!) ... as such the steps above for a normal Unix/Linux system won't work ... to try stopping graphical login coming up (and hence X) run the following:


sudo update-rc.d -f gdm remove
 
Last edited:
I wonder if "sudo apt-get remove ubuntu-desktop" would work since it was "sudo apt-get install ubuntu-desktop" that installed everything! (2GB worth!)

Absolutely, but you'll find that you no longer have the X server or Gnome to fall back to at a later date if you need it (oh noes!)

Edit: well it appears that Ubuntu is completely non-standard when it comes to the above, (why?!?!)

Because Ubuntu is based on Debian and Debian doesn't follow the rules here (although saying that... what is "standard" about any linux distro?)
 
Back
Top Bottom