[wplug] alias script for users based on their $DISPLAY

Eric Cooper ecc at cmu.edu
Sat Jul 16 10:51:28 EDT 2005


On Sat, Jul 16, 2005 at 12:40:13AM -0400, Kevin Squire wrote:
> (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)

Instead of modifying everyone's .xsession file, why not create a new
directory, /usr/local/esd-bin/, and populate it with executable,
two-line shell scripts like this (which would be named frozen-bubble):
	 #!/bin/sh
	 exec esddsp /usr/games/frozen-bubble
etc.  You'll need to use the full pathname in the shell script to
avoid looping.

Then, on the secondary machines, put /usr/local/esd-bin in front of
everyone's PATH via something like /etc/skel/.bash_profile that
~/.bash_profile sources.  If you want to get fancy, you could test the
DISPLAY variable to decide whether to add this PATH element, or just
have two different versions, for the primary and secondary machines.

-- 
Eric Cooper             e c c @ c m u . e d u


More information about the wplug mailing list