[Pkg-kbd-devel] Re: Ubuntu keyboard/installer plans

Anton Zinoviev anton at lml.bas.bg
Wed Aug 23 10:26:47 UTC 2006


On Tue, Aug 22, 2006 at 07:13:35PM +0200, Tollef Fog Heen wrote:
> 
> It requires a new console-tools-udeb, but that's not very hard (I have
> one for Ubuntu already).  Among the other problems I encountered is
> that console-setup is never run when using d-i: setupcon tries to
> readlink /proc/self/fd/2 to decide whether it's on the console or not.
> To work around this, I made console-setup's postinst call setupcon <
> /dev/tty > /dev/tty 2>/dev/tty and added /dev/tty to the «ok» list in
> the readlink

I am a bit worried whether there can exist other situations when
/proc/self/fd/2 points to /dev/tty.  To avoid this weaking of the
check please test the attached patch -- it adds a new option --force
to console-setup.

Besides the new console-tools-udeb package, another thing that needs
to be done is to allow languagechooser provide console-setup with
information about the encoding of the selected locale.  Otherwise
there will be one additional unnecessary question.

Also, many of the non-pc keyboards are not working.  I had these fixed
around the first version of console-setup and the X upstream accepted
the changes but unfortunately now the keyboards are again broken. :-)
Moreover I am not sure what is the proper fix of the problem.

In the directory /usr/share/X11/xkb/symbols/macintosh_vndr/ one can
find some keyboard layouts that are Macintosh specific.  Do you know
whether people are using these?  The only important difference between
vendor-specific layouts and the main layouts are the symbols on the
third and fourth levels (the symbols activated by AltGr).

If these layouts are not used I can make the necessary changes in
/usr/share/X11/xkb/rules/base and persuade the X upstream to apply
them.

Otherwise we need some mapping from the standard layouts to the
vendor-specific layouts when such vendor-specific layout exists (far
not all layouts have vendor-specific alternatives).  Ofcourse this is
much more difficult task to achieve.

How is this problem solved in the Ubuntu installer and the other
distributions?  How the keyboard is configured for X when non-pc
keyboard is used?  If the installers use always only the standard
layouts, this could be strong evidence that people do not use the
vendor-specific layouts.

Anton Zinoviev
-------------- next part --------------
Index: setupcon
===================================================================
--- setupcon	(revision 195)
+++ setupcon	(working copy)
@@ -42,6 +42,9 @@
 	-v|--verbose)
 	    verbose_option=yes
 	    ;;
+	--force)
+	    force=yes
+	    ;;
 	--save)
 	    save=yes
 	    ;;
@@ -52,6 +55,7 @@
 
   -k, --keyboard-only  setup the keyboard only, do not setup the font
   -f, --font-only      setup the font only, do not setup the keyboard
+      --force          do not check whether we are on the console
   -v, --verbose        explain what is being doing, try it if s.t. goes wrong
       --save           copy the font and the ACM in /etc/console-setup,
                          update /etc/console-setup/boottime.kmap.gz
@@ -115,16 +119,18 @@
     fi
 fi
 
-case `readlink /proc/self/fd/2` in
-    /dev/tty[0-9]*|/dev/vc/[0-9]*|/dev/console)
-	;;
-    *)
-	if [ "$VERBOSE_OUTPUT" = yes ]; then
-	    echo We are not on the Linux console, exiting.
-	fi
-	exit 0 
-	;;
-esac
+if [ "$force" != yes ]; then
+    case `readlink /proc/self/fd/2` in
+	/dev/tty[0-9]*|/dev/vc/[0-9]*|/dev/console)
+	    ;;
+	*)
+	    if [ "$VERBOSE_OUTPUT" = yes ]; then
+		echo We are not on the Linux console, exiting.
+	    fi
+	    exit 0 
+	    ;;
+    esac
+fi
 
 #-----------------------#
 #       OUTPUT          #
Index: debian/console-setup.postinst
===================================================================
--- debian/console-setup.postinst	(revision 198)
+++ debian/console-setup.postinst	(working copy)
@@ -136,7 +136,7 @@
 
 # In d-i debhelper doesn't use /etc/init.d scripts :-)
 if [ -f /usr/share/console-setup-mini/console-setup.config ]; then
-    setupcon
+    setupcon --force
 fi
 
 #DEBHELPER#


More information about the Pkg-kbd-devel mailing list