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.


Because of the limitations of xpm, you can use (SGI's) rgb files using bgpaste. To use it through the 4Dwm background file include the following:

background "Anime2"
command "-execute /usr/sbin/bgpaste/usr/people/brice/images/anime2.rgb"
default "-execute /usr/sbin/bgpaste /usr/people/brice/images/anime2.rgb"
exeok "/usr/sbin/bgpaste"
readok "/usr/people/brice/images/anime2.rgb"

Unfortunatly Aterm will not be able to 'grab' the image for transparent terminals, however you can now have images 1600x1200 plus.

... or you could use something like xli, use JPEG images and still support aterm.

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

The problem is that any time you step outside of 4Dwm by using an external program to paste an image, desktop switching slows down drastically. Desktop Overview also cannot grab the image for preview. Hence I don't feel it is the best solution and don't offer it here ... but use whatever works best for you :)

About this Entry

This page contains a single entry by nekonoko published on November 5, 2002 3:33 PM.

The Most Attractive OS was the previous entry in this blog.

Compiling aterm On IRIX is the next entry in this blog.

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