Recently in IRIX Tips Category

Easy Desktop Backgrounds

deBug has posted a very slick typerule/script package that greatly simplifies the process of adding desktop backgrounds, making it a simple point and click affair. This forum thread contains the download link as well as a great visual walkthrough of the popup menu. IRIX 6.5.22 or greater is required.

Nekochan SGI Wiki Now Live

Due to popular request we've added a new SGI related wiki to Nekochan to collate some of the knowledge, tips and how-tos collected on the forum over the past few years. Feel free to add to it or just take a look around.

Forum discussion and the wiki itself.

Modified Indigo Magic Schemes

I started a new subdirectory in the downloads section for user modified Indigo Magic schemes based on a suggestion from Stewart Pomeroy:

[...] I have a suggestion - how about some kind of depot of user modified Indigo Magic schemes? I use Gotham pretty frequently and have modified it and Indigo Magic to some more subtle and near-monochromatic hues and wonder if anyone else does this. [...] I've attached a couple I use a lot. I call one Empire and the other EmpireLight. Just make 2 dirs in the .desktop-hostname/schemes/ directory called Empire and EmpireLight and pull the respective prefixes off the BaseColorPalette files and place them in each one.

If anyone else has schemes they'd like to share let me know and I'll add them to the page.

Tom Kranz over at SiliconBunny just started a new section on his site for SGI Hacks, the first being an innovative Octane lightbar mod called the "Octane KnightRider Light Bar". Check it out; looks to be a lot of fun!

Recently I had cause to investigate the IRIX screen saver mechanisms in order to fix the desktop utility iconbar that I've been writing. I thought I'd share a bit of what I've learned (or at least think I've pieced together, corrections are welcome!) For the impatient among who you who might like to skip the long winded intro I'll cover:

- configuring xscreensaver under IRIX
- making the really slick screensavers GLX port work with xscreensaver (which includes screen locking)
- compiling the fireflies 2.06 screensaver

Here are two open source games in the style of the arcade classic Galaga. The first is Powermanga from and the other is Xgalaga from Powermanga has a few dependencies that can be obtained from and inst should complain if you don't have them. Xgalaga has none other than the X libraries.

Ironically, while I have no time to actually play these games (I've only verified the first 30-second of play), I do allow myself the luxury of porting them over to IRIX because it's fun, easy (now that Neko has shown me how) and I feel it's also educational. I'm not sure why games are easier ports than many other applications, maybe it's because they are simpler or that the programmers have portability in mind from the get go. In addition to the downloads, I'd like to share some of details of the builds with you (who in my deranged imagination are as interested in IRIX and building software as myself).

First of all, I usually try the following to do a port:

(a) unzip/tar the source into a working directory
(b) set the following environment variables

setenv CC cc setenv CFLAGS '-mips4 -O3 -I/usr/freeware/include' setenv LDFLAGS '-L/usr/local/lib -L/usr/freeware/lib32'

or if the GNU C/C++ compiler is preferred:

setenv CC gcc setenv CFLAGS '-mips3 -O2 -I/usr/freeware/include' setenv LDFLAGS '-L/usr/local/lib -L/usr/freeware/lib32'

Next, change to the directory where the configure executable lives and run it with

/configure --prefix=/Sr/local

or some variant. If that goes well, I use GNU make via


Lastly, I (as root) use:

gmake install

to place the software in the target subdirectories, but usually I try to running it locally first to make sure it built OK.

This approach works about 50% of the time. Usually, there is an error either in the configure step or else in the build. Let's look at the details for these two applications.

This one configured fine but got the following error during the linking (the last step of the build when all the compiled objects are merged into the executable).

d32: FATAL 9 : I/O error (-lXext): No such file or directory collect2: ld returned 32 exit status

Well I know that IRIX supports the X extensions library. It has things in it like the Xshape extension that allows non-rectangular windows and I know that xeyes (the demo program for that extension) runs fine. So that means it's just not finding it. So let's try some different link flags;

setenv LDFLAGS '-L/usr/lib32 -L/usr/local/lib -L/usr/freeware/lib32'

which points to the library location I found by searching for I do a 'gmake clean' and start over. (Sometimes it's necessary to delete the file
config.cache also, since it saves the values from the previous configure run, but not this time). And now it works! I do "gmake install" and then end up moving the executable from /usr/local/games to /usr/local/bin and the man page from /usr/local/man to /usr/local/man/man6 because that's how I have my paths set up. Done!

For xgalaga, I used the same "fixed" environment variables as Powermanga which includes /usr/lib32 on the linker flags. Configure goes smoothly, but I get a long string of errors similar to:

d32: ERROR 33 : Unresolved text symbol "XFreeCursor" -- 1st referenced by libsprite/libsprite.a(cursor.o). Use linker option -v to see when and which objects, archives and dsos are loaded.

This means that a function call has been made, but it can't find the library where the function lives. I happen to know this is a standard X11 function, but if you didn't, just "man functionname" to see if it SHOULD be on your system (alternately search in the /usr/include or /usr/freeware/include headers using grep). If found, it's just another path problem. In this case, I read in the INSTALL file included in the distribution that only recently has the GNU autoconfigure build feature been implemented, so it possible that the script is wrong. I don't know autoconfigure (should learn), so I go directly to the Makefile that got built when I ran configure.

Well, line 29 reads:

LIBS = -L -lX11 -lXmu -lXt -lXext -lXpm libsprite/libsprite.a

This is actually an error since linkers (which read from left to right and "-lA -lB" will work if libA depends on libB, but not the other way around). In this case, all the library dependencies are backwards (i.e. Xtoolkit and Xextensions need the X11 functions) so to change it to

LIBS = -L libsprite/libsprite.a -lXpm -lXext -lXt -lXmu -lX11

and then rebuild (don't re-configure, it will just erase the changes you just made to the makefile!). Now xgalaga compiles! I run it directory from the build directory and verify it works. It ends up the "install" script bombs and I have to change the configure prefix to --prefix=/usr/local/games/xgalaga re-configure, rebuild and manually move the support directories, but that doesn't happen too often.

That's it!

Anyway, I hope you didn't find this too elementary and boring. Here are the binaries in tardist format (another topic).


Let me know if there are any play-ability issues.

Everybody to the Limit! :)

O2 Overclock Article Translated

For the adventurous solder guys and gals who like to take on the O2 overclocking trick from 180 to 200MHz found at gemm's place: I've managed to translate the article into english. I have Gemm's permission to do so, but didn't have his feedback yet from the translation, so it's still open for translation improvements...

Oh, and be careful out there. This comes with no warranty, and a phat disclaimer...

Compiling gcc-3.2.2 for IRIX


I mentioned this in the forum, but figured it's worth repeating here for those who don't venture there.

I discovered a nasty bug with gcc-3.2.1 (g++/C++ specifically) which made it useless for even those running 6.5.18 and up. Yes, once again an issue with the new header structure; a 'configure' option was left off that generates unresolvable errors during C++ compiles.

gcc-3.2.2 was released earlier this month so I decided to take advantage of the situation and repair my gcc-3.2.1 SGI Freeware version. It was pretty easy to get going once I gleaned the proper 'configure' info from the gcc mailing list.

You can use your existing gcc version to bootstrap 3.2.2 (SGI's 3.2.1 will work for this purpose), or MIPSPro if you have it.

To build under IRIX 6.5.18 and up:

Untar and cd to gcc-3.2.2:

./configure --prefix=/usr/freeware --enable-version-specific-runtime-libs --enable-threads --enable-haifa --disable-c-mbchar --disable-shared

gmake bootstrap

then as root:

gmake install

[Mika:~] neko 105% gcc -v
Reading specs from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.2.2/specs
Configured with: ./configure --prefix=/usr/freeware --enable-version-specific-runtime-libs --enable-threads --enable-haifa --disable-c-mbchar --disable-shared
Thread model: single
gcc version 3.2.2

To build under IRIX 6.5.17 and below:

Use the same method, just leave off the --disable-c-mbchar switch on the configure line, though leaving it on probably won't hurt anything.

I could package this into a tardist, but of course it would only work with IRIX 6.5.18 and up due to the header differences.

If you're interested in setting up a Wacom tablet under IRIX, Andreas Backhaus has written up a great tutorial detailing the process of installing and configuring the necessary drivers. This can be especially useful in today's environment where compatible pre-Intuos tablets are going for so little in the used market.

Creating File Typing Rules (FTRs) has posted an excellent tutorial for creating file typing rules and custom icons; if you have any interest at all in this subject go there at once! Great stuff.

Startup Items


Just a quick tip today for those needing certain apps to run whenever the window manager is launched. Create a file called ~/.sgisession and add commands (this example launches an aterm shell and a clock):

/usr/local/bin/akaneclock /usr/local/bin/aterm -tr -sh 50 -bg black -fg cyan -sl 1500

That's it!

Quick note in regards to some comments I've gotten over the past few days: I apologize if some of these tips seem very basic and easy to locate in existing documentation; I'm attempting to make things a bit easier and accessible to those wishing to improve the IRIX experience and I feel these are all worthwhile tidbits to know. Rather than complain, contribute! :)

Custom Toolchest Menus


If you're tired of program icons littering your desktop, or find navigating pages in Icon Catalog less than speedy this might be of interest: create some custom menu items in the Toolchest for fast application launching.

Adding new menus is relatively easy, just create a new ~/.auxchestrc file such as the following example:

Menu Tools
no-label f.separator
"Aterm Shell" "/usr/local/bin/aterm -tr -sh 50 -bg black -fg cyan -sl 1500"
"EmiClock" "/usr/freeware/bin/emiclock"
"AkaneClock" "/usr/local/bin/akaneclock"
"Nedit" "/usr/freeware/bin/nedit"
"Mozilla" "/usr/freeware/bin/mozilla"
"GQmpeg" "/usr/local/bin/gqmpeg"
"Gmemusage" "/usr/sbin/gmemusage"
"XnView" "/usr/sbin/xnview"

Menu ToolChest

no-label f.separator
"Tools" Tools

Simply change Tools to whatever you'd like the menu to read (i.e. Graphics, Web, etc.) but ensure that you change all three instances above. The screenshot at the head of this article provides an example of what the custom menu will look like in use.

Log out/in to try out the new menu.

Using the Keyboard to Switch Desks


Using 4DWM it's possible to bind custom keys to quickly switch between different desktops; this allows you to assigning desks to different tasks, for example one desktop for web surfing, another for editing, etc.

In this tutorial we'll create a series of four desktops that can be switched between by pressing <ALT-1> through <ALT-4>. More desktops can of course be added as needed.

To start, open Desks Overview by selecting Desktop -> Extra Desks in the Toolchest. By default, Desks Overview will contain two desks, the current desktop labeled 'Desk 1' and the Global desk. Create two more desktops by selecting Menu -> Desk -> New Desk.

Now let's rename the desks to match the tasks we're going to assign. For this example, we'll use 'System', 'Editing' and 'Web', leaving 'Global' alone as it is a special purpose desk (anything placed on Global is mirrored on the other desks). Rename each desk by first selecting it with the mouse, then right click to bring up the contextual menu. Select Desk -> Rename Selected and then type in the new name above each.

Now it's time to configure 4Dwm to use our custom hot keys. First we need to create a ~/.4Dwmrc file by copying /usr/lib/X11/system.4Dwmrc to your home directory as ~/.4Dwmrc:

cp /usr/lib/X11/system.4Dwmrc ~/.4Dwmrc

Open ~/.4Dwmrc with a text editor and find the following section:

!! SGI 4Dwm Key Binding Description
Keys 4DwmKeyBindings
# Same as the standard OSF Key Bindings
Shift<Key>Escape window|icon f.post_wmenu
Alt<Key>space window|icon f.post_wmenu
Alt<Key>Tab root|icon|window f.next_key
Alt Shift<Key>Tab root|icon|window f.prev_key
Alt<Key>Escape root|icon|window f.circle_down
Alt Shift<Key>Escape root|icon|window f.circle_up
Alt Shift Ctrl<Key>exclam root|icon|window f.set_behavior
Alt<Key>F6 window f.next_key transient
Alt Shift<Key>F6 window f.prev_key transient
Shift<Key>F10 icon f.post_wmenu
! Alt Shift<Key>Delete root|icon|window f.restart

# SGI added key bindings
Shift<Key>Escape root 4DwmRootMenu
Alt<Key>space root 4DwmRootMenu

Add the following lines after the # SGI added key bindings section, but before the closing brace:

#change desktops
Alt<Key>1 root|icon|window f.switch_desk "System"
Alt<Key>2 root|icon|window f.switch_desk "Editing"
Alt<Key>3 root|icon|window f.switch_desk "Web"
Alt<Key>4 root|icon|window f.switch_desk "Global"
#Alt<Key>5 root|icon|window f.switch_desk "Desk 5"
#Alt<Key>6 root|icon|window f.switch_desk "Desk 6"
#Alt<Key>7 root|icon|window f.switch_desk "Desk 7"
#Alt<Key>8 root|icon|window f.switch_desk "Desk 8"

Notice that desks 5-8 are commented out; if you need more desktops in the future uncomment these and change the description in the quotes to match your desktop title.

After restarting the X-server (logging out then back in will work) you should now be able to cycle through your desktops using <ALT-1> through <ALT-4>. I find that setting a custom background for each desktop makes it easier to tell them apart.

Wheel Mouse Support Under IRIX


Here's a great tip if you're wanting a little more flexibility with your input devices under IRIX. As of IRIX 6.5.16, support for multi-button mice (including scroll wheel) has been added, though it's not active by default.

Here are the possible systune settings for pcmouse_mode:

0 - Default 3-button mode
1 - 3-button Wheel Mouse (type 3), Wheel generates buttons 4 & 5.
2 - 5-button Wheel Mouse (type 4), Wheel & buttons 4 & 5 generate button events 4 & 5.

Since I am using a Intellimouse Explorer, I chose '2'. The command to activate support in my case would then be (as root):

systune pcmouse_mode 2

After a reboot both the scroll wheel and middle button should be active. On a five button mouse such as the Intellimouse Explorer, the two additional buttons function as scroll up/down. You should also see an entry in /var/adm/SYSLOG like this:

Dec 15 20:19:07 5A:Mika unix: NOTICE: pcmouse: type=4

I've found the scroll wheel works wonderfully with Mozilla, SkipStone and many freeware applications available on If you use aterm as your default terminal it works with that as well.

Custom Video Modes


This might be old news to some, but it's too valuable to not pass along. Tony 'Nicoya' Mantler's SGI Video Mode Page provides instructions for generating two additional video modes on many SGI machines (Indigo2 IMPACT, Octane, Fuel, Onyx IR/VPro and O2): 1408x1024 and 1152x870. (Indy, Indigo and non-IMPACT Indigo2 graphics cannot take advantage of custom modes.)

Although Indigo2 IMPACT can display 1600x1200, I find it's not really usable on a CRT due to the 60Hz refresh limit. The standard 1280x1024 mode has an adequate refresh rate @ 76Hz but it's a bit narrow ... not to mention the need to crop standard 4:3 aspect wallpapers to fit. Nicoya's 1408x1024_72 and 1408x1024_76 modes are quite nice; providing more desktop workspace, a high refresh rate, square pixels and compatibility with all 1280x1024 capable monitors. The thumbnail at the start of this article links to a screenshot of the 1408x1024 mode with a 4:3 wall from Gamespot Japan as the background.

IRIX Cheat Sheet

Jon Harsem wrote in today with a link to a cool IRIX "cheat sheet" containing loads of commands and tips for working with IRIX, apparently written by SGI engineers. You can check it out here: Helpful Commands in IRIX. There's tons of great info in there; print it out and keep it near your machine!

I also noticed a similar document covering the vi editor which looks to be equally useful: Tricks and Fun With vi.

aterm IRIX-Look Modification


I've been meaning to post a special aterm modification I received from Frank Everdij for quite some time; the patch gives aterm users the option to replace the default NeXT-style scrollbar with a native IRIX version. Many thanks go to Frank for taking the time to write this patch and then share it with the rest of the community.

Interested? I thought so! To install this patch simply perform the following:

Ensure the prerequisites are in place for aterm as outlined in my Compiling aterm On IRIX article.

Download and unpack the aterm-0.4.2.tar.gz file from

Download the patch: aterm-0.4.2.sgilook.patch

Copy the patchfile into the newly extracted aterm-0.4.2 directory and enter it:

cp aterm-0.4.2.sgilook.patch aterm-0.4.2/
cd aterm-0.4.2
patch -p0 < aterm-0.4.2.sgilook.patch

If all goes well, it's time to compile the newly patched aterm.

For MIPSPro 7.x, optionally set the following environment variables for an optimized build (skip this if using GCC):

setenv CC cc
setenv CFLAGS '-n32 -O3'

Then the configure command (note the new --enable-sgi-scroll option as a result of the patch):

./configure --enable-utmp --enable-wtmp --enable-fading --enable-sgi-scroll --disable-delete-key --disable-backspace-key --enable-menubar --with-xpm-library=/usr/freeware/lib32 --enable-background-image --with-jpeg-library=/usr/freeware/lib32 --with-png-library=/usr/freeware/lib32 --with-terminfo=/usr/share/lib/terminfo --enable-xgetdefault --enable-graphics --with-term=xterm

make clean


make install

aterm should now be installed as /usr/local/bin and ready for use.

To display user and machine name (should be added to .login, .tcshrc or .cshrc):

if ($?TERM) then
if ($TERM == "iris-ansi" || $TERM == "iris-ansi-net") then
if ($?CONSOLE) then
setenv HOST `/usr/bsd/hostname`
alias setitle 'echo -n "\033P1.y"$USER, ${host}:$cwd"\033\\"'
alias cd 'set old=$cwd; chdir \!*;echo $cwd; setitle'
if ($TERM == "aterm" || $TERM == "xterm") then
stty intr ^C
alias setitle 'echo -n "\033P1.y"$USER, ${HOST}:$cwd"\033\\"'

Example .Xdefaults settings for aterm (modify to taste):

Aterm*transparent: True
Aterm*shading: 25
Aterm*tinting: yellow
Aterm*font: -*-screen-medium-r-normal--18-*-*-*-m-90-iso8859-1
Aterm*saveLines: 500
Aterm*termName: aterm
Aterm*background: black
Aterm*foreground: white
Aterm*cursorColor: green
Aterm*geometry: 80x24

Compiling aterm On IRIX

To start, download the current aterm source tarball from

In addition to the aterm source, you'll need to download and install a few things from

  • gcc (MipsPRO 7.x also works well)
  • libxpm
  • libjpg
  • libpng
  • gmake
  • After installing the above, ensure /usr/freeware/bin is in your search path. The easiest way to accomplish this is to use SGI's fixpath tool. From a terminal, enter the following command:


    I find it much easier to use SGI's precompiled binaries whenever possible; it's a simple matter to use them as building blocks for software not available direct from SGI.

    Extract the aterm tarball, enter the build directory and start the configure script (set to build against the freeware libraries):

    ./configure --enable-utmp --enable-wtmp --enable-fading --disable-delete-key --disable-backspace-key --with-xpm-library=/usr/freeware/lib32 --enable-background-image --with-jpeg-library=/usr/freeware/lib32 --with-png-library=/usr/freeware/lib32 --with-term=xterm --with-terminfo=/usr/share/lib/terminfo --enable-xgetdefault --enable-graphics --enable-menubar

    Then a typical (as root if /usr/local is not user writable):

    gmake gmake install

    It's best to add /usr/local/bin to your search path as well if you haven't done so already. Finally an example of a typical command line I use to start aterm:

    /usr/local/bin/aterm -tr -sh 50 -bg black -fg cyan -sl 1500

    I've built aterm 0.4.2 under IRIX 6.5 with the above settings using both gcc3 and MipsPRO 7.x with no issues.

    Custom Backgrounds On IRIX


    First you must enable 24-bit support on your X server (Run xdpyinfo first to make sure your server supports this visual). This is important even when dealing with 256 color backgrounds as the default IRIX palette is not dynamic. Edit /var/X11/xdm/Xservers to reflect the following (make certain to back up your existing file first in case you need to revert):

    :0 secure /usr/bin/X11/X -bs -nobitscale -c -pseudomap 4sight -solidroot sgilightblue -cursorFG red -cursorBG white -class TrueColor -depth 24

    The key section is the -class TrueColor -depth 24 entry; simply adding this bit to your existing Xservers configuration is sufficient. You'll need to restart your X server to complete the change.

    Next obtain some backgrounds; depending on your display configuration most likely 1280x1024 or 1024x768 8-bit X11 PixMap (XPM) format. You can convert JPEG images to XPM using ImageView, xv, NetPBM or similar, and resizing/cropping to the correct size and aspect can be accomplished with an image editor (such as GIMP or Photoshop).

    Once you have a suitable XPM file you'll need to configure 4Dwm to use it as a background. First, create and edit a .backgrounds file by copying the system.backgrounds file from /usr/lib/X11 to your home directory as .backgrounds:

    cp /usr/lib/X11/system.backgrounds ~/.backgrounds

    Using a text editor, add additional entries for your new backgrounds file like this:

    background "Anime"
    command "-xpm /usr/people/neko/backgrounds/anime.xpm"
    default "-xpm /usr/people/neko/backgrounds/anime.xpm"
    readok "/usr/people/neko/backgrounds/anime.xpm"

    Change the three path entries /usr/people/neko/backgrounds/anime.xpm to reflect the full name and path of the background file you are using. Also be sure to change the background name from "Anime" to whatever you'd like to show up in your Background control panel. You can add several entries like the above to easily switch between multiple backgrounds; I have at least twenty myself.

    Once all this has been accomplished you can select your new background(s) from Toolchest -> Desktop -> Customize -> Background. In addition to the increased performance, you'll even get a snippet of the new background in your Desks Overview which is another benefit of using XPM files.


    If you'd rather use 24-bit images for your background, you can do so using either xli or Esetroot. xli is part of the xli.1.16 X11 image loader/viewer package on SGI Freeware:

    Esetroot is part of the Eterm-0.8.10 Enlightenment-aware xterm package on SGI Freeware:

    Example xli entry:

    background "Anime2"
    � � command "-execute /usr/freeware/bin/xli -onroot -fork /usr/people/neko/backgrounds/anime2.jpg"
    � � default "-execute /usr/freeware/bin/xli -onroot -fork /usr/people/neko/backgrounds/anime2.jpg"
    � � exeok "/usr/freeware/bin/xli"
    � � readok "/usr/people/neko/backgrounds/anime2.jpg

    Example Esetroot entry:

    background "Anime3"
    � �command "-execute /usr/freeware/bin/Esetroot /usr/people/neko/backgrounds/anime3.jpg"
    � �default "-execute /usr/freeware/bin/Esetroot /usr/people/neko/backgrounds/anime3.jpg"
    � �execok "/usr/freeware/bin/Esetroot"
    � �readok "/usr/people/neko/backgrounds/anime3.jpg"

    xli is the easiest of the two to install as it has no additional dependencies. It's rather dated in that it does not support progressive JPEG or PNG so some backgrounds will need to be converted to standard JFIF JPEG before xli can deal with them. xli also does not support pseudo transparency effects with some applications, a good example being X-Chat.

    Esetroot supports progressive JPEG and pseudo transparency in X-Chat and seems a bit faster overall. The downside for those tight on disk space is that it requires 62 additional dependent packages to install.

    There are a couple of caveats to note when using 24-bit images. Desks Overview will not display background previews in the desk panes and you'll find that desktop switching slows down dramatically, though that's less of an issue on newer hardware. If you are not a multi-desktop user these issues may not be important to you, but I recommend trying both xpm and the alternate methods given above to see which works best in your environment.

    About this Archive

    This page is an archive of recent entries in the IRIX Tips category.

    IRIX Software is the previous category.

    Mac OS X is the next category.

    Find recent content on the main index or look in the archives to find all content.