Xref: utzoo comp.windows.x:20174 comp.sources.wanted:11119 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!samsung!uunet!atexnet!cvbnet!aperez From: aperez@cvbnet.UUCP (Arturo Perez x6739) Newsgroups: comp.windows.x,comp.sources.wanted Subject: Re: Xfortune? Message-ID: <146@cvbnetPrime.COM> Date: 23 Mar 90 18:57:36 GMT References: Sender: postnews@cvbnetPrime.COM Lines: 40 From article , by jv@mh.nl (Johan Vromans): > I'm looking for a X version of fortune(6). One that displays the > fortune message in a separate window, sized to the size of the > message. > Does there exist such a goodie? > > Thanks for any info. > > Johan > -- > Johan Vromans jv@mh.nl via internet backbones > Multihouse Automatisering bv uucp: ..!{uunet,hp4nl}!mh.nl!jv > Doesburgweg 7, 2803 PL Gouda, The Netherlands phone/fax: +31 1820 62944/62500 > ------------------------ "Arms are made for hugging" ------------------------- I've written a shell script that does more or less this. It depends on your having xmessage. I actually use it for my .login. Here it is. # clear if (-x /usr/games/fortune) then set f=/tmp/fortune.$$ /usr/games/fortune -a | sed 's@ @ @g'> $f if ($?DISPLAY) then set c=`awk '{ if (length > l) l = length } END { print l }' $f` set l=`cat $f | wc -l` set width=`expr $c \* 10` set height=`expr $l \* 25 + 38` xmessage -noprint -font lucidasans-18 -geometry ${width}x${height}+250+350 $f else cat $f endif rm -f $f endif Arturo Perez ComputerVision, a division of Prime aperez@cvbnet.prime.com Too much information, like a bullet through my brain -- The Police