#!/usr/athena/bin/perl $COLORFILE='/usr/X/lib/rgb.txt'; open(CF, $COLORFILE); while() { if(!/^!/) { ($j, $j, $j, @color_name) = split; $color[$i++]=join(' ', @color_name); } } close(CF); $color_cnt = @color; $bg=&GetRand; $fg=&GetRand; $cr=&GetRand; print "xterm -fg $fg -bg $bg -cr $cr\n"; exec ('xterm', '-fg', $fg, '-bg', $bg, '-cr', $cr); sub GetRand { $cnt = int rand $color_cnt; return $color[int rand $color_cnt]; }