Slaton Lipscomb
Slaton's Tips:
Compiling And Using 24-bit Web For Linux
Last updated July 15, 2008
Comments/corrections welcome.
Web is a graphical user interface for displaying and interacting with SPIDER images developed at the Resource for the Visualization of Biological complexity (RVBC) located in the Wadsworth Laboratories, Albany, New York. Web is written in C and runs under the X/Motif system.
There is a Makefile (with modifications by Chao Yang and William Nicholson) included with SPIDER/Web for building an 8-bit color version of Web/Linux.
Compile information is provided on the Wadsworth Institute website.
I run a 24-bit Linux desktop with nVIDIA video cards and drivers. The nVIDIA drivers do not support pseudocolor, so I can only use this version of Web by running multiple desktops at different bitdepths. If you are interested in doing this, please read Compiling And Using 8-bit Web With A 24-Bit X Server.
There is also a Makefile included for a 24-bit color version of Web/Linux. This is what we use day-to-day, and it is the version referred to by the Web/Linux documentation.
The 24-bit color version of Web/Linux uses 24-bit DirectColor, an older and poorly supported X11 visual class. You must use an X11 server that supports 24-bit DirectColor for your video card, or it will not work. Most current Linux distributions include the XFree86 or X.org X11 implementation, both of which only support DirectColor in 8-bit color for many video cards. TrueColor is the more widely-supported 24-bit visual class.
However, nVIDIA's Linux drivers support 24-bit DirectColor for their GeForce and Quadro cards. This is the combination we're using in the Nogales Lab.
Also, if you don't have SGIs in your lab, you probably don't want Web to use byte-swapping for images. You'll have to edit the Web Makefile and redefine CFLAGS from this:
CFLAGS = -DFUNCPROTO -O2 -I/usr/X11R6/include -DP_SGIOSF -Dapp_plus -DWEB_24
to this:
CFLAGS = -DFUNCPROTO -O2 -I/usr/X11R6/include -Dapp_plus -DWEB_24
24-bit Web compiles easily with gcc 3.x and later, using the information provided on the SPIDER website.
1 From the root level spiderweb directory, change to the AppPlusS directory.
$ cd web/AppPlusS
2 Clean up the directory and compile the AppPlusS package. Don't be alarmed if linking fails -- we just need the AppPlusS library to link with SPIDER.
$ make clean $ xmkmf -a $ make
3 Change to the Web source directory, and compile Web. In SPIDER releases prior to 11.0, the makefile is called Makefile_linuxieee24 and the executable is web_linuxieee24.
$ cd ../src $ rm -f *.o *.a *.mod $ make -f Makefile_linux_24 web_linux_24
(Note that there is a typo in the instructions on the SPIDER website. The above instructions are correct.)
4 You must manually load the DirectColor visual class before running Web. I've written a simple shell script to do this and then launch Web (with whatever arguments were specified). You can grab it here:
« web.sh.txt »
To use it, save this file to your machine and rename it to web. Make sure it has the
executable bits set (chmod a+x web), then place the script in a directory that is in your
executable path. For example, /usr/local/bin.
5 Once you rehash your PATH (only required the first time), you should be able to just type "web" and start.
$ rehash $ web
Web's pulldown menus lose focus The SPIDER pulldown menus disappear when you try to click on them. I have seen this behavior with all recent Linux distributions, including cAos-2 (X.org 6.8.2), Red Hat Enterprise Linux 4 (X.org 6.8.1) and SuSE 9.1 (XFree86 4.3.99), when using KDE or GNOME graphical environments. Window managers such as Xfce and FVWM-2 do not have the problem.
Update: This bug is fixed with
versions of Web accompanying SPIDER release 13.00 and later. Just make sure the compile-time CFLAG
-DWEB_BGFG is defined in your Makefile.
Angle fitting menu_popup loses focus when picking tilted pairs When picking tilted pair particles on Linux, you first need to pick a few particle pairs. Then center-click, which brings up a dialog box. If you click "Fit angles", a tiny window opens asking for a key number for the origin. When you click "Accept" for this value, the <Angle fitting menu_popup> window appears. When you click "Determine theta", Web is supposed to find the theta angles between the images, and update the values shown in the window. Instead, <Angle fitting menu_popup> disappears. Going back to the original window and clicking "Fit angles" won't bring it back either -- nothing will, short of quitting Web and restarting it.
Update: This bug is fixed with
versions of Web accompanying SPIDER release 13.00 and later. Just make sure the compile-time CFLAG
-DWEB_BGFG is defined in your Makefile.
Odd colormaps The colormaps for every other window get really weird when Web is in the foreground. I assume this is because X11 is using DirectColor for the Web window, and TrueColor for the other windows (root X11, xterms, etc). It's not a problem though -- whichever window has focus loads the correct colormap automatically. I have yet to find a way to take screenshots, unfortunately -- they come out far too dark.
According to the SPIDER site, some masking operations using overlays don't work correctly. Power Spectrum and Masking operations are specifically mentioned. Personally, I have not seen this behavior.
It works, mostly. It's not quite as stable or feature-complete as the SGI IRIX version, but it's much faster with a decent video card.
The hardware/software combination currently used in the Nogales Lab is:
CAOS Linux distribution
X.org X11 implementation
NVIDIA GeForce & Quadro-based AGP cards
NVIDIA Linux drivers