[ Table of Contents ] [ Front Page ] [ Prev ] [ Linux Gazette FAQ ] [ Next ]

"Linux Gazette...making Linux just a little more fun!"


Linux for Nana: Accessibility for X

By Bill Bennet


This installs X Windows twm for your Nana

     Have you got a Nana? Is she old and suffering from cataracts and glaucoma so that she has blurred vision? My old mom is a Nana for her little grandkids, and she has the blurred vision plus a touch of forgetfulness (halfzeimer's). Can you see exploded frozen Pepsi cans in the freezer; left there to cool down quick? Yes, I know, flowing cold water is faster, but the old girl thinks "freezer for cold", and her synapse pathways are ancient and nigh unbreakable.

     Well, the problem with her and a linux box is the small print on those X applications; not to mention detailed pixel-by-pixel rodent twitching. Nana is not a mouser. Window after window opens up in a tiny font that is frustrating for her and she wanders off in disgust. She especially wanders off when the internet is loading up one of those "dynamic" (ha!) web pages that take up tons of RAM and take five minutes to conclude their "exciting" scripts. All we want is big text and we want it right now; so we use lynx around here. The "dynamic" scripts can not execute on the little lynx browser, and like the Answer Guy says, it acts as a twit filter. The Netscape browser goes into service when Nana wants to see a site that she saw on television.

     If you have a linux distribution available to you, then you can easily install X Windows in a big enough format so that she can finally see her desktop. Even old neglected machines can install linux X Windows, all you need is 110 megabytes (other than swap) on a hard disk to hold it all. Want to bug some NT or W2K users? The T-1 connection for file downloads for www.chguy.net has Apache web server, ftp, and X inside and it uses a total of 110 megabytes for the system. Total cost, less big disk drive, under 100.00 Canadian (like 20 bucks US:).

Debian can do this thing

     Just about all linux distributions can do this little twm setup. There is a very disturbing trend away from small installations of linux. Even though you can get a super linux-powered, tiny, complete file-server-on-a-flash-ROM-disk-drive like kyzo's pizza box, most distributions will overload your hard disk on an automatic installation. The main one to overload is RedHat and the other rpm-based distributions. When a minimum Custom install takes 125 megabytes, you automatically exclude a lot of devices, not just old machines.

     You need a thin client/thin server (a small installation) for the new wave of networking gadgets that were under your festive dead tree (or simulated dead tree). Yes, WAP-enabled devices and destinations (voice powered interfaces to Wireless Markup Language enabled cell phones) are text based internet browsers that are just begging for a few linux-powered buttons. Your Palm PDA and your other handheld PCs are using 8 megabytes of memory in total. If you go with the new Bluetooth network devices, you can jam a 340 megabyte tiny Microdrive disk drive onto your device.

Flight of Fancy:

     Right now you can have a voice-activated, hands-free linux box by using Emacspeak and ViaVoice. Your desktop is already in the future thanks to T.V. Raman. Now we are faced with all of these tiny internet devices. The challenge for linux developers will be to figure out a way to get some linux box power out of these miniature marvels. Then you will truly need to play with a small installation of X in order to keep yourself from WinCEing. I imagine that a flat screen cell phone flipped up like Captain Kirk's communicator will soon appear; complete with internet buttons to push and a tiny rodent-mover thumbswitch. Linux-powered with X, of course. Please visit those wacky kyzo hackers to see what you can get done in a small space.

Small X with Big Fonts

     Anyone who can read can install X Windows and get it configured for large print on a small 14" screen. The plus side is that you do not need a huge graphical user interface. Simple twm which comes with X Windows can be easily configured. Good old Debian has the small purposeful ".deb" packages that you can put in one at a time to make a very small yet powerful linux box. This article fires up Debian and installs a big format for twm so that you can simply point your Nana at the machine and click, uh, let her go linuxing.

A lot of targets

     The target system is any thing you want; Mac(m68k), Amiga(m68k), Atari(m68k), Alpha, ARM, Sparc, UltraSparc(sparc64), Hurd(hurd-i386), PowerMac(powerpc), i386 PC; with 16 MB RAM, a 1.44 MB floppy and at least a tiny hard disk, 110 megabytes small. Some of you will scoff, but there are a lot of small hard disks attached to a lot of old garage/attic computers. Thank goodness we can put the NT-killer linux on them; it enables the average Joe to run a home or business network of seven machines for the same price as a single pentium-CPU-melter.

     We begin at the source for our distribution, good old '/debian'; at the top of the distribution tree. The Official CDROM or the internet machine will hold all the X files you need. If you have not yet installed X, I congratulate you on having more balls than the general cyber population. Or it could be that I sympathize with you on being told that you did not have enough space for an X installation. Fie on those festering file-bloat-fostering folk.

Apt-get, dftp, dpkg or dselect

     Note that you just need the name of the package, not the full version number. Note that the list of packages is in /var/lib/dpkg/available and you can read it with less; less is more.

  
No rodent clicking here; watch your fingers and press once per key:

less /var/lib/dpkg/available

     To search in less, type / then the word you seek. Type n to go to the next instance of your search word.

     If you do not have X Windows (XFree86) then we need to login as root and grab these files:

     If you have apt, (you do on Debian 2.1 and up) you can log onto your network and then use apt-get to download them and install them and then clean up its own mess. The usual term is "apt rocks!".

  
For example:

apt-get install xbase-clients xfree86-common 
  

     You may wish to use dpkg as well, since some of us like to grab the client by the collar and shake hard.

     Then we will install them with dpkg -i filename.

   
For example:

cd /debian/dists/slink/main/binary-i386/x11
dpkg -i xserver-vga16
  

     The good old way is to use dselect, but since it requires patience to learn how to use it, many 'frantic clickers' do not bother. Too bad for them. The dselect utility requires that you know where your '/debian' tree begins; either on the internet machine or somewhere else. This is the first hump. The dftp package will let you install direct from the internet machine (for example, ftp.ca.debian.org -- only in Canada, eh). Hump two is that you need to know the names of your packages. That one is easy, just fire up a second vt with a LeftAlt-F2 and then type dselect. You already have less pointed at /var/lib/dpkg/available on vt #1.

     Now you can bounce between the two vt's and find a filename easily. To search in dselect, type / and then the filename, just like in less. Put a plus in the highlighted line for your package and press Enter. Bingo! All of the other files you need will be suggested to you. Take them and press Enter again. Job done.

Configure X

     Type XF86Setup and follow the directions.

Start X

     Funny how a few simple changes can stop you in mid-stream. Now that you have X inside, how do you start it? The usual old way is startx, which will fire up xinit and read the '.xinitrc' file in your home directory. The Debian standard now gets it to read '.xsession' in your home directory. Tastes great and it is less filling.

     The graphical login screen is very popular and you get that from gdm, kdm and their grandfather, xdm. Stick with Gramps. The xdm is started with "xdm" (surprise) and it then reads a load of files to get you to the pretty picture login.

Here are the X files

     Login as root to muck about with these:

     Copy these to your home directory (~/):

     Edit these in your home directory (~/):

     Whooee. And they say linux is tough to configure. This is full access and control, baby. Nobody else dares to let you in on it. Only open source software can be this much fun; similar to building your own car, but not so greasy. If you want greasy, go sit in on a sales presentation for something proprietary or monopolized.

Scripting is the mojo for linux

     In the world of GNU/Linux Open Source there is a fine art to this configuration fiddling. Unfortunately you need to know what is going on inside the code before you can really get a handle on custom configuration files.

     So we will rely on the manual pages and the info pages and the README files and the very special comments inside the configuration files themselves. All you are doing is scripting your little machine's movements. All you are doing is taking absolute control of your machine. You got the mojo workin'.

     Fire up mcedit (it comes with Midnight Commander. You do have it, yes?). Go to the file you will edit and block out the script with the F3 toggle and then F9 copy it to the ~/.cedit/cooledit.clip file. Exit with F10.

     Then type mcedit your-new-file-name. It will give you a nice blue page to F9 insert the ~/.cedit/cooledit.clip file. Edit it in your personal way and F2 save it, or F9 save it as your-new-script-name.

     Huh? What does a configuration file do? It provides all of the setup instructions for your program to read into the setup. You are the director and the program awaits your instructions. It gets them from the configuration files.

/etc/init.d/xdm

     The way to avoid a graphical login is to remove this file from /etc/init.d. Copy it to somewhere first, no 'frantic deletions', please. CAUTION.

  
To get a boot to the console, move this file to somewhere else.

mv /etc/init.d/xdm /root/bucketofiles/xdm
  

/etc/xdm/Xresources_0

     Let us make a giant login for Nana's login screen.


xlogin*font: -b&h-lucida-medium-i-normal-sans-25-180-100-100-p-141-iso8859-1
*Font: -b&h-lucida-medium-i-normal-sans-25-180-100-100-p-141-iso8859-1

/etc/X11/xdm/Xservers

     So you want to change virtual consoles for your xserver?


:0 local /usr/bin/X11/X vt7

/etc/X11/xdm/xdm.options

     To prevent the xconsole from starting, you put a little # in front of the offending line to disable it. Some of us can not understand the little xconsole messages.


#run-xconsole

/etc/X11/window-managers

     Here is your file for giving the order of your preferred window managers for X. The top one gets loaded.


/usr/bin/X11/twm
/usr/bin/X11/ctwm

/etc/X11/XF86Config

     The Nana does not like monkeying around with Control-Alt-KeyPadPlus to change screen resolutions. "Revolutions? What is that? Is it that spinning sound?", said Nana. We will set up 640 x 480 and that is it for her machine.


# found in 'Screen sections' last part of the file
# this is done in the stanza matching the xserver (SVGA in this case)  
#Modes       "640x480" "800x600" "1024x768"
# below is the new line and now all you get is one resolution
Modes "640x480"

In your home directory now

~/.Xresources

     The features you will need for xterm are put in here. Calling for just a simple 'xterm &' will pop out an xterm with all of these settings.

  
XTerm*geometry: +0+10
# Use 12x24 for your 1024x768 screen, HUGE on a 640x480
XTerm*font: 12x24
# The Nana needs lots of reminders and prompts
XTerm*title: Right-click here to maximize
# This will give you Shift-PageUp scrollback of 59 half-pages
# you want to see what she has been doing, it can get interesting:)
XTerm*saveLines: 700

~/.xsession

     We simply need to tell the machine about the programs to start up right away. This copy you made is Branden Robinson's excellent example xsession file. You can chop it down for the Nana.


# this is nana's .xsession file to pop open a big font for this damn thing.
# the xset stops auto repeat of the keys if you uncomment it.
#xset -r
xsetroot -solid pink
xclock -geometry -0+0 &
xterm -geometry 52x18+0+0 -fn 12x24 -T "Nana's mc Editor" -e mc -c &
exec twm

~/.twmrc

     This is the one to work on.

 
# this huge font can even be seen by Nana at 1024 x 768
TitleFont "-adobe-courier-bold-r-normal--24-240-75-75-m-150-iso8859-1"
MenuFont "-adobe-courier-bold-r-normal--24-240-75-75-m-150-iso8859-1"
IconFont "-adobe-courier-bold-r-normal--24-240-75-75-m-150-iso8859-1"
IconManagerFont "-adobe-courier-bold-r-normal--24-240-75-75-m-150-iso8859-1"
# random placement will plunk down a program for you, no fiddling
RandomPlacement
# this will show you the program icons with a Control-s, Control-h to hide it
# you can try out the keyboard controls here, but it is tricky
"s"     = c : root|window : f.showiconmgr
"h"     = c : root|window : f.hideiconmgr
# the 3rd button is a right-click in the title bar to maximize a window
Button3 = : title : f.fullzoom
# the menu can have more menus inside it, but write them separately.
# good menu choice descriptions beat cryptic one word codes every time 
menu "defops"
{
"Twm Command Menu"      f.title
"New Window"    f.menu  "window"
"Kill a Window" f.destroy
""              f.nop
"Quit Xsession" f.quit
""              f.nop
"Grab a HTML Browser"  f.menu "browser"
}
menu "window"
{
"New 8x16 Font Window"  f.exec "xterm -geometry +0+10 -fn 8x16 &"
"New HUGE Font Window"  f.exec "xterm &"
"New Editor Window" f.exec "xterm -fn 8x16 -e mc -c &"
}
# the Nana calls mc the editor, so why quibble?
menu "browser"
{
"Big Old Arena Window" f.exec "arena -lens 2 &"
"tiny arena window" f.exec "arena &"
"Huge Font lynx" f.exec "xterm -e lynx &"
"tiny lynx window" f.exec "xterm -fn 8x16 -e lynx &"
"Internet dial" f.exec "pon &"
"Internet hangup" f.exec "poff &"
}
# tiny font for Nana is 8x16 but she can read it well at 640x480
 

~/.Xmodmap

     The keyboard is yours to command.


# because the XKEYBOARD extension in the XF86Config file is in use,
# there is no need to edit this. Really.
# However, you can get serious about new keycodes and keysyms here.

~/.bashrc

     You need a big Nana prompt. To make it even with the left side of the screen, you need to make this prompt in the same size of xterm that the Nana will use. It changes with the font, because the xterm columns and rows change to fit the X root window, especially in 640 x 480.


PS1="Nana: Middle-click the title-bar to see hidden windows;
      Left-click and hold on the pink window to see the menu;
       Your cancel key is Control-C or try Control-Escape;
        Your wipeout X keys are Control-Alt-Backspace;
         \h:\w/Nana's prompt $"
alias mc='mc -c'

~/.bash_profile

     The remote machine will give you this prompt when you login from the internet machine to remotely administer your remote machine. Would you like a Marguerita on the beach while you type?


PS1="\h:\w/Nana's prompt from cyberspace$"


Finding a font

     Going on a font-finding mission is easy enough. You can install the xcontrib package and use xfontsel to see and select your fonts.

     The xfstt is your TrueType font server, very nice. Works best for applications needing scalable fonts. You can use the exact same fonts that you have now on your monopoly machine. Just copy them over.

     Without xfontsel, you can still get your list of fonts with this:


xlsfonts | less

We are going live to chguy.net

     On your screen is a little window called "Debian/GNU Linux". It only shows up when you are at a working xdm login. It is also so darn big that you can read it from across the room. That is the real reason for making a big font setup for your screen. If you have to strain to see the tiny print on your 1024x768 screen, then you can choose the groovy format of your present setup on a bigger screen or you can make an easier-to-read screen.

     Making your present window manager into an accessible X Window machine for the vision impaired is very rewarding. I got fresh and delicious cake for my efforts.

     The biggest problem we face with these newfangled desktops like GNOME or KDE is their complexity. Window after window of tiny buttons and fancy formatting looks very nice on a seventeen inch screen. We only have fourteen inch screens here, and a lot of folks are in the same squinting, headaching, eyestrain boat.

     For the fourteen inch screen we needed easy installation, well commented configuration files, good README files and a distribution that could fit onto a small disk drive.

     The answer is /debian. Always is.

Reference reading and links:

Access-HOWTO - required reading for all developer linuxians

Keyboard-and-Console-HOWTO - we need to make new keymaps for the handicapped

Emacspeak-HOWTO - we really need speech control software

/usr/doc/xfree86-common/README.Debian - very important to know what the re-organization does

The Installation Guide for Debian 2.1 - good basic stuff here


linux on CD

     Your CHGUY Debian 2.1 CD set is labeled B1, B2, S1 and S2. The B1 CD (#1 of 4) is the installer for a regular desktop machine. The B2 CD (#2 of 4) is slightly tweaked for installing Debian 2.1 on your laptop machine. For installing via dselect, either one can go in the CDROM drive. Those wacky hackers are ready for anything.

X Windows is compact

     When you install the Standard Server package it only fills up 50 megabytes on your hard disk. Add in 32 megabytes for a swap partition and you have only used 80 megabytes from a small, old hard disk. That will leave you enough room for the xbase ".debs" plus your video-card-specific xserver and the rest of the XFree86 window system.

RPM based bloat

     You can squeeze a small rpm installation into 125 megabytes from the Custom install option on the rpm based RedHat-style distributions.

     However, a RedHat Custom install does not include X unless you leave it checked on the menu. Leave about 340 megabytes for X and you will also get KDE or GNOME setup as well.

       
Installation Type | size in megabytes |   partition size
----------------------------------------------------------
GNOME Workstation   561 Megabytes     | uses 650 M partition
KDE Workstation     573  "     "      |  "   650 M "    "
Server system       324  "     "      |  "   400 M "    "
Custom system       125  "     "      |  "   140 M "    "        
     The Automatic Desktop installation of RedHat will suck up 700 megabytes in a flash. Mandrake will grab about 500 megabytes, with the other rpm-style installers doing a similar big desktop; either GNOME or KDE. Accessibility for those two desktops is simply a matter of choosing a big font, but that is too big a system for a non-mouser like a Nana. Too many buttons, too much clicking, too much RAM needed. So we keep it simple with twm or ctwm with this article.

The total X

     Branden Robinson hands out the straight goods yet again, and here is the total list of files that make up the Debian packages for installing X. You need "rstart, rstartd, twm, xbase-clients, xdm, xfree86-common, xfs, xmh, xproxy, xserver-common, xsm, and xterm. Some files from the old xbase package were also placed in xlib6g (XKB and locale data) and xlib6g-dev (development tools)." Please see /usr/doc/xfree86-common/README.Debian.

     Looking good is one thing, looking smart is another. If you get eyestrain from your tiny fonts and busy screen, remember that you can save your eyes by setting up BIG and getting an infra-red mouse and sit across the room from your linux box. Happy holidays and Happy linuxing!


made with mcedit on an i486
running Debian 2.1 Linux 2.0.36
No systems were frozen or crashed during the testing of these procedures.
All references to outperforming NT or W2K are true.


Copyright © 2000, Bill Bennet
Published in Issue 49 of Linux Gazette, January 2000


[ Table of Contents ] [ Front Page ] [ Prev ] [ Linux Gazette FAQ ] [ Next ]