Linux Screenshot zurück zurück zu kde Zurück zur Übersicht
Meine Favouriten Links Orginaltexte
Gimp
xv
xgrab
ksnapshot unter kde
Ksnapshot
Ladeadresse : ftp://ftp.kde.org/pub/kde/stable/1.1./apps/graphics/ksnapshot-0.2.7.tar.gz
Oder unter KDE 1.1 kdegraphics-Paket
Homepage des Autors unter http://developer.kde.org/~moorer/kde/ksnapshot/index.html
Ksnapshot erstellt wahlweise Aufnahmen des gesamten Desktops oder einzelner Fenster, wenn man z.B. nur ein Programm in Aktion ablichten will. Dabei ist es möglich, den Screenshot in verschiedenen gängigen Bildformaten (GIF, BMP oder XPM) abzuspeichern.
Handhabung: Starten Sie KSnapshot
entweder über das Grafikmenü im Kpanel (K->Grafik->Schnapschuß) oder
tippen Sie ksnapshot auf der Kommandozeile.
Der Dialog "Befehl ausführen" (über Alt-F2) kann ebenfalls zum Aufrufen von KSnapshot benutzt werden.
Beim Start schießt KSnapshot ein Bild Ihres Desktops und präsentiert Ihnen dieses verkleinert im Fenster auf der rechten Seite . Sollten Sie lediglich ein Bild Ihrer aktuellen Oberfläche machen wollen, geben Sie im Feld Dateiname einen beliebigen Namen ein und klicken auf den Speichern-Button.
In der Sektion Optionen können Sie festlegen, was letztlich in Ihrem Snapshot enthalten sein soll: Wenn Sie den Punkt Nur Fenster aufnehmen, das den Cursor enthält aktivieren, lichtet KSnapshot Ihnen nur das Fenster ab, das Sie via Mausklick aktiviert haben. Ist das Feld nicht aktiviert, wird automatisch ein Bild des gesamten Desktops erstellt. Eng damit zusammen hängt die Option Fenster automatisch nach vorn, die nur in Verbindung mit aktiviertem Nur Fenster aufnehmen, das den Cursor enthält funktioniert. Mit ihr verfrachtet KSnapshot das ausgewählte Fenster automatisch in den Vordergrund, bevor es für das Fenster Bitte lächeln, hier ist das Vögelchen heißt...
Option KSnapshot-Fenster verbergen. Wenn man aufnimmt , versteckt sich KSnapshot in den Hintergrund, sobald Sie den Aufnehmen-Button anklicken, und bleibt solange unsichtbar, bis der Screenshot fertiggestellt ist.
Der Aufnehmen-Button dient als Auslöser Ihrer KSnapshot-Kamera. Einen Vorgeschmack auf das Endergebnis gibt Ihnen dabei jeweils das verkleinerte Abbild rechts im Preview-Fenster, das Sie mit einem Klick mit der linken Maustaste auf Vollbildgröße wachsen lassen können. Im Feld Verzögerung können Sie die Sekunden einstellen, die zwischen dem Klicken des Aufnehmen-Button und dem tatsächlichen Snapshot liegen sollen.
Abspeichern läßt sich der Screenshot durch einen Klick auf den Speichern-Button. Dabei können Sie - wie schon eingangs erwähnt - das gewünschte Dateiformat im Pulldown-Menü unter dem Feld Dateiname einstellen.
Orginaltexte
Troubleshooters.Com and T.C Linux Library Present
The Lazy Man's Way to Linux Screenshots
Copyright (C) 2000-2001 by Steve Litt
[ Linux Library | Troubleshooters.Com | Email Steve Litt | Copyright Notice ]
This page documents two different methods of taking Linux screenshots:
import screenshot method (preferred)
xwd screenshot method (plan b)
Cropping your screenshot with Gimp
Because the import method is a one step method, and because you can use it to modify the resolution, it is superior.
The Import Screenshot Method
The following assumes a Linux box named servername and a user named username, with which you do your examples for your documentation.
From the console, log into your xserver as the same user as you're doing your Samba testing with (username)
Make sure you're at the screen resolution and color depth specified by your publisher, or greater. Best images occur when the screen resolution and color depth *exactly* match your publisher's specification.
Close all windows, move all buttonbars to the side.
From another box, open a telnet into your Samba server, using user username. This can also be done with a virtual terminal.
Run the program for which a screenshot must be taken, from the command prompt in the telnet session. The trick is to use the display option, i.e. ----
$ netscape -display servername:0 &
Note that unless you have more than 1 keyboard or 1 monitor attached to the server, the display is always boxname:0
On the server X console, do whatever you need to do to get the shot lined up. This includes setting exactly the right window as active, putting the mouse pointer out of the way or pointing to a menu selection, etc.
From the telnet session, logged in as username (this will fail otherwise), take your screenshot with this command:
$ import -window root -display servername:0 myfile01.pcx
Repeat the preceding steps for all your screenshots, using different filenames.
Finally, since you're in as username, you don't have to ftp them back and worry whether you have ascii or binary. Just Samba them back :-)
Resolution and Color Reduction
You can use options in the import utility to reduce the resolution and colors of the screenshot. It's important to note that doing so may decrease the image quality below that you'd obtain reducing the Linux box's resolution and color. Check with your publisher to see if on the fly resolution and color reduction are acceptable.
To reduce the resolution, use the -geometry option as follows:
$ import -window root -geometry 640:480 -display servername:0 myfile01.pcx
To reduce the number of colors, use the -colors option. Typically, color reduction leads to speckling and other problems. These can be minimized with the +dither option. The following command takes a screenshot and reduces it to 16 colors:
$ import -window root -colors 16 +dither -display servername:0 myfile01.pcx
It's important to note that although the number of colors are reduced, the number of bits is not reduced. It takes a separate conversion to do that. The convert command with the -depth option can reduce the color depth to 8 bits.
Hope this works as well for you as it does for me. It consistently gives me the screenshots required by my documents. Obviously, it doesn't help with Windows screenshots.
Steve Litt
The xwd Screenshot Method
The following assumes a Linux box named servername and a user named username, with which you do your examples for your documentation.
From the console, log into your xserver as the same user as you're doing your Samba testing with (username)
Make sure you're at the screen resolution and color depth specified by your publisher.
Close all windows, move all buttonbars to the side.
From another box, open a telnet into your Samba server, using user username. This can also be done with a virtual terminal.
Run the program for which a screenshot must be taken, from the command prompt in the telnet session. The trick is to use the display option, i.e. ----
$ netscape -display servername:0 &
Note that unless you have more than 1 keyboard or 1 monitor attached to the server, the display is always boxname:0
On the server X console, do whatever you need to do to get the shot lined up. This includes setting exactly the right window as active, putting the mouse pointer out of the way or pointing to a menu selection, etc.
From the telnet session, logged in as username (this will fail otherwise), take your screenshot with this command:
$ xwd -display servername:0 -root > myfile.dmp
Repeat the preceding steps for all your screenshots.
When done, you can mass convert all the .dmps to .pcx's with this script, run while in the directory containing the .dmp files:
#!/usr/bin/perl -w
#################################################################
# mconvert.pl by Steve Litt. Copy freely, N O W A R R A N T E E
#################################################################
my(@files) = glob "*.dmp";
my($src);
my($dst);
foreach $src (@files)
{
$src =~ m/(.+)\.dmp/;
$dst = $1 . ".pcx";
print "$src-->$dst...";
system("convert $src $dst");
print "\n";
}
print "DONE.\n";
Note that you can change the destination file type by replacing the ".pcx" in $dst = $1 . ".pcx"; with whatever file type is appropriate.
Finally, since you're in as username, you don't have to ftp them back and worry whether you have ascii or binary. Just Samba them back :-)
Cropping Your Screenshot with Gimp
Always crop before you color reduce!!! Otherwise, extraneous colors will muddy your color reduction!!!
Pull whatever.png up in Gimp. Press Shift-C on the keyboard to begin a crop, and drag an area around the window or menu or other point of interest. Make sure the area is "loose", meaning it includes material outside the needed window or whatever. Now press the crop button, and the image is cropped to the area of interest plus a small extraneous area around it. Elapsed time, maybe 10 seconds. Now go in for the accurate crop.
Press the equal sign on the keyboard several times (8 is good), to magnify the image. Use the scroll bars to get to the upper left corner of the image where you can see the upper left corner of the area of interest. Press Shift-C on the keyboard, and position the centers of the crosshair arms to coincide with the edges of the area of interest. Press the left mouse button and drag right and down. Note that the entire screen scrolls as you drag. Drag until you can position the center of the crosshairs on the edges comprising the lower right corner, then release the mouse button. Click the crop button, and you've cropped accurately to the pixel. The fact that you magnified the screen with the equal sign is what allowed you to-the-pixel accuracy. Now reduce magnification by repeated presses of the minus key. Save the image.
Color Reducing the Screenshot
Always crop before you color reduce!!! Otherwise, extraneous colors will muddy your color reduction!!!
Create the following script. I call it reduce16.sh:
#!/bin/sh
convert -depth 24 $1 $1
convert -depth 16 $1 $1
convert -depth 8 $1 $1
convert -colors 16 $1 $1
The preceding script takes a graphic file as its single argument. It reduces it to 24 bit color, then 16, then 8, then finally down to 16 total colors. Why all the steps when the very last statement would do the entire reduction?
The problem is that this reduction is accomplished by algorithms that map similar colors together. If it needs to map thousands of colors down to 16, some very bad compromises will be made. But if it maps thousands to hundreds to 256 to 16, there will be no drastic mappings, and each step will do the right thing.
In fact, if you reduce directly to 16, the graphic might look pretty good in Gimp or Paintshop pro, but very bad in Netscape, where you really want it to look good. So run the graphic through reduce16.sh, and it will be perfect for a web based screenshot.
You've reduced the area to what you want, but bandwidth considerations require a reduction to 16 colors, and that's not intuitive or easy. Read on...
Summary
Hope this works as well for you as it does for me. It consistently gives me the screenshots required by my documents. Obviously, it doesn't help with Windows screenshots.
Steve Litt