Interested in EM?
Using the NYSBC
Principles & Protocols
NYSBC Equipment
Seminars & Courses
Publications associated with CEM at NYSBC
Jobs Available
Microscope Schedule
Logbook
NYSBC Intranet
NYSBC Contacts
Cryo-EM home
NYSBC home
NMR Facility
X-Ray Facility
Protein Production Facility
Electron Crystallography Center
Cryo-EM Site map
|
Mixing 8 and 16/24/32 bit displays in Linux (Redhat)
Problem
- Older display software, such as WEB, does not support displays higher than 8-bit
- Usually people use 24 or 32 bit "truecolour" displays, since 8-bit is limited to 255 colours
- This solution allows normal use of 24/32 bit display, plus an extra 8-bit display
- When running, press CTRL-ALT-F8 to switch to 8- bit display. Press CTRL-ALT-F7 to go back to normal display
Assumptions
- Tested in Redhat Linux 7,8,9 and Fedore Core 3
- Probably will work in other distribtions as well
- Will work in KDE or GNOME
- uses a "minimal" window manager, either twm or icewm, for the 8-bit display
Setting up
- Edit the file /etc/X11/XF86Config (Redhat 7-9) or /etc/X11/xorg.conf (Fedore Core) as follows:
Find the "Screen" section, and duplicate the 24-bit depth Subsection, changing 24-bit to 8-bit. Example:
Section "Screen"
Identifier "Screen0"
Device "ATI Mach64"
Monitor "Monitor0"
DefaultDepth 24
Subsection "Display"
Depth 24
Modes "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection
Subsection "Display"
Depth 8
Modes "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubsection
EndSection
- Edit /etc/X11/xdm/Xservers to add a new screen, and tell it where to put the screens. It should look like this when done:
# $Xorg: Xserv.ws.cpp,v 1.3 2000/08/17 19:54:17 cpqbld Exp $
#
# Xservers file, workstation prototype
#
# This file should contain an entry to start the server on the
# local display; if you have more than one display (not screen),
# you can add entries to the list (one per line). If you also
# have some X terminals connected which do not support XDMCP,
# you can add them here as well. Each X terminal line should
# look like:
# XTerminalName:0 foreign
#
:0 local /usr/X11R6/bin/X vt7
:1 local /usr/X11R6/bin/X -depth 8 vt8
- Optional : Install icewm using yum
yum install icewm
- Place the file "startx8.com" in your home directory.
startx8.com
#!/bin/csh
if (-e $home/.Xclients) mv $home/.Xclients $home/.Xclients-orig
# starts an 8-bit display in window 2 using fluxbox
#echo exec /usr/local/bin/fluxbox > $home/.Xclients
# start an xwindow display using twm (installed with redhat)
echo exec /usr/X11R6/bin/twm > $home/.Xclients
# start an xwindow display using icewm
#echo exec /usr/bin/icewm > $home/.Xclients
chmod a+x $home/.Xclients
startx -- :1 -depth 8
rm -f $home/.Xclients
if (-e $home/.Xclients-orig) mv $home/.Xclients-orig $home/.Xclients
- Uncomment the appropriate command (twm, icewm or fluxbox) depending on the window manager installed. twm is already installed by Redhat.
- Make the file executable:
chmod a+x ~/startx8.com
Running the program
- After you already have your normal X-display started, press CTRL-ALT-F2 to go to a new text login window
- Log in, then run the command
./startx8.com
- A new X-window should start up.
- To switch back to your old window, press CTRL-ALT-F7. This one is accessed by CTRL-ALT-F8
twm instructions
- twm is a VERY MINIMAL X display
- To run a program, hold down left-click -- a menu will pop up
- Select xterm to run an x-terminal
- When new windows open, they open as hollow boxes. Move the box where you want the window, then click
- To resize the window, click and hold the box in the upper right corner
- To close a window (twm does not have a close button) , click the desktop until the menu comes up, then select kill
- Move the skull and crossbones cursor over the window, click and it will be closed
- Better to install IceWM and use that
Problems running web in recent Redhat (Fedora core 8)
sudo ln -s /usr/X11R6/lib/libXm.so.4.0.0 /usr/X11R6/lib/libXm.so.3
A second way to get an 8-bit display
- from instructions on Wadsworth site
- Use vnc (Virtual Network Computing) to create a virtual display.
- Most GNU/Linux distributions include vnc in their default installation which can be used to create a virtual display in a window on your current desktop.
- If it is not installed, try
> yum install vnc vnc-server
> vncserver -cc 3 -depth 8
vncviewer :1
Provide the same password
- Opens new desktop within a window
- Here you can start web_linux normally or you can start it automatically by editing your vnc viewer startup file: ~/.vnc/xstartup
vncserver -kill :1
- Can also simply close the window. When you reopen, you will be in the same place
-- BillRice - 22 Aug 2006
|