Folks,

I've managed to get a Macintosh PowerPC (6100/66) running as an LTSP client. 
The server is an Athlon running Mandrake 8.1. One of the things done when 
starting up an X client is to "fix" the keyboard by swapping the functions of 
the Delete and BackSpace keys. Unless you've had to deal with this before, 
it's a rather arcane piece of folklore: the functions of these two keys were 
incorrectly defined when the X code was developed, and there are several 
ways of fixing the problem. Mandrake has a script in the /etc/X11/xinit 
directory called fixkeyboard that swaps the action associated with the two 
keys, and this is done as part of the xinit processs.

In the fixkeyboard script, the keys are reassigned based on the keycodes for 
a standard pc101 keyboard. These codes are not the same for the Mac keyboard, 
and the issue is further compounded if the LTSP workstation user is allowed 
to logon locally, for administrative chores, for instance. I have modified 
the script to look at the value of the variable DISPLAY to check on two 
things: whether the terminal is local (DISPLAY = :0.0) or remote (DISPLAY = 
ws003.test.home:0.0) and where the session is coming from. (Some workstations 
might be PCs and use the standard keyboard.) 

I have modified my script, and attach it for folks who might need to deal 
with a similar problem:

--Skip

================================================================

#!/bin/sh
# Startup script called from /etc/X11/xinit/xinitrc and /etc/X11/xdm/Xsession
# to fix keyboard.

# NOTE: when opening an X11 session remotely the keyboard must match
# the one on the remote display; so we check if there is a keyboard
# configured for the particular display first.

case $DISPLAY in

    #Local clients have DISPLAY defined as :0.0
    #Remote clients have it defined as <origin host name>:0.0
    #For example: ws003.test.home:0.0
    # ws001 is an i686, ws002 & ws003 are Power Macs

    ws002* | ws003* )
        xmodmap -e "keycode 0x3b = BackSpace" \
                      -e "keycode 0x7d = Delete" 
        ;;

    * )
        # Original code goes here (Mandrake 8.1)
        ;;

esac
# fixkeyboard ends here

_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.openprojects.net

Reply via email to