Posts Tagged ‘PrtScr’

How to take a screenshot of a game or Full Screen running program inside GNOME or KDE desktop environment on GNU / Linux and FreeBSD

Thursday, December 15th, 2011

Image Magick logo take screenshot of fullscreen running program with import on Linux / FreeBSD

I’m writting some game reviews and movie reviews, every now and then and therefore being able to capture a fullscreen running program like let’s say mplayer or vlc or some full screen running game is something I really need.

The usual PrtScr button which normally works to prepare screenshots in GNOME or KDE, however is not working if the root window handler is being passed to a different program than the Window Manager and pressing it while inside of many older programs or applicationsdoes not produce a print screen of the current screen.

Anyways I found a hack to this using the good old ImageMagickimport command line screenshotting program.

To take a screenshot of a certain program run from gnome-terminal or konsole using import cmd its possible to use a quick one liner which will take a snapshot of the root Window the started program will use.

Let’s say you want to make a screenshot of the entry screen of the FreeDOOM (DooM 3d shooter classical game arcade free Software Alternative).

Launch gnome-terminal or konsole , xterm , depending on the GUI environment you use and issue the commands:

debian:~$ ( sleep 15; import -window root my_desired_screenshot_name.png ) &
debian:~$ freedoom

The first command will launch import after a sleep of 15 secs and therefore will screenshot the active window which will be at focus after 15 seconds, where the & sign will background it and the second one will launch FreeDooM . You will have to wait for a certain secs and switch to the exact screen you will want to screenshot.
If you want to screenshot some game scene that will appear in 20 minutes change above sleep 15 cmd to be to something like sleep 180
That method can be used for screenshotting any other program running on fullscreen, the method is a bit inflexible as you will have to adjust a timing but it works fine 😉

How to Screenshot single Windows on GNU / Linux GNOME Desktop

Friday, October 28th, 2011

Every now and then I have to screenshot particular windows positioned on the screen on my GNOME Desktop envronment
Recently I was happy to find there is a very easy way to do this with the default Screenshotting program that is bundled with gnome gnome-screenshot

To screenshot a particular window using gnome-screenshot , its quite easy all one has to do is point the mouse cursor to the window he wants to snapshot and press:

Alt + PrtScr (Print Screen)

Here is a screenshot, I’ve taken of my gnome-terminal using the above command:

Particular window Screenshot Window screenshotting using GNOME gnome-screenshot

One can do it also via the command line using the /usr/bin/gnome-screenshot , by pressing Alt + F2 to invoke the run application and type in:

/usr/bin/gnome-screenshot -w

 

I was quite happy to find out that this is possible on Linux inside gnome without bothering to run GIMP or use any external programs for the cause. Hope this helps someone 😉