Re: Why Perl here ?


Robert Budzynski ()
Fri, 27 Mar 1998 11:35:45 +0100


>>>>> "alex" == alexandre ferrieux <> writes:

alex> A naive question:

alex> Why the !@#$%^ does the 'vncserver' script use Perl
alex> ???

alex> What nifty constructs in Perl, missing in the Bourne shell,
alex> do you need to:

alex> - set up a few env variables and options - check for
alex> broken PATHs - make sure the computer power is on (just
alex> kidding)

alex> Of course, Xvnc can be used without it. But don't you think
alex> people who need it most deadly are those who don't have Perl
alex> ?

alex> -Alex

Good question. I also had to install Xvnc on a machine that had no
perl, and that I did not have the root password for. Fortunately, in
that case it took me only one day to get the admin to make perl
available on the box (only required an extra nfs mount), but others
may be less fortunate.

I'm not very familiar with perl, but my guess is that it's the socket
functions that are being used to check for availability of tcp
ports. AFAIK nothing similar is easily available in
{c,k,ba}sh. Although one could perhaps write a slightly less robust
shell-script replacement for vncserver - I suppose it should be good
enough to keep on trying to start Xvnc until successful, upping the
display number by 1 after each failure, up to some reasonable number
of attempts before giving up? Does anyone know better?

rjb

######################################################################

Robert J. Budzynski <>
Physics Department Computer Center
Warsaw University
Warsaw, Poland
Home page: <>

######################################################################



This archive was generated by on Wed Feb 03 1999 - 15:33:07 GMT