xv: the X Viewer
Most of the graphics printed in this magazine come to us electronically, and the first way we look at them is with xv, an interactive viewer for the X Window System. This program was written by John Bradley and has many pages of documentation. The man page tells you only the name of the documentation file, namely xvdocs.ps; you have to find out where it was installed (perhaps /usr/local/lib/). The program is quite simple and intuitive to use, and you can figure out its basic uses whether you read the manual or not.
xv will display just about any type of graphics file you happen to have: GIF, JPEG, TIFF, PBM, PGM, PPM, X11 bitmap, BMP and many more. It will even display PostScript by calling up Ghostview to help it out. It is available by anonymous download at ftp://ftp.cis.upenn.edu/pub/xv/ and has a home page at http://www.trilon.com/xv/. xv is a shareware program that is free for personal use. There is a $25 US registration fee, and site licenses are available.

Figure 1. Main Window
Typing xv alone at the command-line prompt brings up a window containing the xv title page with bright red fish swimming through the air (see Figure 1). Clicking the right mouse button in the window brings up the control window (see Figure 2), while pressing the letter q quits the program.
To load a picture, click on “Load”, and a window will come up showing the contents of the current directory. Double-click the image file you want to view, and that image replaces the red fish in the main window. Alternatively, you can type the file name on the command line:
xv 3964f3.jpg
This command displays the picture of my youngest grandchild, Justin, shown in Figure 3. Wild cards are recognized, so typing xv *.gif will load every GIF file in the current directory, displaying one after another each time you press the space bar.
Looking at Figure 2 again, you'll see that there is a double row of buttons across the top of the control window. Clicking on any of these buttons causes a menu to drop down, showing various options. Options not available will be grayed out. For example, if I click on “Display” while viewing Justin's picture, I am given the options of “raw” and “smooth”, but “dithered” is grayed out. Also, “Use standard colormap” is checked and all other options are grayed out.
In the menu obtained by clicking on “Windows”, you will find “About XV”, which you tells you about registration fees, and “XV Keyboard Help”, which tells you how the program will react to certain key and mouse presses. The most useful options in this window are “Color Editor” and “Image Info”, the latter in particular. I use the Info option for every image I display to determine if the picture is high enough resolution to print well. The image information for Justin's picture is shown in Figure 4. Looking at this information, we see that the image is in JPEG format and has a resolution of 339x418. This will give us a picture that would print reasonably well as an author photo. It's a bit grainy at the larger size we are showing here. Any smaller, and our Associate Editor Darcy Whitman would be writing for a new picture. The resolution is also shown toward the bottom of the control window.
The menus for “Image Size” and “24/8 Bit” are fairly self-explanatory. Image size is nice in that it gives you many choices for resizing the picture, including setting it yourself or as a function of percentages of current size or pixels. The “Root” menu I leave alone—the name is enough to deter me from using it. The “Algorithms” menu can provide some fun, although not as much as you might have with programs such as the GIMP. Figure 5 shows an embossed image of Justin, while Figure 6 is a pixelized version. The oil painting option was not pretty—it looked like sections had been scraped off with a knife.
The buttons down the right side of the control window will allow you to “Save”, “Print” or “Delete”, as well as load images. Delete will let you delete from the viewing list, or from the list and the disk both.
Rows of buttons along the bottom allow you to rotate the image 90 degrees (right or left) or turn it upside down, if you wish. Play with them—it's fun for a minute or two. The “A” button gives you the ability to annotate the picture as I did for Figure 3, which can be quite useful in remembering when a photo was taken. I use the “Crop” button quite often; in fact, this picture of Justin is cropped from one in which I was holding him (see Figure 7). Clicking and holding down the left mouse button as you drag it in the window draws a frame which defines the area to be cropped.
I also use the “Grab” button quite frequently in order to make screen shots. Click on this button, set a delay time (e.g., 1 second), click on “Autograb”, put your cursor in any window, and that window will appear in XV's main window. Or you can use “Grab” and define the area you wish to view by holding down and dragging the left mouse button.
XV is truly a useful program and one that I use on a daily basis. Try it; I think you'll like it.
Marjorie Richardson is Editor in Chief of Linux Journal, the best job in the universe. She loves all her grandchildren equally, even though she used only Justin's picture in this article.
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
| 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 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
- RSS Feeds
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Dynamic DNS—an Object Lesson in Problem Solving
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Download the Free Red Hat White Paper "Using an Open Source Framework to Catch the Bad Guy"
- Tech Tip: Really Simple HTTP Server with Python
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?










2 hours 36 min ago
4 hours 52 min ago
5 hours 20 min ago
6 hours 18 min ago
7 hours 47 min ago
8 hours 56 min ago
9 hours 42 min ago
16 hours 18 min ago
21 hours 56 min ago
1 day 3 hours ago