I've finally gotten sick and tired of OpenOffice.org taking over 30 seconds to open on my computer, when M$Word running uner Wine (Crossover) is near instantaneous.
Unfortunately, the Gnome OOOQuickstart project is still supporting only Gnome 2.2, so I decided to write a stupid, brute force solution (sort of) in Perl.
Here is my (basically working) code:
#!/usr/bin/perl
use strict;
while (1) {
my $running=`ps ax|grep "soffice.bin -quickstart"`;
if ($running !~ /openoffice/) {
# don't match if only the "grep" is there
sleep 5;
# give the process time to end to avoid silly crashes...
system("/usr/lib/openoffice/program/soffice.bin -quickstart -plugi
+n");
}
}
My question (given the category I posted under, you knew it was coming to this...) is what would be a "good" Perl solution to this? I mean, this is functional and all, but I'm just making repeated system calls -- my program doesn't deserve the name of perlscript, because it's really just a shellscript in Perl clothing.