4

I want to configure my Ubuntu installation to boot into a command-line prompt instead of the Gnome Desktop Environment. I ran the below command to effect this:

sudo update-rc.d -f gdm remove

It worked as intended and dropped me onto a shell prompt on reboot, BUT a lot of services (e.g network access) weren't running at that point.

They started up when I manually started GDM from the shell prompt.

How do I get Ubuntu to boot into the command shell without GDM, but without disabling other services, or having to manually enable them ?

By removing gdm using update-rc.d, have I changed the runlevel Ubuntu boots into ? I've looked at the Boot-Up Manager GUI in Advanced mode, but couldn't gather much from the Services tab.

Edit: The problem wasn't what I thought it was. I've described the modified issue and the solution in my answer below.

PS: As it stands, the question is misleading though the underlying problem is valid.

3 Answers 3

4

It turns out I was barking up the wrong tree. The services were getting called, but my network wasn't being configured till I logged into GDM. This had a cascading effect on anything that expected a configured network.

I filed a bug-report on Ubuntu Launchpad, and looking at some other bug reports helped me understand what was happening with my system. The solution was:

I've figured out why the network was configured on my other Ubuntu system, and am consequently able to do the same on this system: "Available to all users" option was selected on the default connection in the Network Manager applet. This enabled the system to configure the network even though I'm not logged in through GDM. I've verified that the network gets configured on this system too when the option is turned on.

On a side note, it would be nice if available networks could be detected and configured via console in a similar manner to how the Network Manager applet behaves. I guess that now my network is auto-configured so I can turn off GDM during boot and still remotely connect to the system.

I was basically expecting the pre-configured wi-fi connection to work on console mode, but it turned out that wasn't a valid expectation. Networks configured through the Network Manager applet from within GNOME take effect only when the same user logs into GDM, or if "Available to all users" is selected on the connection. It's kinda non-intuitive but that's the way it is.

2
  • So if I check this "all available users" options, it will login automatically at boot? Does it remember WPA keys, etc? This will be immensely helpful for when I (inevitable) botch things up and can't get any netwrok access from the shell.
    – TJ L
    Oct 8, 2009 at 17:51
  • yaaaay GNOME. turning Linux into Windows from the inside out. i'd call this a design flaw in the app, or in GNOME (is the KDE analogue any better?) ... if the app sets system settings, it should set system settings, not "system settings if the desktop environment happens to load" Oct 8, 2009 at 17:54
0

Try going into a run level that does not use the GDM. That is the easiest way to do this.

5
  • And which run-level is that ? Afaik, run-level 0 is stop, run-level 1 which is single-user (or recovery console), then run-levels 2-5 are all the same (they start GDM), and run-level 6 for reboot.
    – user4358
    Aug 9, 2009 at 23:24
  • It is run level 1 on some systems. That mode was run level 3 on one of the versions I was using. Run level 5 ran the GDM. You can certainly edit the boot scripts in any of those run levels to not load the GDM.
    – Axxmasterr
    Aug 9, 2009 at 23:41
  • Yes, I remember that (telinit 3) from running RedHat Linux ages ago. But that's not how Ubuntu seems to work. Is editing the boot script different from using update-rc.d ? I'd rather not mess with boot scripts if I have any other alternatives - which is what I'm looking for help on.
    – user4358
    Aug 9, 2009 at 23:57
  • Don't let editing the boot init file intimidate you. As long as you make a backup of the file you will be fine. You can always get back in under the single user mode. You should be able to remove the lines that run the GDM or just comment them out if you do not want to remove the capability permanently.
    – Axxmasterr
    Aug 10, 2009 at 0:22
  • It turns out the problem was a different one. I've described it in my answer below and updated the question to reflect this. Apologize if I've wasted your time.
    – user4358
    Aug 10, 2009 at 10:03
0

On the console, there's cnetworkmanager, a CLI frontend to NM.

Get it here: http://vidner.net/martin/software/cnetworkmanager/

You must log in to answer this question.