Gratuitous Window Dressing, Part 4
It's 2001! That mystical year we've all been waiting for since 1968 when Clarke and Kubrick wowed us with that majestic station spinning to the Blue Danube waltz has finally arrived! Heck, believe it or not, a large, black monolith has even appeared in Magnuson park in Seattle. While it's not quite what we were hoping for, we've finally got an international space station and all you webcammers know that video phones have been around for a while now. We're doing okay!
We had a New Year's Eve party at the house (as lots of people had) where I just had to do something silly in reference to the fact that 2001 had arrived. Becasue I can't simply have signs that say "Welcome 2001" (and yes, we did have a couple of those), I also made up a poster with "O D C " written out 2001 times. Get it? 2001 spaced ODC's! Okay, fine. I got about the same response from my wife, Sally, and our guests. I thought it was funny.
So far, in this series, we've talked about X and how it works underneath the surface. We've also looked at the mysterious ".X" files and found that a little tweaking here and there can drastically change your default X environment. What we haven't talked about yet are the various window managers. Well, we won't do that this week either. Instead, I am going to show you around and tell you about some X applications you may not be aware of. We're going to start this column with a tour of X, the unknown. Then, we'll go back and explore other ways to tweak X. For now, let's play.
Odds are you have already played with xeyes ("Hey, they follow my mouse cursor all over the screen!") and xcalc ("Cool! A free scientific calculator."). You might use xbiff to keep an eye on your maibox and alert you when new mail comes in. If you've got mail, the little flag goes up. Then, there's xmag, a tool that lets you magnify a section of your X window screen. Type xmag and your mouse cursor will change to a top left-hand corner icon. Place that icon on any part of the screen and your hi-res icons look somewhat clunkier (the default magnification is 5 times). Click the "replace" button, and you can start over again with another part of the screen.
It's also quite possible that you use xman to look up commands rather than just the man command itself. It doesn't look like much when it comes up--just a box with the words "Help", "Quit", and "Manual Page" written in little oval buttons. Click on "Help" if you need help navigating with the tool. For those who haven't tried xman, you can get a list of the man page sections by clicking on "Manual Page", then choosing the "Sections" button at the top of the window. Click on "(1) User Commands" for a list of (you guessed it) user commands. Then, you can click on the command you want and it too, will appear in the graphical window. Incidentally, hitting "f" (or the space bar) will move you a page forward, while hitting "b" will move you a page backward.
Since this is the new year and we have time on our minds, let's talk clocks (nice segueway, huh?). Haven't you always wanted a clock that chimed the hours and half hours? Sure you have. A nice X clock, of course. You start your xclock with this command.
Actually, the chime is just a beep, but hey. Last year was ages ago, but think back. Every application that runs during an X session has a number of parameters associated with them. We covered some of these when we talked about X Resources. These include geometry, colormap, and others. Using the command xwininfo you can find out all sorts of information about the current running application. Simply type xwininfo -all then click on the window you are curious about (like that xclock for instance).
Back in the resources discussion, I had you modify things in a .Xresources file. Actually, many X applications allow you to modify their resources right on the command line. Let's use that silly xclock for an example. When it starts, you get a gray background with black hands. One of the resource flags or modifiers that I can give an X application is "-reverse" (or "-rv" for short). Let's try that.
xclock -reverse &
Now, the hands are white instead of black. Other parameters that you might want to experiment with include "-title" which lets you change the title text on a window. The "-iconic" parameter starts a window iconified. Don't like the color? In that case, use "-foreground" or "-background" and use a different color. Size matters, so adjust it to your tastes with the "-geometry" flag. Try these for fun.
xclock -iconic & xclock -title "RoundClock" & xclock -background "SteelBlue" & xclock -foreground "Red" & xclock -geometry 250x250 &
When it comes to tweaking your X environment, one fascinating program you should be aware of is xvidtune. xvidtune gives you an interface through which you can adjust the video modes, making your display wider, taller, narrower, or whatever. There are two sides to the xvidtune display. One shows your vertical settings while the other shows your horizontal settings. To make display tweaks with xvidtune, simply click any of the adjustment buttons (left, right, wider, taller, etc), then click "Test" to see the results on your screen. If you like what you see, then click "Show". This will give you an updated ModeLine configuration which you then add to your XF86Config file. A quick tour through the file (usually at /etc/X11/XF86Config ) will show you several defaults.
If you want to tweak your X display settings, then try this. Immediately after starting xvidtune from the command line, click on "Show" and make a note of those settings. Here's what mine look like.
Vendor: Unknown, Model: Unknown Num hsync: 1, Num vsync: 1 hsync range 0: 30.00 - 70.00 vsync range 0: 50.00 - 180.00 "1024x768" 85.00 1024 1032 1152 1360 768 784 787 823
The last line is the result of me clicking "Show" after starting xvidtune. The lines before are printed out when xvidtune starts. Now, have a look in your XF86Config file. Do any of the ModeLine parameters look familiar? One of them should be an exact match. After fiddling with the horizontal numbers a bit, then hitting "Test" followed by "Show", I get this modified version of my settings.
"1024x768" 85.00 1024 1032 1152 1396 768 784 787 823
What this does by the way (since my screen looked just fine before I started to muck about) was make it narrower. I took the above line, and added it to my /etc/X11/XF86Config file just below the original line and commented out the original line (always have a backup). Since my system was working just fine, I didn't want to lose my settings. The point of this is that not every X window configuration looks perfect and not every screen lets you modify its settings via those little buttons. Furthermore, even on a physical screen, tuning it via the buttons may mean that your X window display looks great, but your text screens are out of whack.
We'll stop here for today. But before I go (since I am still somewhat in New Year mode), I want to take a moment to thank everyone who has been following these articles for the last year. Your comments and ideas are always appreciated. Furthermore, if there is something you would like to see covered, don't be afraid to ask. I may not get to it right away, but it's fodder for future Corners. So, Happy New Year to everyone and Happy New Millenium! Until next time, remember that a little gratuitous window dressing never hurt anyone. X needs no warning labels.
Practical Task Scheduling Deployment
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.View Now!
|The Firebird Project's Firebird Relational Database||Jul 29, 2016|
|Stunnel Security for Oracle||Jul 28, 2016|
|SUSE LLC's SUSE Manager||Jul 21, 2016|
|My +1 Sword of Productivity||Jul 20, 2016|
|Non-Linux FOSS: Caffeine!||Jul 19, 2016|
|Murat Yener and Onur Dundar's Expert Android Studio (Wrox)||Jul 18, 2016|
- Stunnel Security for Oracle
- The Firebird Project's Firebird Relational Database
- SUSE LLC's SUSE Manager
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Managing Linux Using Puppet
- My +1 Sword of Productivity
- Non-Linux FOSS: Caffeine!
- Google's SwiftShader Released
- SuperTuxKart 0.9.2 Released
- Doing for User Space What We Did for Kernel Space
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