POV-Ray : Newsgroups : povray.unix : PovRay Uninstall and Recompile on Linux 7.3 to run in cron? Server Time
23 Dec 2024 00:39:22 EST (-0500)
  PovRay Uninstall and Recompile on Linux 7.3 to run in cron? (Message 1 to 4 of 4)  
From: 3dtrue
Subject: PovRay Uninstall and Recompile on Linux 7.3 to run in cron?
Date: 21 May 2004 10:05:00
Message: <web.40ae0b779a613fce4700678c0@news.povray.org>
I am soo in love with this povray thing! Thanks community for a great thing!
I've been poving on my windows desktop for a couple months. Onward, i was
hoping to get povray to do a render every hour from my linux server of a
dynamic pov file. Basically, a 3d landscape of my webserver with night and
day based off system time and traffic logs showing up as lights inside
buildings etc. I have root, so i installed povray 3.5 no problem, and test
rendered via a ssh Putty shell window from my Windows system at home.
I was simply typing (from my pov folder) povray ./gigtown.pov I was getting
my output file gigtown.png looking povy and dandy. Everything was working
great. Next up i wrote a perl script to auto render this pov file every
hour.

Here's the script if anyone's curious.
#!/usr/bin/perl -w
use strict;
#Cwd and chdir for when i am run as cron
use Cwd;
#content-type for my hopefuly option of running as cgi
#print "Content-type:text/htmlnn";
print chdir("/var/www/gigfoot/gigfoot.net/www/3d/")."n";
print getcwd()."n";
print "Rendering Gigtownn";
print system("povray ./gigtown.pov");
exit;

This works great via my ssh shell when i run it. It starts pov i see output
all is well.

Then i found the same problem two other folks have reported in this group,
I cannot render from my crontab entry or from a cgi script. I tried it as
root and as a reg user, Made a bash script too hoping cron would run that
and povray would get the input, but bash result sends me Page Segment
fault.

From reading these posts, i am lead to believe the only way to run povray on
linux every hour like i want is to recompile it from source. I already
installed the povlinux.gz already (the non-source version). I am not sure
how i can uninstall povray, i haven't seen any docs on uninstalling it.

I'm hoping for some guidance before i proceed.

1. Anyone know of a way to run povray via a crontab? or a web cgi without
recompiling? I've got root access and run suexec. I've tried a bash, perl
script, and a scheduled command, none of which allow me to pass the pov
file i want to generate.
Also, for what it's worth, i will never need to change the pov file's name.
It will always be the same source file if it helps. I like security and i
wanted it this way since i may need to run this as root.

2. If i need to recompile, how do i uninstall the non-source code version i
already installed? Or how do i force install the source version overtop of
it.

3. My box is purely a webserver, no display will ever be needed, i was
hoping to purely render to output files, quickly and quietly. Seems like
someone maybe had this desire before me.


Sounds like i need to
1. uninstall povray first
2. download and make configure the source code
3. reconfigure to not use the x server

Any help aor feedback is generous and appreciated.

P.S. i have a windows server too, but i was sooo hoping to do this on Linux.


Post a reply to this message

From: Stefan Viljoen
Subject: Re: PovRay Uninstall and Recompile on Linux 7.3 to run in cron?
Date: 21 May 2004 14:42:31
Message: <40ae4d89@news.povray.org>
3dtrue wrote:

> I am soo in love with this povray thing! Thanks community for a great
> thing! I've been poving on my windows desktop for a couple months. Onward,
> i was hoping to get povray to do a render every hour from my linux server
> of a dynamic pov file. Basically, a 3d landscape of my webserver with
> night and day based off system time and traffic logs showing up as lights
> inside buildings etc. I have root, so i installed povray 3.5 no problem,
> and test rendered via a ssh Putty shell window from my Windows system at
> home. I was simply typing (from my pov folder) povray ./gigtown.pov I was
> getting my output file gigtown.png looking povy and dandy. Everything was
> working great. Next up i wrote a perl script to auto render this pov file
> every hour.
> 

> Then i found the same problem two other folks have reported in this group,
> I cannot render from my crontab entry or from a cgi script. I tried it as
> root and as a reg user, Made a bash script too hoping cron would run that
> and povray would get the input, but bash result sends me Page Segment
> fault.

Did you get any error messages? Anything in the cron log?

Regards,

-- 
Stefan Viljoen
Software Support Technician
Polar Design Solutions


Post a reply to this message

From: 3dtrue
Subject: Re: PovRay Uninstall and Recompile on Linux 7.3 to run in cron?
Date: 21 May 2004 17:50:00
Message: <web.40ae785986d9ac554700678c0@news.povray.org>
Cron log reports a run from povray, with no parameters passed.
The perl script above runs great if i am at a shell (ssh via putty) and run
the perl script. It's when i try and automate this process i am failing.
Tried automating so far with:
crontab
bash

Sadly, i may have to turn on telnet to see if i can do it remotely via a
telnet window. But talk about security flaw! and a pointless bridge.
I wish i knew more about this stuff compiling on linux and uninstalling etc.

Not to grope, but still hoping for advice on.

A. Yes you need to uninstall and then compile a custom source.
B. If so, How to uninstall the non-source version of povray 3.5 so i can try
and recompile with the no X version.

I hope my ignorance amuses somebody today.

James


Post a reply to this message

From: 3dtrue
Subject: Re: PovRay Uninstall and Recompile on Linux 7.3 to run in cron?
Date: 22 May 2004 07:35:00
Message: <web.40af3a2686d9ac554700678c0@news.povray.org>
i solved this in perl without recompiling povray. Also no need to do
anything regarding -/+Dd either. Here's a perl solution i tested with RHE.
I have a remote linux server, no display ever needed.

The below script i have added to my crontab to run as root every hour. Works
like a charm too! I know there are better ways to do this. But i simply
don't know them. This one does work though. Hope it helps. Back to poving
for me!

###### begin perl code
#!/usr/bin/perl-w
use strict;
use Net::SSH::Perl;
my $host = "111.111.111.111";
my $user = "usernm";
my $pass = "passwd";
my $cmd = "povray +I/mypath/gigtown.pov";
my $ssh = Net::SSH::Perl->new($host,use_pty=>1);
$ssh->login($user, $pass);
print $ssh->cmd($cmd);
exit;
###### end perl code

Of special note is "use_pty=>1"

Perldoc sez...
Set this to 1 if you want to request a pseudo tty on the remote machine.
This is really only useful if you're setting up a shell connection (see the
shell method, below); and in that case, unless you've explicitly declined a
pty (by setting use_pty to 0), this will be set automatically to 1. In
other words, you probably won't need to use this, often.



Thanks for everybodies help!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.