FAQ / How To (Under construction)



Picture conversion

... convert (encapsulated) PostScript to JPEG

Let's assume a PostScript file pet01.eps. Apparently it should contain a "showpage" instruction. Then:
gs -sDEVICE=jpeg -r300x300 -sOutputFile=pet01.jpeg pet01.eps
GS> quit
will create a JPEG file pet01.jpeg. The -r flag controls the resolution. Alternatively:
gs -sDEVICE=jpeg -r300x300 -sOutputFile=pet01.jpeg pet01.eps -c showpage
GS> quit
Sometimes this helps:
gs -sDEVICE=jpeg -sPAPERSIZE=a4 -r300x300 -sOutputFile=pet01.jpeg pet01.eps -c showpage
GS> quit

... convert (encapsulated) PostScript to TIFF

Let's assume a PostScript file pet01.eps. Apparently it should contain a "showpage" instruction. Then:
gs -sDEVICE=tiffg3 -r300x300 -sOutputFile=pet01.tiff pet01.eps
GS> quit
will create a TIFF file pet01.tiff. The -r flag controls the resolution. Alternatively:
gs -sDEVICE=tiffg3 -r300x300 -sOutputFile=pet01.tiff pet01.eps -c showpage
GS> quit
Sometimes this helps:
gs -sDEVICE=tiffg3 -sPAPERSIZE=a4 -r300x300 -sOutputFile=pet01.tiff pet01.eps -c showpage
GS> quit

... convert (encapsulated) PostScript to PDF

Let's assume a PostScript file acs.ps. Apparently it should contain a showpage instruction. Then:
gs -sDEVICE=pdfwrite -sOutputFile=acs.pdf acs.ps -c showpage
GS> quit
will create a PDF file acs.pdf.

... convert (encapsulated) PostScript to XBM

This requires two steps, first conversion to TIFF (via Ghostscript), then to XBM (via xview). Let's assume a PostScript file survival.eps. Apparently it should contain a "showpage" instruction. Then, for example:
gs -sDEVICE=tiffg3 -g1024x768 -r100x100 -sOutputFile=survival.tiff survival.eps
GS> quit
will create a TIFF file survival.tiff. The -r flag controls the resolution.
Then run
xview survival.tiff
to load and save the picture as X11 bitmap.

TeX/LaTeX

... include pictures in LaTeX

There's a lengthy write-up

... make tables

A LaTeX example you find here and how it looks like there.

Dealing with M$ world

MS-DOS file exchange

can be accomplished via 3.5" diskettes and the UNIX-commands (so-called mtools)

... get rid of the nasty carriage returns (^M) from MS-DOS generated files

You might use the standard tr (translate) command:
tr <inputfile >outputfile -d '\r'
Caution !!! Input and output file must be different !!!

Data handling

CD/DVD/ISO handling

... make a ISO filesystem

   mkisofs [-U] -o <outputfile> <inputpath>
Example(s):
   mkisofs -U -o test.iso phd
   mkisofs -D -U -rock -iso-level 3 -o test.iso phd # ignore directory nesting limit, allow symlinks
generates an ISO image test.iso comprising all files in directory phd. The image test.iso is ready to be transferred to CD with cdrecord.
The -U option causes filenames to be left unchanged, which violates the ISO norm, but is better suited for UNIX filenames.
   mkisofs -D -U -rock -iso-level 3 -o test.iso -x phd/bib phd                 # exclude subdirectory bib
   mkisofs -D -U -rock -iso-level 3 -o test.iso -V "Patches_Sol8_Jul-2007" phd # create volume label too  .

Filesystem handling

... synchronize filesystems

E.g.:
   rsync        -v -r -l -S -p -o -g -t -u [-n] [--delete] /mnt/$user/           /userfs/userb01/
   rsync -e ssh -v -r -l -S -p -o -g -t -u [-n] [--delete] /mnt/$user/ user@node:/userfs/userb01/
copies all newer files from /mnt/$user to /userfs/userb01/$user, preserving permissions, ownerships and times.
The second line uses ssh services to copy to a remote node (and will prompt a password)
-n selects a (recommended) "dry run" without actually doing something.
--delete deletes all files in the target directory(ies) which do not exist in the source directory. Use it with care !

Tape handling

... access a remote tape

for a tape archive e.g.:
   tar -cvf - dir1 dir2 | rsh biori6z dd of=/dev/rmt0
archives directories dir1 and dir2 to tape /dev/rmt0 at machine biori6z

... remove selected files recursively

   find ./ !  -name "*,v" -exec \rm {} \;
removes all files not ending with ,v from the current directory and all directories below. Directories themselves are not deleted.

... find text string in many files

Examples:
   find ./ -name "*.tex" -exec \grep -l "include" {} \;
lists all TeX files which contain the string "include".
   find /usr/ -type f -exec \grep -l "nolisten tcp" {} \;
searches /usr/ for all regular files which contain the string "nolisten tcp".

User interface

... change the dtterm window title

  echo "\033]1;my_title\007"                  # changes the icon title 
  echo "\033]2;my_title\007"                  # changes the window title 
  echo "\033]0;my_title\007"                  # changes both

... configure the mouse for left-handers

In any shell window:
   xmodmap -e 'pointer = 3 2 1'
will swap the left and right mouse button
   xmodmap -e 'pointer = default'
reverts to the old state.

HTML/Web issues

... validate a webpage conforming to an HTML standard

Go to "http://validator.w3.org" and you can submit your page for verification.

... wget usage examples

           # mirror a site in background:
   nohup wget -m -e robots=off http://www.huge.site/ &
           # mirror a site, don't go up in tree, exclude a directories 
         wget -m -e robots=off --no-parent --exclude-directories=notthis http://www.huge.site/

... use wget against ftp-sites protected with user/passwd

Assume a remote <ftp-site> with a required account <account> with password <passwd>. Then
   wget -r -e robots=off --user=<account> --password=<passwd> ftp://<account>@<ftp-site>
will let you access the files as usual.

Trouble Shooting

amd-mounted filesystems are not available

e.g. after fileserver upgrades. Probably amd considers them still as being mounted.
Cure: login as root, then:
logout all users using the respective filesystems, then:
   cd /local/etc/amd   # assuming this is where amd is installed
   amd_umount
   amd_stop
   amd_start

Mail doesn't arrive

If mail is rejected like:
			From: MAILER-DAEMON@biori6m.gsi.de (Mail Delivery Subsystem)
			Subject: Returned mail: Cannot send message for 3 days
			To: 

  			--- The transcript of the session follows ---
			bellmail: lockf(/usr/spool/mail/kehr): The file access permissions do 
			not allow the specified action.
the permissions in the mail folder ( /var/spool/mail/* ) are not correct.
Cure: login as root, then:
   chmod g+w /var/spool/mail/* 

Netscape (ns) doesn't display PostScript files

Probable reason: your browser isn't configured properly.
Choose Options-Preferences-Helpers, there should be a line such as
   application/postscript /usr/local/bin/ghostview -safer %s
if not, choose "New" or "Edit" and insert this line.

CDE (dt) actions fail

even exiting might not possible
Inspect $HOME/.dt/startlog for more info.
Maybe caused by filesystem /var full.
Possible cure:
   rm /var/adm/wtmp

ssh/telnet login refused

Could have many reasons, of course. The sshd daemon might not be active or not even installed, telnet services might be disabled via inetd.conf etc.
A less obvious source of trouble are tcpwrappers configuration file(s), /etc/hosts.deny, /etc/hosts.allow, which by default reject any access.
Last Update: 14-Jul-2025, M.Kraemer
Legal Notice Data privacy protection