On Wed, Sep 05, 2007 at 01:19:31PM -0000, Bogdan Butnaru wrote: > Hello! I'm using Ubuntu Gutsy, and for some times I've been hacking > around parts of the boot process, and in particular the set-up of the > text console. > > There are a few improvements I've been able to make, and some of them I > think should be included as default in the Ubuntu packages. I'd like > however the input of others familiar with the packages (console-tools > and console-setup) about the changes, and for committing the patches. So > here are a few ideas: Thanks for your comments. I'll address them point-by-point. > (1) redundancy setting console font: as far as I can tell, the > /etc/init.d/console-setup is setting up the console font quite late in > the boot process. However, /usr/share/initramfs-tools/scripts/init- > top/console_setup does (or can do) the same thing much earlier. I think > only the later part should be used, since it provides the "good" font > longer during the boot process. This is done intentionally in order that those people not using an initramfs still get the console font set up for them; but the font isn't set by /etc/init.d/console-setup if usplash is running, so in practice a normal Ubuntu system will only set up the font once. > (2) redundancy setting keyboard layout: as far as I can tell, at least > three of the scripts in /etc/init.d handle the keyboard layout. Ideally > this should be set-up only once, very early in the boot process (ideally > starting with grub, but init-top is OK too). I administrate my own > system, and I'm used with dvorak; it's very annoying when something > breaks and I have to use the layout on the keyboard, which isn't even > normal qwerty since this is a French laptop. (This is an issue for > anyone using a non-standard keyboard, like the localized variants, not > only for dvorak.) In much the same way as the font, this is only set by /etc/init.d/keyboard-setup if usplash isn't running, and is normally set in the initramfs just about as early as possible. What's the third script you're referring to? If /etc/init.d/console-screen.sh, note that that does nothing if console-setup is installed. It is true that there is a certain amount of cruft in the console initialisation code, though. I'd be interested in patches to simplify it, though note that some of the complexity *is* there for a good reason so I might not take all of them. :-) > (3) a better default font: I'm using the Uni3 console fonts because they > enable lots of diacritics. (I also happen to think it looks nicer.) I > know many people don't usually need diacritics (ie, English natives), > but with Unicode being almost everywhere these days, it's not uncommon > to encounter filenames with such characters, even if one doesn't use > them all the time. (Ubuntu does use UTF8 as the default encoding after > all, right?) > > Localized versions would certainly benefit from having a Unicode console > font enabled by default. AFAIK, no-one would be hurt by defaulting to > the Uni3 fonts, and people who need more (for Arabic or whatever isn't > supported by Uni3) can just set-up their systems as before. We always use Unicode, but the fundamental problem with console fonts is that any given font only supports 256 or 512 glyphs (depending on the type of font); this is a kernel limitation. Thus there is no default that can cover all of Unicode or that makes sense for all languages. For English and for most Western European languages, we default to Lat15, which has a reasonable set of diacritics even though they certainly aren't complete: À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ Ğ ğ İ ı Œ œ Ş ş Š š Ÿ Ž ž It's worth noting that many languages do have different defaults that are more appropriate for them. I take your point that Uni3 is a strict superset of Lat15, though, so it may be worth changing it. My worry is that the VGA fonts in console-setup don't entirely cover Uni3, so depending on your font selection you might get garbage on the screen if you actually tried to use this. > (4) a better default layout: related to the previous item, since Unicode > is more common I've often felt the need to generate accented characters. > I'm not talking only about my native-language files; sometimes I've had > to transfer, eg, music files through a ssh connection, and this always > leads to issues with songs from international artists. > > Even though it won't cover everything (like Japanese), we could set-up > by default the internationalized version of the US keyboard; it uses > AltGr to generate some dead-keys; this doesn't annoy anyone who doesn't > use them (altgr+tilde,a is not a common key combination), and it would > help a lot some users. This one I'm afraid I can't do. Occasionally we've set up us(intl) by accident and it consistently generates lots of complaints from confused users. The thing that really confuses people about us(intl) is that the apostrophe becomes a dead key, which US users really aren't used to. At the moment, X doesn't have a us variant which has the third-level (AltGr) bindings but not the dead keys. > I think the console-setup package is intended to use the same keymaps > with X. It might be worthwhile to get rid of the other kind(s) in the > default install, to minimize redundancy. This was indeed the purpose of switching to console-setup, and I believe we already have got rid of the other kind; console-data hasn't been installed by default since Edgy. You may still have it on upgraded systems, though. > I'd like to also add the possibility to modify or create custom > layouts, at least by providing a nice man page explaining how things > work. Better support for customisation would definitely be a good thing. There's another bug noting that it's too difficult to do the equivalent of 'loadkeys us' nowadays, too.