Thursday, December 15th, 2011
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 ImageMagick – import 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 ) &
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 😉
Tags: bit, Button, classical game, cmd, Desktop, desktop environment, exact screen, first command, FreeDooM, fullscreen, game arcade, game reviews, game scene, Gnome, GNU, gnu linux, gui environment, how to take a screenshot, ImageMagick, import, import command, import window, launch, Linux, mplayer, PrtScr, root, root window, running game, screen, screenshot, shooter, sign, sleep, software, something, timing, VLC, xterm
Posted in FreeBSD, Linux, Linux and FreeBSD Desktop, Various | No Comments »
Friday, November 25th, 2011
There are two handy Windows commands which can be used to renew IP address or flush prior cached DNS records which often create problems with resolving hosts.
1. To renew the IP address (fetch address from DHCP server)
C:> ipconfig /release
C:> ipconfig /renew
In above cmd ipconfig /release will de-assign the IP address configured on all Windows LAN and Wireless interfaces, whether ipconfig /renew will send request for IP address to the DNS server.
To unassign and assign again IP address from DHCP server only for a particular LAN or WLAN card:
C:> ipconfig /release LAN
C:> ipconfig /renew LAN
C:> ipconfig /release WLAN
C:> ipconfig /renew WLAN
2. Adding specific routing to Windows
Windows has a Route command similar by syntax to Linux’s route command.
To add routing via a specific predefined IP addresses on Windows the commands should be something like:
C:> Route add 192.168.40.0 mask 255.255.255.0 192.168.41.253
The first command adds IP 192.168.40.0 in the network of 255 hosts to be routed via 192.168.41.253
C:> Route add 0.0.0.0 mask 0.0.0.0 192.168.41.254
The second one adds 192.168.41.254 as a default gateway for all outbound traffic from the Windows host.
To make permanent routing -p switch is used.
3. To clear Windows DNS cache (flush DNS cached records)
C:> ipconfig /flushdns
This will clear all IP records corresponding to hostnames previously cached on the Windows host. Using ipconfig /flushdns is especially handy when IP address for a specific DNS host is changed. Flushing the Windows DNS cache can save us a lot of waiting before the domain example.com starts resolving to the new IP address let’s say 188.8.131.52 instead of the old one 184.108.40.206
Tags: Cache, card, card c, com, command, configured, default gateway, DHCP, DNS, dns host, dns server, domain, domain example, first command, flush dns cache, flushdns, gateway, host, hosts, how to renew ip address, ipconfig, ipconfig flushdns, ipconfig release, mask, network, outbound, outbound traffic, predefined, records c, release c, request, Route, routing, server c, something, switch, unassign, Vista, windows commands, windows lan, WLAN, WLANC
Posted in System Administration, Windows | 1 Comment »