POV-Ray : Newsgroups : povray.unix : To the Unix gurus ! Server Time
27 Dec 2024 23:40:49 EST (-0500)
  To the Unix gurus ! (Message 1 to 9 of 9)  
From: Fabien
Subject: To the Unix gurus !
Date: 23 Jul 2002 12:19:58
Message: <3D3D7FA6.90709@caramail.com>
I need some help about terminals.
For Pyvon, I would like to use a script to start boths Pyvon and a 
terminal to which the verbose, errors, stats ( in short all the normal 
output) of POV is redirected; with Pyvon taking up 2/3 of the upper 
screen and the terminal the 1/3 left.

For the time being, I start konsole (KDE terminal), resize it so that it
takes up about 1/3 (at the bottem ) of the screen, type python pyvon.py 
( to start Pyvon), and then resize Pyvon to fill up the rest to the screen.

The best would be a script that test the screen resolution and does the 
rest automatically.


Something else :
How do you send a command into a terminal ( like Xterminal ) which is 
already created so that the output of the command goes back to Xterminal 
? It's the end of the day's work I am not sure my english is clear 
enough .............


Thanks

Fabien


Post a reply to this message

From: Steve
Subject: Re: To the Unix gurus !
Date: 23 Jul 2002 13:20:53
Message: <slrnajr41c.k4k.steve@zeropps.org.uk>
On Tue, 23 Jul 2002 18:09:10 +0200, Fabien wrote:
> I need some help about terminals.
> For Pyvon, I would like to use a script to start boths Pyvon and a 
> terminal to which the verbose, errors, stats ( in short all the normal 
> output) of POV is redirected; with Pyvon taking up 2/3 of the upper 
> screen and the terminal the 1/3 left.
> 
> For the time being, I start konsole (KDE terminal), resize it so that it
> takes up about 1/3 (at the bottem ) of the screen, type python pyvon.py 
> ( to start Pyvon), and then resize Pyvon to fill up the rest to the screen.

How about something a bit more standard like Xterm rather than something that's 
desktop specific. 

> 
> The best would be a script that test the screen resolution and does the 
> rest automatically.

Maybe the X man page or Xresorces man page would be a good place to start 
here, also look at the xterm man page there is the "-geometry" option this
is explained in more detail in the X man page. 

> Something else :
> How do you send a command into a terminal ( like Xterminal ) which is 
> already created so that the output of the command goes back to Xterminal 
> ? It's the end of the day's work I am not sure my english is clear 
> enough .............

Example:

Open your Xterm like this:

xterm -e tail -f some.file.to.be.read
  
And start POV something like this:

povray -whatever -option -All_File=some.file.to.be.read 

I havn't tested anything here and there are probably better solutions 
but it may get you started. 

-- 
#local i=.1;#local I=(i/i)/i;#local l=(i+i)/i;#local ll=(I/i)/l;box{<-ll,
-((I/I)+l),-ll><ll,-l,ll>pigment{checker scale l}finish{ambient((I/l)/I)+
(l/I)}}sphere{<i-i,l-l,(I/l)>l/l pigment{rgb((I/l)/I)}finish{reflection((
I/l)/I)-(l/I)specular(I/l)/I}}light_source{<I-l,I+I,(I-l)/l>l/l} // Steve


Post a reply to this message

From: Yann Remond
Subject: Re: To the Unix gurus !
Date: 24 Jul 2002 03:28:24
Message: <3D3E5718.580CDDB7@imag.fr>
Steve wrote:
> 
(...)
> Open your Xterm like this:
> 
> xterm -e tail -f some.file.to.be.read
> 
> And start POV something like this:
> 
> povray -whatever -option -All_File=some.file.to.be.read

I think this will work only if some.file.to.be.read is a FIFO (otherwise
tail will end because the file is empty).

so first do :

mknod some.file.to.be.read p

and this should work.

Yann
-- 
Yann Remond (mailto:Yan### [at] imagfr)


Post a reply to this message

From: Warp
Subject: Re: To the Unix gurus !
Date: 24 Jul 2002 04:13:35
Message: <3d3e61af@news.povray.org>
Yann Remond <yan### [at] imagfr> wrote:
> I think this will work only if some.file.to.be.read is a FIFO (otherwise
> tail will end because the file is empty).

  Not if you use tail -f

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Nicolas Calimet
Subject: Re: To the Unix gurus !
Date: 24 Jul 2002 05:10:37
Message: <3D3E6F0D.1060708@free.fr>
> with Pyvon taking up 2/3 of the upper

> screen and the terminal the 1/3 left.

> The best would be a script that test the screen resolution and does the 
> rest automatically.

	Just a little quick hack in c-shell demonstrating this with
two konsole windows. Cons: this is csh, any other shell would be
for sure much better; it does not take into account the size of
windows decorations and other toolbars; some applications (xterm)
do not resize properly. Pros: none  ;o)


#!/bin/csh

set width  = `xwininfo -root | grep Width | cut -d: -f2`
set height = `xwininfo -root | grep Height | cut -d: -f2`

set twothird = `echo "scale = 0; $height * 2./3" | bc -l`
set onethird = `echo "scale = 0; $height - $twothird" | bc -l`

konsole -geometry ${width}x${twothird}+0+0 &

konsole -geometry ${width}x${onethird}+0-0 &


Post a reply to this message

From: Steve
Subject: Re: To the Unix gurus !
Date: 24 Jul 2002 05:12:31
Message: <slrnajsrhu.m7q.steve@zeropps.org.uk>
On Wed, 24 Jul 2002 09:28:24 +0200, Yann Remond wrote:
 
> I think this will work only if some.file.to.be.read is a FIFO (otherwise
> tail will end because the file is empty).
> 
> so first do :
> 
> mknod some.file.to.be.read p
> 
> and this should work.

You don't need to do this, as my example says use tail -f. 

-- 
sphere{z*5,1pigment{rgb.5}finish{reflection.3specular.5}}box{<-50,-3,-50>
<50,-2,50>pigment{checker/*\__\\__/  * \_\\__*/scale 2}finish{ambient.7}}
light_source/*__\\__\\__\\__\\__\(    ~ )\__\\__\\__\\__\\*/{<2,5,1>*4,1} 
/*\\__\\__\\__\\__\\__\\__\\__\\__\~  -/__\\__\\__\\__\\__\\*//* Steve */


Post a reply to this message

From: Yann Remond
Subject: Re: To the Unix gurus !
Date: 25 Jul 2002 03:39:54
Message: <3D3FAB4A.80134500@imag.fr>
Steve wrote:
> 
(...)
> You don't need to do this, as my example says use tail -f.

Ok, I just miss it !

But the file must exist. So either you launch PoV before xterm or you
use something like "touch some.file.to.be.read".

This works : this time I try before posting stupids tricks :-)

Yann
-- 
Yann Remond (mailto:Yan### [at] imagfr)


Post a reply to this message

From: Steve
Subject: Re: To the Unix gurus !
Date: 25 Jul 2002 13:24:54
Message: <slrnak0csq.onv.steve@zeropps.org.uk>
On Thu, 25 Jul 2002 09:39:54 +0200, Yann Remond wrote:
> Steve wrote:
>> 
> (...)
>> You don't need to do this, as my example says use tail -f.
> 
> Ok, I just miss it !
> 
> But the file must exist. So either you launch PoV before xterm or you
> use something like "touch some.file.to.be.read".
> 
> This works : this time I try before posting stupids tricks :-)
> 
> Yann

Yes touching the file every time Pyvon is started is a good idea, it'd
be nice to purge the file after it reaches a certain size too - and keep
previous output and let the file grow to a size specified by the user in
the config file, maybe default to something like 1 Meg.  And if the file 
is over 1 Meg when render is pressed then use > rather than >> and maybe 
even copy the old some.file.to.be.read to a backup file. 

-- 
#local i=.1;#local I=(i/i)/i;#local l=(i+i)/i;#local ll=(I/i)/l;box{<-ll,
-((I/I)+l),-ll><ll,-l,ll>pigment{checker scale l}finish{ambient((I/l)/I)+
(l/I)}}sphere{<i-i,l-l,(I/l)>l/l pigment{rgb((I/l)/I)}finish{reflection((
I/l)/I)-(l/I)specular(I/l)/I}}light_source{<I-l,I+I,(I-l)/l>l/l} // Steve


Post a reply to this message

From: Fabien
Subject: Re: To the Unix gurus !
Date: 27 Jul 2002 07:33:37
Message: <3D42844B.2020309@caramail.com>
I'll try that one, because Python for once does not seem to fit the bill.

Fabien HENON


Nicolas Calimet wrote:
>> with Pyvon taking up 2/3 of the upper
> 
> 
>> screen and the terminal the 1/3 left.
> 
> 
>> The best would be a script that test the screen resolution and does 
>> the rest automatically.
> 
> 
>     Just a little quick hack in c-shell demonstrating this with
> two konsole windows. Cons: this is csh, any other shell would be
> for sure much better; it does not take into account the size of
> windows decorations and other toolbars; some applications (xterm)
> do not resize properly. Pros: none  ;o)
> 
> 
> #!/bin/csh
> 
> set width  = `xwininfo -root | grep Width | cut -d: -f2`
> set height = `xwininfo -root | grep Height | cut -d: -f2`
> 
> set twothird = `echo "scale = 0; $height * 2./3" | bc -l`
> set onethird = `echo "scale = 0; $height - $twothird" | bc -l`
> 
> konsole -geometry ${width}x${twothird}+0+0 &
> 
> konsole -geometry ${width}x${onethird}+0-0 &
>


Post a reply to this message

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