[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RfC: Hurd console by default

Hello everybody,

We have been thinking/longing for this for a long time, I think we
should move to starting the Hurd console by default on bootup.

I have done a prove-of-concept .deb for this which is available at

This does:

1. modify /libexec/runsystem.gnu to 
  - touch /dev/tty1 beforehand so we make sure the console-client
    connects to tty1 instead of a random tty1 (works for me)

  - after running runttys, goes into an endless while loop, sourcing
    /etc/default/hurd-console and starting the Hurd console with the
    command-line options found therein

2. Add /etc/default/hurd-console, containing the Hurd console startup
   command-line options, by setting (or commenting out) values for
   The admin can then modify those (e.g. change $KBD to point to
   '-d xkb' rather than '-d pc_kbd')

This means that the Hurd console gets started on bootup.  If the admin
modifies /etc/default/hurd-console and presses ctrl+alt+backspace, the
console detaches/reattached immediatly with the new configuration.

However, there are a couple of questions:

1. It's sort of a hack.  See
http://people.debian.org/~mbanck/marcus_azeem_console_login.txt for some
discussion on how this should be done properly.  It also means running
e.g. xdm will be painful/not possible as the Hurd console gets started
/after/ /etc/rc2.d/ is being run.  However, it's the only choice we have
currently which does not involve some non-trivial coding.

2. Is /etc/default/hurd-console the right name? Packaging-wise,
/etc/default/hurd would be easier (i.e. correlating with the package
name), but this strikes me as too generic, we might possibly want to set
more general stuff in there in the future.  Any suggestions?

3. Running the Hurd console in a tight endless loop results in mayhem if
the user introduces errors the console-client choks on in
/etc/default/hurd-console, one would have to reboot into single-user
mode to fix it.  However, being able to change the defaults and get them
applied by simply pressing ctrl+alt+backspace looks cool, too.  The
alternative would be to run the console just once (however, currently,
some people [like me] get a blank screen when returning from X and have
to detach/reattach the console to get a working screen again)

4. It would be nice if one could start/stop the Hurd console via
/etc/init.d/hurd-console {start|stop|restart|reload}.  However, signals
are not getting trapped by the console currently I think (Marco sent in
a patch for that at 
http://lists.gnu.org/archive/html/bug-hurd/2004-07/msg00046.html, but
there were issues and it has not been applied yet), so this would not
work I guess.

This is the current version of the patch, if nobody raises concerns or
comments, I might apply it (with some more comments also mentioning xkb
and the other mouse protocols) to SVN and eventually upload!

--- daemons/runsystem.sh.orig	2001-12-20 18:29:33.000000000 +0100
+++ daemons/runsystem.sh	2005-03-05 03:59:21.706337248 +0100
@@ -127,10 +127,24 @@
     trap "kill -$sig \${runttys_pid}" $sig
+  # Touch the first tty so that the Hurd console is certain to pick it
+  # and not some random other tty.
+  touch /dev/tty1
   # This program reads /etc/ttys and starts the programs it says to.
   ${RUNTTYS} &
+  # Startup the Hurd console in a tight infinite loop..
+  while (true); do
+    if [ -e /etc/default/hurd-console ]; then
+      . /etc/default/hurd-console
+    fi
+    console ${DISPLAY} ${KBD} ${KBD_REPEAT} \
+            ${SPEAKER} ${MOUSE} ${MOUSE_REPEAT} -c /dev/vcs
+  done
   # Wait for runttys to die, meanwhile handling trapped signals.
--- /dev/null	2005-03-06 22:45:46.584979768 +0100
+++ debian/hurd-console.default	2005-03-08 00:39:39.000000000 +0100
@@ -0,0 +1,21 @@
+# Options to start the Hurd console.
+# The display driver, mandatory.  Either `vga' or `ncursesw'.
+DISPLAY='-d vga'
+# The keyboard driver, mandatory.  Either `pc_kbd' or `xkb' from the
+# console-driver-xkb package.
+KBD='-d pc_kbd'
+#KBD='-d xkb'
+# The keyboard repeater.  Required for X11.
+# The mouse driver.  Optional.
+#MOUSE='-d pc_mouse --protocol=ps/2'
+# The mouse repeater.  Required for X11.
+# The pc speaker.  Optional.
+#SPEAKER='-d generic_speaker'



Reply to: