I'm running OpenSuse with dwm as a window manager. Since I made the switch from KDE, I haven't found a way to take a screenshot or even capture part of my screen.
Is there a way I can do this in a command-line environment?
I'm running OpenSuse with dwm as a window manager. Since I made the switch from KDE, I haven't found a way to take a screenshot or even capture part of my screen.
Is there a way I can do this in a command-line environment?
ImageMagick comes with the import utility to take screenshots. It has tons of options, but by default it lets you draw a rectangle on the screen and saves just that portion. If you want an entire window you can use -window ID; the identifier "root" captures the entire screen
The euphoniously named scrot takes screenshots from the command line...
It has a couple of simple options, including a time delay and image quality.
If you are wanting to take a shot in the console, and you are running a framebuffer, then you can use fbgrab.
I have been using Shutter under Xmonad without any desktop environment and it has been working well. Shutter is a GUI app with a decent amount of features.
Most of the time I would type "shutter -s" in a launcher/terminal and the program will let me choose the area of the screen that I want to capture. Then I hit Enter and the file will be saved to my home folder.
If you are looking for minimalistic solutions, your Xorg server might already comes with a tool called xwd. If not, and you'd install it separately, it might be the lightest possibility - the binary is just 27 KB in size. Watch out, because it outputs data on stdout!
But the problem with xwd is that it dumps the screenshot in an XWD X Window Dump image data format, not a standard image. You can view such dumps with a companion xwud program (run xwud -in yourdumpfile). To get a typical image file, you'd need to convert it using something like xwdtopnm or convert (from ImageMagick).