my $pid = fork();
if (0 == $pid) {
$main::lxdebug->message(LXDebug->DEBUG2(), " Child execing\n");
- exec($main::xvfb_bin, $display, "-screen", "0", "640x480x8", "-nolisten", "tcp");
+ exec($::lx_office_conf{applications}->{xvfb}, $display, "-screen", "0", "640x480x8", "-nolisten", "tcp");
}
sleep(3);
$main::lxdebug->message(LXDebug->DEBUG2(), " parent dont sleeping\n");
sub is_openoffice_running {
$main::lxdebug->enter_sub();
- my $output = `./scripts/oo-uno-test-conn.py $main::openofficeorg_daemon_port 2> /dev/null`;
+ my $cmd = "./scripts/oo-uno-test-conn.py " . $::lx_office_conf{print_templates}->{openofficeorg_daemon_port} . " 2> /dev/null";
+ my $output = `$cmd`;
chomp $output;
my $res = ($? == 0) || $output;
exit if ($new_pid);
my $ssres = setsid();
$main::lxdebug->message(LXDebug->DEBUG2(), " Child execing\n");
- my @cmdline = ($main::openofficeorg_writer_bin,
+ my @cmdline = ($::lx_office_conf{applications}->{openofficeorg_writer},
"-minimized", "-norestore", "-nologo", "-nolockcheck",
"-headless",
"-accept=socket,host=localhost,port=" .
- $main::openofficeorg_daemon_port . ";urp;");
+ $::lx_office_conf{print_templates}->{openofficeorg_daemon_port} . ";urp;");
exec(@cmdline);
}
}
my @cmdline;
- if (!$main::openofficeorg_daemon) {
- @cmdline = ($main::openofficeorg_writer_bin,
+ if (!$::lx_office_conf{print_templates}->{openofficeorg_daemon}) {
+ @cmdline = ($::lx_office_conf{applications}->{openofficeorg_writer},
"-minimized", "-norestore", "-nologo", "-nolockcheck",
"-headless",
"file:${filename}.odt",
}
@cmdline = ("./scripts/oo-uno-convert-pdf.py",
- $main::openofficeorg_daemon_port,
+ $::lx_office_conf{print_templates}->{openofficeorg_daemon_port},
"${filename}.odt");
}