Welcome to iraf.net Friday, May 17 2024 @ 02:13 AM GMT


 Forum Index > Help Desk > Systems New Topic Post Reply
 printing with :.snap
   
hartigan
 11/14/2007 10:35PM (Read 8873 times)  
+----
Newbie

Status: offline


Registered: 11/13/2007
Posts: 9
Hi Mike,I suppose I should know how to do this by now but for some reason I always
seem to get stuck. I looked in the FAQs and in various manuals to no avail.
Running 2.12.2 export on Redhat Enterprise Linux 4, I use
an external, networked Lexmark T522 printer as a default. So, for example
at the unix prompt 'echo "hi" | lpr' sends the text string 'hi' to the printer, which
lives at its own IP address on port 9100.Within IRAF, 'show printer' returns 'lpr' and in dev$graphcap I have
lpr|lp|lw :tc=g-lprwhich as I recall aliases lpr, lp, and lw to g-lpr within IRAF. Later in the graphcap
file there is a generic entry
g-lpr|UNIX generic interface to default printer device (lpr):\
Big GrinD=lpr,tmp$sgk,!{ sgidispatch sgi2uapl $F -l$(XO) -w$(XW) \
-b$(YO) -h$(YW) -p$(PW) | lpr ; rm $F ; }&:tc=sgi_apl:which, if I understand correctly, instructs IRAF to convert its gki code to sgi,
and then sgi to postscript to send to the default unix lpr device......ok..... So within IRAF, lprint works, i.e. 'imhead file.imh | lprint' does what
it is supposed to do. But splot followed by :.snap simply hangs the system.
For what it is worth, stdplot=lp and stdgraph=xgterm. I launch IRAF from an
xgterm.Suggestions?Pat Hartigan

 
Profile Email
 Quote
hartigan
 11/14/2007 10:35PM  
+----
Newbie

Status: offline


Registered: 11/13/2007
Posts: 9
I don't know why the smiley-face got in the post, which was a cut and paste.
But maybe that's a good omen?

 
Profile Email
 Quote
fitz
 11/14/2007 10:35PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Hi Pat,Good to hear from you again. First, be sure to follow ":.snap" with ":.gflush" to flush the graphics buffer right away.If that doesn't work, try using the 'psdump' device to save the postscript to a /tmp/irafdmpXXXXX.ps file, then try printing that file manually with 'lpr' outside of IRAF. If it doesn't work let me know, you
might also try changing the first line of the file from "%!PS" to "%!PS-Adobe-2.0" since some printers require that. This can be done automatically in the graphcap and has been changed in the next release.Cheers,
-Mike

 
Profile Email
 Quote
hartigan
 11/14/2007 10:35PM  
+----
Newbie

Status: offline


Registered: 11/13/2007
Posts: 9
Wow, fast turnaround time!
After :.sn I get 'done' in yellow at the lower left of the xgterm graphics window,
but then there is a circular blue arrow that keeps going round and round. I do
have cursor control, and when I hit 'q' and get back to the main IRAF cl> and
type gflush nothing happens.Typing :.sn psdump after I have displayed my spectrum
does indeed make an irafdmp6628.ps file, but it is empty.As a workaround yesterday I simply grabbed the window in xv, made it
greyscale and printed it, but that is a rather clumsy solution. I'll try the
Adobe-2.0 thing next.ph

 
Profile Email
 Quote
hartigan
 11/14/2007 10:35PM  
+----
Newbie

Status: offline


Registered: 11/13/2007
Posts: 9
well I guess I can't very well add anything to the postscript file when it is empty...

 
Profile Email
 Quote
fitz
 11/14/2007 10:35PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Hi Pat,Try doing a "cl> !which sgidispatch" to see if you can find the command. The dispose command in the graphcap is done using a spawned shell and so if your .cshrc file doesn't define a path to the sgidispatch command it might not produce the final file. This usually means that your path is defined in your .login file instead, just add the extra directory to the .cshrc (or .bashrc) as well. The 'sgidispatch' command is a symlink created by the install script and should point to the iraf$unix/bin.<arch>/sgidispatch.e binary. If something changed the links in your system, rerunning the install script will fix it, but in most cases it's a path problem.Cheers,
-Mike

 
Profile Email
 Quote
hartigan
 11/14/2007 10:35PM  
+----
Newbie

Status: offline


Registered: 11/13/2007
Posts: 9
You da man! After adding in the following links (command file made with vi)
:.snap now happily prints to my printer.Thanks!sudo ln -s /r1/iraf/iraf/unix/bin.redhat/alloc.e /usr/local/bin/alloc
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/f2c.e /usr/local/bin/f2c
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/generic.e /usr/local/bin/generic
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/mkpkg.e /usr/local/bin/mkpkg
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/rmbin.e /usr/local/bin/rmbin
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/rmfiles.e /usr/local/bin/rmfiles
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/rpp.e /usr/local/bin/rpp
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/rtar.e /usr/local/bin/rtar
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/sgi2gif.e /usr/local/bin/sgi2gif
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/sgi2uapl.e /usr/local/bin/sgi2uapl
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/sgi2ueps.e /usr/local/bin/sgi2ueps
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/sgi2uhpgl.e /usr/local/bin/sgi2uhpgl
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/sgi2uhplj.e /usr/local/bin/sgi2uhplj
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/sgi2uimp.e /usr/local/bin/sgi2uimp
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/sgi2uptx.e /usr/local/bin/sgi2uptx
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/sgi2uqms.e /usr/local/bin/sgi2uqms
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/sgi2xbm.e /usr/local/bin/sgi2xbm
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/sgidispatch.e /usr/local/bin/sgidispatch
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/wtar.e /usr/local/bin/wtar
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/xc.e /usr/local/bin/xc
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/xpp.e /usr/local/bin/xpp
sudo ln -s /r1/iraf/iraf/unix/bin.redhat/xyacc.e /usr/local/bin/xyacc

 
Profile Email
 Quote
Reba
 11/14/2007 10:35PM  
+----
Newbie

Status: offline


Registered: 03/10/2008
Posts: 5
Thanks fitz! This topic helped me out as well.

 
Profile Email
 Quote
   
Content generated in: 0.20 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login