May 7, 2007

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.

Posted by nekonoko at 1:13 PM

December 28, 2006

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.

Posted by nekonoko at 1:09 PM

January 22, 2004

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.

Posted by nekonoko at 3:04 PM

January 15, 2004

SiliconBunny's Octane KnightRider Light Bar Mod

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!

Posted by nekonoko at 10:33 AM | Comments (4)

December 1, 2003

IRIX SCREENSAVERS (xscreensaver, really slick screensavers and more)

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

First off, the screen saver is implimented as an extension to X. That means it's actually the X server that starts the screen saver application whenever a certain duration of inactivity is detected. On most systems this is an extension to X call MIT-SCREEN-SAVER, under IRIX it appears to be a customized (i.e. partial ) implementation called (SGI) SCREEN-SAVER. The list of C API interfaces to setting the screensaver is provided by the commands XSetScreenSaver, XForceScreenSaver, XActivateScreenSaver, XResetScreenSaver and XGetScreenSaver. A shell command line applications that can run those commands for you is called xset.

Note: the power saving settings (on by default in IRIX 6.5) that actually turn the monitor off are not part of the screen saver extension and are set in /usr/lib/X11/xdm/Xlogin.

There are also some undocumented functions in /usr/include/X11/extensions/XScreensaver.h which include XScreenSaverQueryExtension, XScreenSaverQueryVersion, XScreenSaverEnable, and XScreenSaverDisable. I'm not sure if they are really usable or not. The only difference here versus the standard MIT extension seems to be the absence of an XScreenSaverNotifyEvent, that an application could ask to receive. Unfortunately for me, that's precisely what I was looking for for my own development effort, but that's another story.

The next link in the chain is an application called ssaver(1) (a.k.a. /usr/bin/screensaver). This is the GUI that normally gets called up by the Toolchest Desktop->Customize->Screen Saver menu item. This reads some configuration files in /usr/lib/X11/savers/defaults, takes user input, and turns them into xset commands and writes then into $HOME/.desktop-/panelsession which is in turn executed by /usr/lib/X11/xdm/Xsession.dt at the start of the user's session. Inside of panelsession is the name of the command to run for the screensaver. By design in IRIX that is either a program called xlock or haven.

Xlock is a heritage program with a limited number of hard coded demos (blank, rotor, pyro, flame, hop, image, life, pop, qix, swarm and random). It is not expandable, but it's advantage is that it locks the screen. (As a side note there is another "xlock" called xlockmore available from, that offers many more hard-coded savers and is a drop-in replacement to xlock.)

Haven is the alternative to xlock and it is a more general purpose tool. It can run any program that opens an openGL window as the screensaver. This is the mechanism lisp used to add the Really Slick Screensavers to the ssaver option panel. You can get lisp's excellent patched, pre-compiled and packaged binaries at The unfortunate draw back of using haven, IMHO, is the lack of screen-locking ability.

That brings us to xscreensaver, which in many ways is the luxury sedan of the X screensaver world. It is: fully extendable, feature laden (it even professes to add image-file viewing/panning capabilities like the Mac, and the ability to run animations -- neither of which I've tried), readily available from and locks the terminal. Unfortunately, I hadn't the foggiest idea how to configure it, and I really wanted it to use the Really Slick Screensavers. Well I finally hunkered down and learn't.

Xscreensaver runs a (background) daemon that monitors the system for inactivity. This daemon is launched via the shell command xscreensaver &. The daemon reads a configuration file, nominally $HOME/.xscreensaver, that tells it all about the various options and screensaver modules it can run. These options can also be set graphically via a GTK+ application called xscreensaver-demo which acts very much like SGI's ssaver. In order to incorporate the Really Slick Screensavers (RSS) add the following lines to your $HOME/.xscreensaver:

GL: /usr/local/bin/helios -r \n\
GL: /usr/local/bin/solarwinds -r -R 1 -g 0 -s \
65 -W 40 -p 500 -b 80 \n\
GL: /usr/local/bin/colorfire -r \n\
GL: /usr/local/bin/euphoria -r \n\
GL: /usr/local/bin/cyclone -r \n\
GL: /usr/local/bin/flux -r -g 2 -s 50 -i 40 \
-c 10 -f 2 \n\
GL: /usr/local/bin/plasma -r -s 30 -R 40 -f 50 \n\
GL: /usr/local/bin/lattice -r \n\
GL: /usr/local/bin/skyrocket -r \n\
GL: /usr/local/bin/sundancer2 -r \n\
GL: /usr/local/bin/hufo_smoke -r \n\
GL: /usr/local/bin/hufo_tunnel -r -c 0 -s \
True -t 1 \n\
GL: /usr/local/bin/busyspheres -r \n\
- GL: /usr/local/bin/fieldlines -r -i 20 \n\
- GL: /usr/local/bin/flocks -r -p 3 \n\
GL: /usr/local/bin/fireflies -r -M 5 60 \n\

The -r is a command line option supported by most screen savers programs (including RSS) that tells the app to draw on the root window, a requirement for compatibility with xscreensaver. The additional command line options are my own tweaking of the RSS applications and can be dropped. A happy coincidence is that many of the RSS programs seemed to have problems initializing their window when used with haven so that sometimes only a 1/4 full-screen window appeared or else a blank screen. By using the root window drawing option on the RSS modules, these errors have disappeared on my system!

There were two last little tricky bits in getting xscreensaver going on my system. First, if you are using shadowed passwords (and you should!) then xscreensaver needs to be setuid to root. This explained in the release notes on

NOTE: This product installs its X application default files in /usr/freeware/lib/X11/app-defaults, which is not in the default X search path. There are several ways to extend your X search path via environment variables, however in my opinion the easiest thing to do is create a symbolic link in /usr/lib/X11/app-defaults:

ln -s /usr/freeware/lib/X11/app-defaults/XScreenSaver

Also, if you're using shadow passwords, you'll need to make /usr/freeware/bin/xscreensaver setuid:

chmod 4755 /usr/freeware/bin/xscreensaver

This is not as dangerous as it sounds since xscreensaver absolves itself of being root as soon as it's done loading the password database. (If root ran it it tries to become nobody, otherwise it seems to go back to the executing user's id).

The next part was a bit of a bother getting the syntax correct, but to make a long story less long I added the command to start the daemon to my $HOME/.sgisession file in order to have xscreensaver active every time I logged in. In my case .sgisession looks like (all on one line)

/usr/local/bin/iconbar & /usr/freeware/bin/mozilla & /usr/freeware/bin/xscreensaver-command -exit; /usr/freeware/bin/xscreensaver -nosplash

This starts my iconbar application, mozilla and then kills any existing instances of the xscreensaver daemon and then starts a new one. I'm not sure if this the best place to put this -- it might have been better to place it in $HOME/.desktop-/panelsession instead of xlock or haven. But it works for now. See the xscreensaver man page for more info.

By the way, don't forget to disable the existing IRIX screensaver. I did this by unchecking the box in the ssaver panel and also killing the haven process already running. It might be a good item to comment it out of panelsession as well.

Lastly, I integrated xscreensaver a bit more tightly into the IRIX desktop. I did this by following the tip I found at which basically states:

Modify your "/usr/lib/X11/system.chestrc" like this:

Modification #1
OLD line:"Start ScreenSaver" "/usr/bin/X11/xset s activate"
NEW line:"Start ScreenSaver" "/usr/freeware/bin/xscreensaver-command -activate"

Modification #2
OLD line:"Screen Saver" "/usr/sbin/screensaver"
NEW line:"Screen Saver" "/usr/freeware/bin/xscreensaver-demo"

Now the menus items will point to xscreensaver utilities rather than the IRIX defaults (you might want to save a copy of /usr/lib/X11/system.chestrc before making any changes!).

That's it. I hope I got it right -- all information subject to change, and no warranty on result!


xscreensaver misbehaves on my system in the following manner:

- xscreensaver-demo doesn't show previews in the preview panel window
- xscreensaver-demo unchecks my enabled screen saver modules when I scroll through the list
- xscreensaver seems to start if there is no mouse activity, i.e. ignores extended keyboard-only activity

Fireflies 2.06

As one last little goody I compiled the fireflies 2.06 screen saver to add to the collection. To use it just copy the binary into a directory in your path and add (assuming it's /usr/local/bin)

GL: /usr/local/bin/fireflies -r -M 5 60 \n\

to your $HOME/.xscreensaver resource file.

Feedback appreciated and welcome!

Posted by squeen at 3:40 PM | Comments (3)

October 23, 2003

Building a Pair of Classic Arcade Shoot-Em-Ups: a mini porting journal

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! :)

Posted by squeen at 9:07 AM

July 9, 2003

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...

Posted by dexter1 at 5:49 PM

February 17, 2003

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.

Posted by nekonoko at 3:09 AM | Comments (4)

February 4, 2003

Setting up a Wacom Graphics Tablet Under IRIX

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.

Posted by nekonoko at 12:18 AM | Comments (3)

January 16, 2003

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.

Posted by nekonoko at 2:19 PM

January 2, 2003

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! :)

Posted by nekonoko at 11:40 PM | Comments (5)

January 1, 2003

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.

Posted by nekonoko at 10:24 PM | Comments (8)

December 17, 2002

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.

Posted by nekonoko at 5:07 AM | Comments (3)

December 15, 2002

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.

Posted by nekonoko at 7:26 PM | Comments (4)

December 8, 2002

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.

Posted by nekonoko at 7:46 PM | Comments (9)

November 27, 2002

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.

Posted by nekonoko at 12:14 AM

November 20, 2002

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

Posted by nekonoko at 1:16 PM | Comments (5)

November 5, 2002

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.

    Posted by nekonoko at 3:39 PM

    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.

    Posted by nekonoko at 3:33 PM | Comments (2)