home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sun.apps
- Path: sparky!uunet!spool.mu.edu!news.cs.indiana.edu!lynx!zia.aoc.nrao.edu!rmilner
- From: rmilner@zia.aoc.nrao.edu (Ruth Milner)
- Subject: printing from snapshot
- Message-ID: <1993Jan7.234432.4395@zia.aoc.nrao.edu>
- Organization: National Radio Astronomy Observatory, Socorro NM
- Date: Thu, 7 Jan 93 23:44:32 GMT
- Lines: 28
-
- How does the OW3.0 screen snapshot program get print jobs to a printer?
-
- For various reasons, we have replaced /usr/ucb/lpr with a script (no, the
- script is not setuid root or setgid daemon) which does a bunch of things and
- then runs the original lpr. One of the things it does is log information
- about jobs submitted to our color PostScript printer. The log file is writeable
- by anyone, and everything shows up here *except* jobs from snapshot.
-
- The script understands piped input as well as files, and we can see that being
- handled for jobs printed from other utilities which pipe into lpr, but somehow
- snapshot is bypassing it.
-
- I ran it with trace, and I can see that, when asked to print, it creates a
- temporary file called /tmp/snapshotaxxxxx.image, writes into it, calls vfork,
- waits for the child to terminate, and then unlinks the temporary file.
- "strings snapshot" shows the string /usr/ucb/lpr appearing in the executable,
- but it is never called, at least not when you use the print button on the main
- menu. This seems a very odd way to do things. Since it has created a temporary
- file, why not just use system() to print it?
-
- Does anyone have any idea 1) what snapshot is doing, and 2) how we can get it
- to use the regular printing system? There is no accountability at all if it
- doesn't go through the normal print queues.
-
- Thanks very much!
- --
- Ruth Milner NRAO/VLA Socorro NM
- Computing Division Head rmilner@zia.aoc.nrao.edu
-