[wplug] alias script for users based on their $DISPLAY
Kevin Squire
gentgeen at linuxmail.org
Sat Jul 16 00:40:13 EDT 2005
Dear list,
I have 4 computers in the house, the primary one being a Debian box with
LTSP, and the others occasionally serving as the thin clients via a
floppy boot disk. (Kind-of gives them a dual-boot situation, where the
Win98 drives will EVENTUALLY get pulled out if I have it my way)
Anyway, I have sound working thanks to esd, for all but a few
troublesome apps (mostly the games). I was able to get sound working
properly if I ran the game with 'esddsp frozen-bubble' using
frozen-bubble as an example. So my basic thought was - "If not at the
primary machine, then use a list of aliases, otherwise don't worry about
it." And as I find a new app that is not working right, I can just add
it to this alias file. So I created a script that gets called from
everyone's ~/.xsession file. Here is the script so far:
#!/bin/bash
# file name /usr/local/ltsp-alias
# called to check $DISPLAY, and issue aliases if not at primary box
if [ "$DISPLAY" != ":0.0" ]; then
echo "Put all the aliases here"
fi
When at the primary box, $DISPLAY returns ':*.0'
When at the terminals, $DISPLAY always contains the machines name,
'ariel.localdomain:*.0' or 'pos.localdomain:*.0' for example. The
thin clients can have up to 3 displays, but I only have them running
1 X session, so it is always :0.0 for my setup.
Here are my questions:
(1) When at the primary machine, I do not need the aliases, so how do
I adjust the scripts for when the user is at :1.0, :2.0, etc. ?
(2) What exactly do I put for the "alias" line? Can I just do:
alias 'frozen-bubble' = 'esddsp frozen-bubble'
and/or do I need something different/something more?
(I have never set an alias outside of the .bashrc file)
Sorry for the long explanation for 2 little questions, just hope
it all made sense. If anyone needs more info to answer my questions,
feel free to ask me.
Kevin
--
*****************************************************************
Associate yourself with men of good quality if you esteem
your own reputation; for 'tis better to be alone then in bad
company. - George Washington, Rules of Civility
More information about the wplug
mailing list