Use Custom Background on Irix

Revision as of 20:14, 19 July 2019 by Netfreak (talk | contribs)

First you must enable 24-bit support on your X server.

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.


Rather use 24bit images?

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:

http://freeware.sgi.com/Installable/xli-1.16-sgipl1.html

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

http://freeware.sgi.com/Installable/Eterm-0.8.10.html

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.

Using IRIX 6.5.22 and Up

IRIX 6.5.22 brought native support for many image formats; backgrounds can now be JPEG, PNG, BMP, etc. - no conversions required.

The procedure is essentially the same as above (add -class TrueColor -depth 24 to /var/X11/xdm/Xservers, copy /usr/lib/X11/system.backgrounds to your home directory as .backgrounds) except a typical ~/.backgrounds entry now looks like this:


background "Anime" 
default "-image /usr/people/neko/backgrounds/anime.jpg"

instead of 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"

A forum member wrote the following script for IRIX 6.5.22+ that will auto-populate a ~/.backgrounds based on the contents of a directory filled with JPEG/BMP/PNG images. Just change BGDIR to reflect an image directory of your choice:

#!/bin/sh 
BGDIR=$HOME/Backgrounds 
cp /usr/lib/X11/system.backgrounds $HOME/.backgrounds 
chmod 644 .backgrounds 
cd ${BGDIR} 
for x in *.jpg *.xpm *.png *.bmp; do 
case ${x} in 
'*.jpg'|'*.xpm'|'*.png'|'*.bmp') ;; 
*) 
NAME=`echo ${x} | tr '.' ' ' | awk '{print $1}' | tr '_' ' '` 
echo "" >> $HOME/.backgrounds 
echo "background \""${NAME}"\"" >> $HOME/.backgrounds 
echo "default \""-image ${BGDIR}/${x}"\"" >> $HOME/.backgrounds 
;; 
esac 
done


Courtesy of Nekonoko.


Custom background on login screen

edit /usr/lib/X11/xdm/Xsetup At the top of the file add a line similar to:

/usr/nekoware/bin/xli -onroot /path/to/wallpaper/login_pix.jpg

External link

Pertinent nekochan.net blog entry is available here