Basic fvwm Configuration
A geometry entry for an application might look something like this:
-geometry 420x360+5+20
If this looks a bit cryptic, don't worry, it's actually pretty simple. Converting this statement into plain English yields:
“The application window is 420 pixels wide by 320 pixels high, with its left border 5 pixels from the display's left edge and its top border 20 pixels from the display's top edge.”
Pretty simple, eh? There are actually only a couple of rules to keep in mind when specifying a window's geometry. First, dimensions are generally in terms of pixels, although there are times, notably with xterms and some text editors, in which the width and height dimensions will be in terms of characters. You'll notice in the example .xinitrc file above that the width and height dimensions for the xterm were given as 80x24, or 80 characters wide by 24 columns high. If you bear in mind that your entire display screen is probably 640x480 or 800x600 or 1024x768 pixels, depending on your resolution, you can get a feel for how much of the screen is taken up by an application window that is, say, 400x300 pixels.
The second set of numbers specify the horizontal (x-offset) and vertical (y-offset) distances from the edge of the display screen. Again, this is pretty straightforward: think of the screen in terms of graphing paper in which the upper left hand corner is 0,0 and the values increase as you move from left to right and from top to bottom.
If your screen were 640x480 pixels, your top left corner would be considered 0,0; the bottom left corner would be 0,480 (remember that the vertical position increases as you move from top to bottom); the top right corner would be 640,0; and the bottom right corner would be 640,480. The other thing to keep in mind is that horizontal and vertical positions are generally (but not always, as we'll see in a minute) specified in terms of the left and top sides of the application window.
For example, suppose that you wanted to put an xterm window in the upper left hand side of the screen. You decide that you want it 10 pixels from the left hand side of the display and 50 pixels from the top. You also want the window to be 400 pixels wide by 320 pixels high. Simple enough. You'd use the following geometry option to accomplish this:
-geometry 400x320+10+50
Notice the general form this takes:
-geometry WIDTHxHEIGHT+horizPOS+verticalPOS
Using a plus + sign before the pixel value indicates the position of the window with respect to its left hand or top edges. However, using a minus - sign specifies the opposite meaning: the horizontal position is the distance in pixels between the application window's right hand side and the right side of the display, and the vertical position is the distance in pixels between the application window's bottom edge and the bottom edge of the display.
If this seems a bit confusing try playing with it a bit. Start up fvwm and in an xterm enter the following commands:
xterm -g +5+5 & xterm -g -5-5 & xterm -g -5+5 & xterm -g +5-5 &
Try these out and see where the xterm gets put. Note that you can generally abbreviate -geometry to a simple -g.
We've wandered a bit from our discussion about launching programs at startup. In practical terms, figuring out the correct geometry for all of the applications you want to have started is pretty easy. The first step is to get pencil and paper ready because you'll want to jot some notes.
Customizing the start-up desktop usually begins by starting all of the applications that you want present when fvwm begins. Try out various command line options to get the look and feel that you want. Reading a program's manual page often helps you determine what options are available at run time. Once you get an application running, you can generally resize it by clicking the mouse on one of the “L” shaped window corners and dragging it to a larger or smaller size. Clicking and dragging on the titlebar or side borders lets you position the window.
Once you have everything started, positioned, and sized the way you want it, jot down each application and the command line options, if any, that you used. To get each window's geometry, we'll use a great little program called xwininfo.
Start it from an xterm by entering:
$ xwininfo
at the command prompt. Notice that you don't use an ampersand for this command. Your mouse cursor will change to a cross-hair and the following instructions will be displayed:
xwininfo: Please select the window about which you
would like information by clicking the
mouse in that window.
Clicking on an application window produces the output like the following:
xwininfo: Window id: 0x2c00007 "ez ~/fvwm_LJ.ez*" Absolute upper-left X: 92 Absolute upper-left Y: 28 Relative upper-left X: 0 Relative upper-left Y: 0 Width: 528 Height: 724 Depth: 8 Visual Class: PseudoColor Border width: 0 Class: InputOutput Colormap: 0x21 (installed) Bit Gravity State: ForgetGravity Window Gravity State: NorthWestGravity Backing Store State: WhenMapped Save Under State: no Map State: IsViewable Override Redirect State: no Corners: +92+28 -532+28 -532-148 +92-148 -geometry 528x724+85+0
In this instance, I clicked on the EZ editor's window, which produced a veritable cornucopia of information. Specifically, the geometry setting that you were looking for is in the last line. Do this for all the applications that you want started, and your work is pretty much done. Find the section in .fvwmrc that defines the InitFunction, add or modify the entries so as to start the applications that you want—don't forget to put that ampersand at the end of each Exec line!—and you should be all set. Once you've gotten things the way you want them, don't forget to make a backup of your newly modified .fvwmrc file.
One more thing before we leave the subject of launching programs at start up. fvwm comes with a number of modules, which are separate programs which must be spawned by fvwm—you can't start these from a command line. There are a number of modules which can generally be found in the /usr/lib/X11/fvwm directory. A couple of the more common modules to launch at start up include FvwmBanner, which places a decorative banner across the root window; FvwmPager, which serves as a virtual desktop manager when you have multiple desktops going; and the GoodStuff button bar. The entry in InitFunction to start an fvwm module is a bit different than a regular application in that it is simpler:
Module "I" GoodStuff Module "I" fvwmPager 0 3
You'll notice that there's no Exec or Wait statement needed. Simply use the reserved word Module, followed by "I" and then the name of the module to launch with any options.
That wasn't too bad, was it? This should give you the basics that let you customize your startup desktop. Next month, I'll cover launching programs once fvwm has started—and more!
John Fisk (fiskjm@ctrvax.vanderbilt.edu) After three years as a General Surgery resident and Research Fellow at the Vanderbilt University Medical Center, he decided to “hang up the stethoscope” and pursue a career in Medical Information Management. He's currently a full-time student at the Middle Tennessee State University and hopes to complete a graduate degree in Computer Science before entering a Medical Informatics Fellowship. In his dwindling free time he and his wife Faith enjoy hiking and camping in Tennessee's beautiful Great Smoky Mountains. An avid Linux fan since his first Slackware 2.0.0 installation a year and a half ago.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- RSS Feeds
- Dynamic DNS—an Object Lesson in Problem Solving
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Designing Electronics with Linux
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- A Topic for Discussion - Open Source Feature-Richness?
- Drupal Is a Framework: Why Everyone Needs to Understand This
- Validate an E-Mail Address with PHP, the Right Way
- What's the tweeting protocol?
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




4 hours 8 min ago
8 hours 35 min ago
12 hours 11 min ago
12 hours 43 min ago
15 hours 7 min ago
15 hours 10 min ago
15 hours 11 min ago
19 hours 36 min ago
21 hours 27 min ago
1 day 2 hours ago