Roger's Tip of the Day

Image of Light BulbTip of the Day Image of Light Bulb

(-: or whenever I update it :-)

Here are some other handy tips (at least I think so:-)

  1. Tired of typing in the entire command line? There must be a better way...
  2. Are those cryptic SVR4 Unix error messages driving you crazy?
  3. Ever wanted to compare two versions of a text file for differences?
  4. Got a sore neck from trying to read that serial number on your desktop machine?
  5. Want to jazz up the old jot editor?
  6. How about having the trash collector empty your dumpster every week?
  7. Would you like to add your face (or any other image) to your e-mail headers?
  8. Here's a method of converting online man-pages to plain text for viewing and printing.
  9. Is your audio output weak, how about giving it a bit more kick!
  10. How can I get the current directory to appear on the title bar of my shell window?
  11. So now that you've switched from A*L, are you disappointed with your lame mailbox?
  12. Did you ever get an "arg list too long" error message?
  13. Speaking of files, is there any way to jazz up my directory listings?
  14. Xd is a handy tool for mucking about with binary files.
  15. Xftp is a graphical FTP client.
  16. ScreenShot is a very handy tool for capturing screen images.
  17. Ever want to type things like °, ±, ¼, and ©? Use character composition.
  18. Looking for a simple contact management program, try Xcontact.
  19. How about a handy graphical calendar program with alarms, Vcal fits the bill.
  20. Got movie files that the SGI Dmedia tools can't display? Xanim might be the answer.
  21. Here is how to create your own customized desktop backgrounds.
  22. Want a fool-proof way to get the CD out of your internal O2 CD drive? Try this.
  23. You may find some insight in this Technical Support call log... ;-)
  24. Here's a 100 Handy Hints and Useful Tips; not really komputer related, but tips none the less.
  25. Ever wonder how the Internet got started? Wonder no more.
  26. Do you think you may be drinking too much coffee?
  27. Here are some useful tips for using floppy disks.
  28. Here are some Email Facts of Life.
  29. NEed a solution to your Y2K problems? Look no farther.
Tips are added sequentially, so the newest ones are near the end of the list (above) and also near the end of this HTML document. I'll try to leave telltale "New" bits to indicate recent additions to the list.

1. Filename Completion

When enabled by setting the variable filec, an interactive C shell can complete a partially typed filename or user name. When an unambiguous partial filename is followed by an ESC character on the terminal input line, the shell fills in the remaining characters of a matching filename from the working directory.

If a partial filename is followed by the EOF character (usually typed as CTRL-d), the shell lists all filenames that match. It then prompts once again, supplying the incomplete command line typed in so far.

When the last (partial) word begins with a tilde (~), the shell attempts completion with a user name, rather than a file in the working directory.

The terminal bell signals errors or multiple matches; this can be inhibited by setting the variable nobeep. You can exclude files with certain suffixes by listing those suffixes in the variable fignore. If, however, the only possible completion includes a suffix in the list, it is not ignored. fignore does not affect the listing of filenames by the EOF character.

So how do you use this:

In your ~/.cshrc file, add the following (this assumes you are on a Unix machine and run the C shell - link is meant to be a local link):

# Allow ESC key to complete file name
set filec

You can customize the file name completion function via the fignore variable as follows:

# Ignore () file extensions during filename completion
set fignore = (.o .out .bak)

For example, this setting tells filec to ignore files ending in extensions .o, .out and .bak.

One caveat to remember about file name completion that gets me everytime I go back to a PeeCee, is that on DOS/Windows, hitting the ESC key clears the pending command line, instead of completing it, DOH!


2. SVR4 Error message display:

In your ~.cshrc file, add the following (this assumes you are on a Unix machine and run the C shell - link is meant to be a local link):

# SVR4 Error messaging
setenv MSGVERB text:action:tag:

3. Gdiff - graphical differential file comparator:

Gdiff provides a graphical browser for inspecting two files and the differences between them. It also provides facilities for merging the files into a third version. If file1 (file2) is a directory, then a file in that directory with the name file2 (file1) is used. If file1 (file2) is -, then that file is read from standard input.

The display of the two files consists of four parts: two panes of text containing the files being inspected, a scroll bar separating them, and a "text bar" which provide an overview of both files.

Lines of text which are not present in both files are annotated in color to indicate their status. If a line is present in file1 but not in file2, the line is drawn in red. This corresponds to a line which is marked as a "d" line by diff(1). If a line is present only in file2, the line is drawn in green. This would be an "a" line. Lines in one file which replace lines in the other file are drawn in yellow, indicating a "c" line.

Note: gdiff is part of eoe1.sw.unix (Irix 5.x) or eoe.sw.unix (Irix 6.x).

Here's a picture of gdiff in action.


4. Serial Number:

On most newer desktop workstations, you can read the serial number of the machine with the following shell script:

# serial: Reads serial number on desktop machines:
/usr/etc/netstat -ia | grep 08:00 | sed 's/ *//;s/://g' | head -1 | tr '[a-f]' '[A-F]'
Save the three lines above to a file named:
and give it execute permission with:
chmod +x serial

5. Jazzed up jot:

You can customize the venerable old jot program through the use of the jot resource file.

  • I use and recommend the fixed pitch Haeberli fonts (haebfix15.pcf.Z).
  • To speed up jot for local session editing of large files, use:
alias jot jot -M
  • You can select jot as your default editor as follows:
setenv EDITOR "jot -f"
  • I particularly like jot's acceleration feature:
    • When selecting text and scrolling offscreen, the speed of scrolling increases the longer you keep scrolling; its a good thing.

6. Trash Collector:

Just like at home, you too can have the trash collector automatically empty your dumpster every week. As you recall, the dumpster directory is the place where files get removed to when you use Remove from the desktop. This allows you to go back to the dumpster and retrieve erased files if needed. However, unless cleaned out periodically (and who does that!) it'll fill up your hard disk with erased files. By creating a cron job, for each active user on a system, you can automatically clean out the dumpster on a weekly basis with the following crontab entry:

# File: /usr/spool/cron/crontabs/$USER
# Do things automatically for: $USER
# Empty ~/dumpster every Sunday morning
# min   hour    daymo  month   daywk job
#00    2    *     *     0     /usr/lib/desktop/telldesktop 'empty dumpster'
#00    2    *     *     0     (cd $HOME/dumpster; /sbin/rm -rf *)
If you usually stay logged in (i.e. the desktop is running) you can use the first command option using the desktop messaging feature. However, if your system has many users who may or may not be logged in, then the second variation, although more brute force, is better. I use the latter. To select one or the other option, remove the leading '#' from the desired line.

7. How to add your face to your e-mail header:

It is really quite easy, you'll need the PBM Plus image tools as well as the following directions.

In summary:

  • Take a picture with capture.
  • Save it in GIF image format (face.gif) with imgworks or togif.
  • Process it with the following commands:
giftoppm face.gif | ppmtopgm |pgmnorm |pnmscale -xy 48 48 |pgmtopbm > face.pbm
pbmmake -white 48 48 |pnmpaste face.pbm 0 0 |pbmtoicon |tail +3 |compface > face.xface
  • Format the resultant Xface data (face.xface) into the Z-Mail resource file ~/.zmailrc
    • (this assumes you are on a Unix machine and run the Zmail program)

Here's my X-face ---->


8. Convert man-pages to plain text:

Trying to view or print online manual pages (man) outside of a man-page viewer (like xman) can be difficult. Here's a simple method to get plain text from a manual page.

Pipe the output of man through the col filter to remove the man-page formatting characters to produce plain text output. For example, processing the man-page for the hinv command produces:

> man hinv | col -bx

HINV(1M)                                                              HINV(1M)

     hinv - hardware inventory command

     hinv [ -v ] [ -s ] [ -c class] [ -t type]

     hinv displays the contents of the system hardware inventory table.  This
     table is created each time the system is booted and contains entries
     describing various pieces of hardware in the system.  The items in the
     table include main memory size, cache sizes, floating point unit, and
     disk drives.  Without arguments, the hinv command will display a one line
     description of each entry in the table.  The -v option will give a more
     verbose description of some items in the table.  The -c class option will
     display items from class. Classes are processor, disk, memory, serial,
     parallel, tape, graphics, and network. The -t type option will display
     items from type. Types are cpu, fpu, dcache, icache, memory, and qic. The
     -s option, when used with either the -c or -t options, suppresses output.

     The hinv command, when used with the -c or -t options, will exit with a
     value of 1, if no item of the specified class or type is present in the
     hardware inventory table. Otherwise, hinv exits with a value of 0.

     For many devices, the device will not be displayed in the inventory if
     the corresponding driver is not configured into IRIX.

     lboot(1m), getinvent(3)

This output may then be piped to the printer
man X | col -bx | lp
or redirected to a file
man X | col -bx > file


9. Give your audio a bit more kick:

Give this a try:

> audiopanel -spinaltap

"Party on Wayne!"

You O² (and Irix 6.3) users need not fear, use instead:

In ~/.Xdefaults (this assumes you are on a Unix machine and run the X11 WIndowing System)
apanel*spinalTap: true

And in Irix 6.5, the good old "-spinaltap" option is back. This is what's effectionately known as an "Easter Egg".


10. Adding current directory to title bar:

Use this to set your prompt, the window title and icon title with the following (assuming you use xwsh and not xterm):

set prompt = "%{\e]2\;%m: %~ ^g\e]1\;%m: %c^g%}%B%n@%m:%c%b "

an alternate:

set prompt="%{\e]2\;%n@%m: %~ ^g\e]1\;%n@%m^g\r%}%U%B[%m]%b%u %S%~%s "


11. Stupid mailbox tricks (and more)!

Here are a number of really cool things you can do with your 'lectronic mailbox.

  • Didn't know you had one, this is what it looks like: Mailbox snapshot
  • Notice how the sky is kind'o dark, well you can set your LATTITUDE and LONGITUDE (along with your system's time zone, time and date) to tell the mailbox program whether it is day or night (or twilight). I use:
    • setenv LATITUDE 37.40
    • setenv LONGITUDE 122.03
      • Here is a really cool way to determine your's if you don't know.
      • Oh, it is *not* a good thing if you consider this scenery, get outside and smell the roses once in a while, sheesh!
  • By default, mailbox runs a really *lame* mail reader (Mail), to change this, I use:
    • setenv MAILBOXPROG "/usr/bin/X11/zmail -gui"
  • So, you've given up on A*L and REALLY miss that cool "You've got mail!" thing? Try this:
    • mailbox -B sfplay ~newmail.wav &
    • There are some other great e-mail sounds available here.
  • I like to run mailbox and leave it open (rather than iconified) then save it in my Home Session, under:
    • Desktop->Customize->WindowSettings->SaveWindows&Desks->SetHomeSession
    • Oh, I prefer the SaveExplicitly (rather than Continuously) option.
  • Updated Here's a tip for Netscape Mail users:
    • By default, most Unix mail programs (mail, Mail, ZMail) use the file /var/mail/$USER for storing the mail messages and by default, so does mailbox. NS-Mail uses the file $HOME/nsmail/Inbox. The mailbox program supports a mail-file option to change the file it looks at. Here's an example of setting mailbox for NS_Mail:
      • mailbox -f ~/nsmail/Inbox -B sfplay ~/newmail.wav &

12. Increasing argument/environment space:

In a similar fashion to the DOS "out of environment space" error message, this error indicates your argument list exceeds the space allocated to store it. In DOS, the default size is a measly 128 bytes, Irix provides 20,480 (20K) bytes by default. However, it does not take much to use up that space, remember when you wondered what you were going to do with the 64K in your CP/M machine (did I date myself or what?). For example, the Sun-Solaris O/S provides approx. 64K as the default environment size. Anyway, this is an easy setting to change via the following commands:

> su
# systune -i
systune-> ncargs 65536
 ncargs = 20480 (0x5000)
 Do you really want to change ncargs to 65536 (0x10000)? (y/n) y
systune-> quit
# autoconfig
Automatically reconfiguring the operating system.
Reboot to start using the reconfigured kernel.

Simply reboot and you now have a 64K environment.

Caveat: Beware that this environment size is given to *all* processes on the system, whether it is needed or not. Since a typical Unix system can easily have dozens to hundreds of processes running at any one time, you can needlessly consume system memory by setting ncargs too high.


13. Color Annotated Directory Lists:

If you are more comfortable with the command line than the Indigo Magic Desktop, there is a really cool tool available for IRIX that adds a lot of pizzazz to boring old directory listings called colorls.

  • Colorls can annotate your directory listing in vivid color:
    • Directories in cyan
    • Executables in yellow
    • Links in green
    • Sockets and system files in red
    • All other regular files in white
  • Take a look at this screen snapshot of colorls in action.
  • Colorls works just like ls(1), here's some detailed information.
  • Download colorls and copy it to your /usr/local/bin directory to use it.


14. Hex Dump (and Load) untility:

  • Xd is a handy tool for looking at and manipulating all manner of files, especially binary ones:


15. Graphical FTP utility:

Sorry, this application is no longer available, if you have a pointer to the source, I can try to re-build it.

Tired of the command line FTP client and find that the FTP client in Netscape does not provide enough functionality? If so, have a look at LLNL XFTP, an OSF/Motif-based FTP client, enables you to graphically transfer files and perform various directory manipulation commands, both locally and remotely. Two especially notable features are the ability to:

  1. Perform "third-party" (i.e., remote-to-remote) file transfers.
  2. Transfer or delete entire directory substructures.

LLNL XFTP has many features, is configurable, and has an intuitive user interface. You can download an inst-image (*) here.

  • If you do not have the SOCKS library installed, you can obtain a copy here.
  • To install the library, use:
    • > su
    • # gunzip
    • # mv /usr/lib
* You'll need the Web Installation tools (tardist) to install this software.

ScreenShot utility:

ScreenShot version 1.0 - an image capturing utility.

(inspired by the old IRIX 'snapshot' tool)

ScreenShot allows you to capture regions of screen into an image file. When you invoke the program, a tiny window with a camera image will appear.

  • Use left mouse to access its pull down menus.
  • To capture a region from the screen, select 'Sweep Region' from the pull down menu. Now you are in sweep mode and cursor changes to camera. Using left mouse, sweep an area on the screen.
  • After you are done sweeping/manipulating the region, select 'Capture Region' from the pull down menu. Viola, a snap.rgb file is created by default.
  • For more details, settings, refer to online help.

Note: The new Irix 'capture' tool also has screen capture capabilites. You might want to check it out first.


Send email to me. ===>> picture of the Author

Visitor # 30253 since 14.SEP.2003

[Last updated: 10.March.2022 ]