Basic FVWM Configuration
So, now that we've touched on the basics, let's put all of this together and create a sub-menu for our editors. Supposing that we wanted the menu title to be Editors and the Popup itself to be referred to as editors, then we could create something similar to the example given below:
Popup "editors" Title "Editors" Exec "XE&dit" exec xedit & Exec "X&Coral" exec xcoral & Exec "GNU &Emacs" exec emacs -g 84x47 & Exec "&XEmacs" exec xemacs & Exec "XW&PE" exec xwpe -font 9x15 & Exec "X&WE" exec xwe -font 9x15 & Exec "&aXe" exec axe -noserver & Exec "&NEdit" exec nedit & Exec "E&Z Editor" exec ez & EndPopup
So far so good, eh. What's that? What are those ampersands doing in the menu item name entry? Fvwm allows you to define keyboard shortcuts to use with menus. Placing an ampersand in an item name causes the letter following the ampersand to be underlined. Then, when the menu is displayed, hitting that underlined letter causes the program item to be executed.
In the menu defined above, the letter “d” in XEdit would be underlined and would appear as “XEdit”. Once the menu has been displayed, hitting a “d” launches xedit. It goes without saying that you should avoid defining the same hot-key for two items in the name menu.
Ok, we're almost done. Now that we've created a sub-menu, let's add this to the main menu. An entry for a sub-menu takes the form:
Popup "Editors" editors
Pretty easy, huh? The syntax should start to look pretty familiar to you by now. The line begins with the word “Popup” indicating the the item is a sub-menu of some kind. Following this, and enclosed in double quotes, is the item name that will appear on the menu. Finally, the last argument is the name of the pop-up menu itself. Remember that we decided to call the pop-up editors? This is the name by which the sub-menu is called. Be careful not to mix up the name of the pop-up menu with the title (e.g., “Editors”) that the menu uses.
Well, congratulations! You should now be well on your way to customizing and configuring. There are many more things that can be included on a pop-up menu although programs, modules, and sub-menus are probably the the ones you'll use the most. Once you get comfortable creating menu entries, skim over the fvwm manual page and take a look at the sample fvwmrc file that comes with the fvwm distribution to get ideas about what else can be done.
As a final word of exhortation let me suggest that “moderation in all things” is probably sage advice. It is unnecessary and unwise to create an entry for every program on your system. Add programs that you frequently use and make them accessible. Nesting sub-menus beyond one or two deep is likely to make getting at them more of a chore than it is worth. Also, more than 15 to 20 items on a single menu will probably make it a bit unwieldy. [Actually, experts in human-computer interaction suggest that the human mind is less efficient when dealing with more than 7 items (or groups of items) together. —ED] Use your discretion and divide things up if you need to. Most of all, though, have fun!
By now you should start feeling pretty good about fvwm. You've learned the basics of creating a start up desktop and you've re-organized and customized your pop-up menus. This is pretty good, eh? One of the next items on the customization to-do list is invariably colors. Like most everything associated with fvwm, colors are extensively customizable. Doing this, however, can be just a bit tricky, not because it's all that difficult, but because several entries govern how colors are applied to various programs and windows. Once you track all of these down, and understand a few simple concepts about how colors are defined, the rest is play. At the outset, however, it is helpful to know something about how fvwm views windows (no, not that Windows...).
Fvwm recognizes and makes a distinction between a couple of different “types” of windows. These include the “selected” window—that which has the input focus—“unselected” windows—those which do not have the input focus—and “sticky” windows—those which “stick to the glass” as it were. It is possible to customize the color scheme for each type of window. Parenthetically, let me also point out that it is easy to change the color of the root window or to use a bitmap or pixmap image in the root window as the “wallpaper”. In Part 1 of this series we saw that the xsetroot program allows you to change the color of the root window (see the sample .xinitrc file). There are much more fun and entertaining ways to change the root window, but I'll leave that up to you for the moment (hint: man xpmroot and man xv should give you some ideas...).
So, back to customizing the various windows. Fvwm allows you to individually customize selected, unselected, and sticky windows as well as menus and the pager. These are set using the following reserved words:
StdForeColor StdBackColor StickyForeColor StickyBackColor HiForeColor HiBackColor MenuForeColor MenuBackColor MenuStippleColor PagerForeColor PagerBackColor
ForeColor stands for the foreground color and BackColor stands for the background color. This is quite typical of how colors are designated under X—using a foreground/background combination to set the color scheme. A brief explanation of each of these is as follows:
StdForeColor foreground color for menus and non-selected window titles
StdBackColor background color for menus and non-selected window frames
StickyForeColor foreground color for non-selected sticky window titles
StickyBackColor background color for non-selected sticky window frames
HiForeColor foreground color for selected window's title
HiBackColor background color for selected window frame
MenuForeColor foreground color for menus
MenuBackColor background color for menus
MenuStippleColor color for shaded-out entries in a menu
PagerForeColor foreground color for pager
PagerBackColor background color for pager
Setting up the color scheme you want is a matter of adding an entry such as:
StdForeColor black StdBackColor wheat
This would set the foreground (text) color to black and the background color to wheat.
Armed with this new knowledge, you head off to customize colors, and find an entry that looks like:
If you're having a little trouble closing your eyes and visualizing just what the color #8a4510 might look like... ...keep reading.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Non-Linux FOSS: Caffeine!
- Managing Linux Using Puppet
- Doing for User Space What We Did for Kernel Space
- Tech Tip: Really Simple HTTP Server with Python
- SuperTuxKart 0.9.2 Released
- Parsing an RSS News Feed with a Bash Script
- Google's SwiftShader Released
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide