In an effort to simplify support and streamline differences between the various unix platforms at CFHT, a very tiny, simple (but full-featured!) window manager has been installed with the same configuration on all three (SunOS, Solaris, and HP-UX). It uses one third the resources of other window managers, and yet I'm confident you'll find the features you really need in it. Here's a peek at what our default screen setup looks like.
It is very easy to try fvwm. Choose "FVWM Desktop" from the choices for session-type in the "Options" menu of the login screen. You will be able to return to Openwindows, CDE, or VUE by logging out and choosing a different desktop, so go ahead and give FVWM a try and see what you think. Your old settings will not be compromised.
To also select FVWM when you are starting X from the prompt, or when logging in with the XDM on the older suns, you will have to back up your .xinitrc and your .xsession and make them both sym-links that point to /apps/wm/common/fvwm.xsession. Now, when you type "openwin", you will start fvwm instead. Restore your old dot files to return to Openwindows. Solaris (kuanalu) and HP-UX user's do not need to bother with this, however.
One note about DISPLAY variables: for things to work right, just comment out any places in your .*shrc, .login, or .profile where you set $DISPLAY because the fvwm session will now do the right thing for you. You should never have to "setenv DISPLAY ..." again if you simply use the menus for popping up xterms, or type "makehost hostname" from the command prompt.
- ~/.fvwmrc
- Copy the file /apps/wm/common/system.fvwmrc into your home directory as .fvwmrc and follow the examples and instructions that are inside this file. The next time you "restart" (Click the left mouse button on the background, go down to Exit->Restart) your changes will take effect. The man pages for fvwm and GoodStuff list all the parameters you can set. Send in suggestions for the default layout and behavior if you see any bugs or things that could be improved.
- ~/.Xdefaults
- Further customization can be accomplished through Xresources. If you have a ~/.Xdefaults, the session will merge this along with the ones that I have set up in /apps/wm/common/fvwm.Xdefaults to control fonts and colors of various applications. If you copy all or part of this into your .Xdefaults, you will be able to do things like turn off the scroll bars in an XTerm, change the colors and fonts or your XTerm, change whether or not an XTerm is started as a "login shell" and similar things for other applications as well.
- ~/.fvwm-Xdefaults
- Everywhere the ~/.Xdefaults are mentioned, you could alternatively use ~/.fvwm-Xdefaults if you don't want to affect the appearance of your VUE or Openwindows logins. The startup script will read both .Xdefaults and .fvwm-Xdefaults when you log in.
- I'm used to the sun openwindows utilities. Can I still run those?
- I can't read my E-mail with FVWM
- I want netscape to come up with more colors
- I want xv to come up with more colors
- I want to add my own icons without trashing the colormap.
- I'm still having colormap flashing problems. What gives?
- Application xyz complains about missing font -*-*-*-...
- Programs started by the window manager don't read my .cshrc or .bashrc
- How can I change the colors of my XTerms?
- I like rxvt's, but I don't want the pixmap background
- How do I change the fonts and colors in emacs?
- What other fonts are available?
- How do I know what the X-resources are going to be named?
- The session appears to be locked up.
- The man page's description for using m4 doesn't work.
- How do I get those X-Terminals with fancy backgrounds?
- I'm used to the sun openwindows utilities. Can I still run those?
- Yes, but those features will not work on the HPs. In any case, you can add some of the sun openwindows tools to your root menu by uncommenting the line in Popup "Root Menu"
Popup "Utilities (Sun)" CFHT_Utilities_sunPlease tell me if I've left anything off of this list.- I can't read my E-mail with FVWM
- The mail icon is only a status indicator, unfortunately. Clicking on it will not do anything useful. There is no button for a mail program because people use so many different mailers. You can either start your mailer from the command prompt, or use one of these examples (please send me examples for other mailers, mahalo).
- Netscape mail. There's already a button to start netscape-gold. Don't click it again if you already have netscape running, of course.
- Emacs mail. There's already a button for XEmacs (which you can change to regular GNU Emacs if you like.)
- elm, mailx, mail, mush add one of these lines to your .fvwmrc:
*CFHTStuff Mail mail.xpm Exec "Mail" exec xterm -ut -T Mail -n Mail -e elm & *CFHTStuff Mail mail.xpm Exec "Mail" exec xterm -ut -T Mail -n Mail -e mailx & *CFHTStuff Mail mail.xpm Exec "Mail" exec xterm -ut -T Mail -n Mail -e mail & *CFHTStuff Mail mail.xpm Exec "Mail" exec xterm -ut -T Mail -n Mail -e mush &You'd place this line in whatever position you want it to appear in your toolbar. If you set $MAIL to something non-standard in your .cshrc or .bashrc, you will also want to read the section below ... "Programs started by the window manager don't read my .cshrc or .bashrc".- mailtool. You can add this to a GoodStuff bar with
*GoodStuff Mailtool mail.xpm Exec "Mailtool" exec mailtool &But since it also functions as an xbiff tool, you might want to comment out xbiff and just have mailtool start-up in your InitFunction of .fvwmrc with a line like:Function "InitFunction" . . . Exec "I" exec mailtool & . . . EndFunctionNOTE: mailtool is only available on the suns. Mush is only available on the HPs.- I want netscape to come up with more colors
- The best way to do this is in your ~/.Xdefaults file. Add some lines like:
Netscape*installColormap: No Netscape.maxImageColors: 100Or tryNetscape*installColormap: Yes Netscape.maxImageColors: 250- I want xv to come up with more colors
- Edit your .fvwmrc and change the value passed to "-ncols" when xv is started up. You can also force xv to install its own colormap instead, by using "-owncmap".
- I want to add my own icons without trashing the colormap.
- If you add icons to the /apps/wm/common/pixmaps/ directory, they should be "quantized" to use a limited set of colors, or people's displays start to run out of colors before they've even started up any applications! To do this, load the original xpm into xv and save it in ppm format (or use xpmtoppm if you can get it to run without crashing). Then run a command something like the following:
ppmquant [-floyd] -map all.ppm foo.ppm | ppmtoxpm | ~isani/CFHT/WM/ICONS/fixcolors > foo.xpmInstead of all.ppm, you might want to use greys.ppm Look for these ppm files in the /apps/wm/common/pixmaps/ directory. The final xpm may not look quite as slick, but it'll work. This process is a necessary evil for as long as we have 8-bit displays. The -floyd option turns on dithering. Try it both ways to see what you like best. N.B. The extra unfortunate step of piping the output through the program from my home directory is needed because otherwise there will be rounding errors when you display the image, and you'll end up wasting colors again.You can use this same method to generate background xpm's, which you can put on your root window with the "xpmroot" utility.
- I'm still having colormap flashing problems. What gives?
- Unfortunately this is just a limitation of our workstations. Almost all of our computers can handle displaying only 256 colors at once, and you have to decide how to divide it up somehow. Note that it might make a difference what order you start applications. For example, if you start "xv -ncols 64" first, and then start "saoimage", xv will take 64 colors and saoimage will grab most of the rest. If you start "xv" without any options, it will grab all the colors it can find. If you start "saoimage" when there are only a few colors left, it will decide to install its own colormap. These are just limitations of the way the applications deal with colormaps.
- Application xyz complains about missing font -*-*-*-...
- I have tried to keep this a simple as possible, with only the files and programs that are essential. Vendor-specific fonts and other strange things are all missing. If you find that one of your favorite applications doesn't run because of this, please tell me and I can help you fix it, one way or another.
- Programs started by the window manager don't read my .cshrc or .bashrc
- If you need GoodStuff to fire off programs that are not in /usr/local/bin, /apps/bin, or one of the other standard bin directories, then you need to give the full path in your .fvwmrc, or make sure that fvwm is aware of the setting of your own PATH variable before it runs. For setting this, and other environment variables that you would like to make available to applications, I have set up a hook for you to do this. If the startup scripts find an executable script called ~/.fvwm-xstartup in your home directory, it will be sourced during startup. It must be in bourne shell (e.g., bash) syntax.
If you use bash as your regular shell, simply making ~/.fvwm-xstartup a link to a personal ~/.bashrc should be enough. After reading your personal PATH and environment settings, the startup script will continue to launch fvwm the normal way, assuming your .bashrc didn't mess with DISPLAY. Make sure your .bashrc (or whatever .fvwm-xstartup points to) is executable.
NOTE: RedHat systems used to read your .bashrc or .cshrc by default, but people had made hacks like setting DISPLAY to :0.0 (which causes logins to hang) so we took out reading of the .bashrc by default.
If you use csh or tcsh as your shell, the best option is to create a ~/.fvwm-xstartup containing the environment settings you need during startup (using bourne syntax, e.g., "export PATH=mypath:$PATH" ...) For example:
export PATH=$HOME/MyWinManModules/bin:$PATH export XAPPLOADDIR=$HOME/MyAppDefaultsRemember to make it executable with: chmod +x ~/.fvwm-xstartup- How can I change the colors of my XTerms?
- Edit (or create if you don't already have one) your ~/.Xdefaults file and add to the end of it:
XTerm*background: White XTerm*foreground: Black
- I like rxvt's, but I don't want the pixmap background
- Assuming you've chosen "rxvt" as your default terminal, to get rid of the default pixmap, edit (or create if you don't already have one) your ~/.Xdefaults and add or change the Rxvt*pixmap property. You can also set the default colors here, or use -bg / -fg on the command line.
Rxvt*background: #000011115e5e Rxvt*foreground: #ffffffffffff Rxvt*pixmap: noneSee the man page or /apps/wm/common/fvwm.Xdefaults for other Rxvt* resources.- How do I change the fonts and colors in emacs?
- Just as in the example above, you will want to edit ~/.Xdefaults and add a section like this to the bottom:
! ! Emacs fonts and colors ! Emacs.font: fixed Emacs.foreground: White Emacs.background: Dark Blue- What other fonts are available?
- Log onto a sun and run "xfontsel". This utility will let you choose the right size and style font. You will have to manually copy the "font string" from the xfontsel window into your .Xdefaults when you have something that you like (or can at least live with).
- How do I know what the X-resources are going to be named?
- For example, how do you know that it's "Emacs.font: ..." and not "emacs.font: ..." or "XEmacs.font: ..."? It does make a difference, and the trick to it is to find out the application's "Class name". You can find this out when its running by going to the Root Menu, selecting "Utilties->Identify Window" and then click anywhere in the application's window with the cursor. Motif applications usually use "Classname*fontList" instead of "Classname*font". A well documented program should tell you all the names of the resources so you don't have to guess them.
- How do I bind a function key to a window manager function?
- You must find out the X "keysym" name of the key. For example, the key labeled "Front" Sun-like keyboards is "F15" or "SunFront". To bind the Front key to the window manager function "RaiseLower" (which brings the window to the front) you'd add a line like this to the end of your .fvwmrc:
Key F15 A N RaiseLowerSee the man pages for more info on this syntax.- The session appears to be locked up.
- If the cursor doesn't change when you move to different areas of your desktop, the window manager itself if most likely locked up trying to "exec" a program or load an icon from the server. In the case of the exec, you should be sure you are exec'ing everything in the background, with an & at the end of the command.
- If the cursor is active, and you can get to the background menu (click anywhere on the desktop), then just choose "restart" under the "exit" submenu. Fvwm has been known to get confused if a netscape window that was grabbing mouse focus dies unexpectedly. It is a minor bug because it rarely happens, and you can restart the window manager any time without losing your work.
- The man page's description for using m4 doesn't work.
- The m4 program, if enabled, pre-processes your .fvwmrc for specific tokens and replaces them with other stuff. Since the word "include" is one of these special tokens, normally you couldn't even use it in a string anywhere in the .fvwmrc without m4 thinking that you want to include another file at that point. The same thing happens with some predefined m4 variables that fvwm normally sets up for you. These are ones like "HOME" and "HOSTNAME" (see man page for the full list) and could interfere with strings like $HOME in an exec line of your .fvwmrc.
To get around these annoyances, we are using GNU m4 in "prefix" mode. This means all m4 primitives are named something like "m4_include" rather than just "include". We've also gone one step further, but prefixing all variables that fvwm creates for you with "m4_" as well. So, if you wanted your home directory inserted somewhere remember the following:
Because of the way we are handling the m4_ prefixes now, there will be no strange side-effects from m4. Just remember that whenever the fvwm man page mentions something like "HOSTNAME" you have to use "m4_HOSTNAME" for it to work. See also the info pages on Gnu's version of m4.
- m4_HOME is ok
- $HOME is also ok
- HOME is WRONG
- How do I get those X-Terminals with fancy backgrounds?
- Create a link in ~/bin/ called "myterm" that points to /usr/local/bin/rxvt:
ln -s /usr/local/bin/rxvt ~/bin/mytermSee also the man page for rxvt. Note that rxvt does NOT support the Tektronix graphics emulation that XTerm does.
- Man pages
- Original ftp site: ftp://ftp.hpc.uh.edu/pub/fvwm
- FVWM official web site: http://www.hpc.uh.edu/fvwm/