If you would like to see something added to this page, please contact yergeau@gloworm.
If your question isn't answered by this page, check out the extensive collection of FAQs (frequently asked/answered questions) in /afs/ir/users/c/o/consult/pub/faq/ or at http://www.faqs.org/.
More resources are available on Solaris via the AnswerBook. If you
are on an X server with Display PostScript (e.g. a Sun running CDE
or OpenWindows), run answerbook
.
Quick jump to
dvips
psnup
command can reformat most PostScript documents to print several
pages on a single page.
gifmerge
will combine a sequence of GIF
images into an animated GIF for Netscape (2.0 or above) and
Internet Explorer.
/projects/cad/etc/DOT.cshrc
and the
/cad/local/tgroup.cshrc
set one or more of the
variables. If you source either/both of these files, you will
eventually get screwed (and, if you moan to the gloworm cluster
sysadmin about anything that breaks as a result, don't expect much
sympathy).
If you have an application that needs any of these environment variables set, write a wrapper script to launch the application. If you don't know what a wrapper script is, ask action@gloworm.
-fast
is a reasonable optimization option for
the SparcWorks compilers; -O
for other compilers or
other machines.
purify
.
ieee_flags(3M)
to trap on common exceptions. For
example:
char *dummy_out; ieee_flags("set", "exception", "common", &dummy_out);will trap on common exceptions. See the manpage on ieee_flags for full details.
This is a nonportable routine (it will not be available on non-Sun machines) but it is useful for debugging.
Imakefile
and use xmkmf. If you want to use the old-fashioned approach of
hardcoding paths in your Makefile, ...
All systems have X11R6.x available as /usr/pubsw/X11R6. Use
-I/usr/pubsw/X11R6/include
for the includes and
-L/usr/pubsw/X11R6/lib
for the libraries. On Solaris,
you also have to give the run-time path to the shared libraries
(-R/usr/pubsw/X11R6/lib
). Please note that this is
X11R6, so you may need the -lSM
(session manager)
and -lICE
(interclient exchange) libraries. Motif
(2.0) also needs the -lXpm
library.
Solaris also ships with a X11R5-based OpenWindows. Use
-I/usr/openwin/include
for includes and
-L/usr/openwin/lib -R/usr/openwin/lib
for
libraries. Motif program can find the include and libraries
under /usr/dt/{include,lib}
.
HP-UX ships with a very broken X installation in /usr/{bin,lib,include}/X11. It is a waste of time to try to use it.
System V Unix (e.g. Solaris and HP-UX) traditionally have not bundled BSD networking (e.g. sockets) in the stock libc. You will need addtional libraries for BSD sockets and other network services. These should be in "-lsocket -lnsl".
dvips
dvips -P{porter|lager}
. Note that a PostScript
file generated by this will not be portable to
other PostScript printers, but it will turn on 400dpi resolution
instead of resampling (using a quick algorithm) 300dpi or 600dpi
fonts that are generated by default.
fixfm5
(or fixfm4
for Frame 4) will
massage Unix FrameMaker-generated PostScript to
make it usable by LaTeX (e.g. via epsf). ps2epsi
should be used to to readjust the bounding box.
Note that the massaged PostScript is not valid Encapsulated
PostScript, but it works with
LaTeX/epsf/dvips
. It cannot be reincoporated into
other FrameMaker documents.
See Adobe's responses to
"Can PostScript from FrameMaker be imported?" and
"Can FrameMaker export EPS?" if you don't believe me.
Most applications that import EPS only look at the %%BoundingBox and preview image. Properly displaying the preview image is not an indication that the document will print on a PostScript printer.
Files that have been filtered through ps2epsi will NOT
print if sent directly to a printer. ps2epsi adds PostScript
code to the file which redefines the showpage
operator as a no-operation.
banddevice exitserver initmatrix setshared clear framedevice quit startjob cleardictstack grestoreall renderbands copypage initclip setglobal erasepage initgraphics setpagedeviceThe following PostScript operators are questionable. They may cause problems if not used safely.
nulldevice sethalftone setscreen undefinefont setgstate setmatrix settransferThere is a script (
checkeps
) that will check for these
operators in a file.
epsf
and
fig
.
The epsf
driver can be turned on via
setenv DEFPDEV epsf setenv DEFPFIL plot.psThen, run SUPREM or PISCES and create single page plots as usual.
The fig
driver can be turned on via
setenv DEFPDEV figThen, run SUPREM or PISCES and create single page plots as usual. The plots can be edited and annotated using
xfig
and converted to a number of different
formats (including postscript).
ps2pdf
command. This is based on
ghostscript. Make sure that /usr/newsw/bin precedes
/usr/pubsw/bin in your PATH. Some serious content problems
have been reported. Acrobat may also have problems printing
these files.
dvips -Ppdf file.dvi -o
Both Acrobat Reader (acroread) and gv can be used to view PDF. Acrobat reader tends to leave droppings in /var/tmp, so you may want to periodically clean up if you are a heavy Acrobat user.
When you print a PDF document, please print to PostScript first and check the size of the file. I've seen 500K PDF files grow to 50MB PostScript which clogs the printer queues. If the PostScript file is too large, only print a few pages at a time.
lmstat
command. For example,
lmstat -A -c /usr/local/flexlm/licenses/license.dat.gloworm.Stanford.EDU
top
-- monitor top cpu usage
find
-- search for files in a directory hierarchy
find directory <list of
predicates>
. If a predicate succeeds, find tries the
next predicate. A useful form is
find . -name ,\* -print -exec /bin/rm {} \;Note the use of the backslash to prevent the shell from expanding wildcard characters. For a full list of predicates, see the manpage.
ps
-- process status
ps -ef | grep something
truss
-- trace the system calls in a command
truss -f -o /tmp/myprogram.truss myprogram arg1 arg2 ...Then, have a look at /tmp/myprogram.truss. If you are using it to diagnose a crash, jump to the end and look backward for failed system calls (e.g. failure to open a file).