non-graphic login with upstart?

Asked by Arnold Robbins on 2007-05-04

For various reasons, I strongly prefer to have my systems come up in non-graphic login mode. I then login and start X myself using my preferred window manager and applications.

I am used to doing this by setting the default init state in /etc/inittab to 3 and rebooting. I've been using Redhat for around 10 years and just this week installed Ubuntu (edgy) and find that I'm not in Kansas anymore (:-) with Upstart replacing init. I did some poking around at thought that by creating an /etc/inittab it would read the initdefault from there But that didn't seem to work. Advice welcome!

Please email replies too, although I will also try to check this forum.


Question information

English Edit question
upstart Edit question
No assignee Edit question
Solved by:
Scott James Remnant (Canonical)
Last query:
Last reply:
Jason Spashett (jspashett) said : #1

I wonder the same thing. There seems to be a lack of information on upstart, at least as regards basic administration. This is a bit poor since the system is now present in ubuntu. I haven't yet locates a faq on this particular type of thing although there is information on writing scripts themselfs.

Arnold Robbins (arnold-skeeve) said : #2

I'll agree with this. The other option, which seems less preferable but I may as well ask, is to uninstall upstart and install sysvinit. This seems less preferable, since upstart is there for a reason, but this is very close to being a showstopper for me.

So, is moving to sysvinit as "simple" as uninstalling upstart in synaptic, installing sysvinit, and rebooting? Or am I going to end up needing a rescue disk?


Actually, you've never been able to do this by changing the runlevel to 3 with Ubuntu or Debian. Debian-derived distributions have historically used runlevels differently to RedHat, and since both "standards" started about the same time, there's no reason for either to switch.

Modifying inittab to say runlevel 3 *will* change the default runlevel, but there's no difference between runlevel 2 (the default) or 3 until you modify them.

Rename /etc/rc3.d/S13gdm to K13gdm, then you will not have X started.

Arnold Robbins (arnold-skeeve) said : #4

Thanks Scott James Remnant, that solved my question.

Arnold Robbins (arnold-skeeve) said : #5

Much thanks for the information, it did the trick. FWIW, Redhat follows historical System V Release 3 and Release 4 behavior in terms of defining the meanings of the different init states.

Blare Sutton (blare) said : #6


I have been working on remastering an Ubuntu Desktop CD derivative and have been attempting to work with the runlevels. This thread is particularly poigniant because the live CD does not have an /etc/inittab. Nor does it appear to pass runlevel switches provided at boot time. The only possible runlevels AFAIK when booting Feisty from the LiveCD are Single or default.

Are you able to either a) help point me in the right direction as to how to alter this behaviour in regards to the live CD; or b) direct me to the right person to ask the above?



Arnold: not true, System V used runlevel 5 for shutting down to firmware! The difference between runlevel 2 and 3 was that 3 had network filesystems exported, while 2 didn't.

Blare: since we've never had a runlevel to mean "full system without X display manager", there has never been an "easy" way to boot the Live CD like that; Bug #85014 not withstanding.

Assuming you are creating a custom CD, simply remove the display manager symlinks from it when creating so that the display manager is not started.

This can be done during boot, for example:

  1) add "break=bottom" to the kernel command-line (F6 iirc)
  2) at the shell, remove /root/etc/rc2.d/S*gdm
  3) exit the shell

Blare Sutton (blare) said : #9


Thank you for your response. The solution that I found shortly before your post was to edit /etc/event.d/rc-default and add a line:

elif grep -q -w -- "-3\acquire\|3" /proc/cmdline; then
      telinit 3

This causes the live CD to actually listen for an option to boot into a runlevel other than Single or Default.

Now I just have to figure out how to cause a tty to run something other than getty (I want it to run and respawn a perl script) as the tty configs in /etc/event.d do not AFAIK actually do anything...



Blare Sutton (blare) said : #10

Sorry, missed a pipe in the above, that should have been:

elif grep -q -w -- "-3\|acquire\|3" /proc/cmdline; then
      telinit 3