In today's part we'll have a look at an application, that I've (again) grown so used to, that I consider it part of the Workspace itself - KSnapshot.
I remember doing screenshots on my old Win XP machine - press the print screen key, open up MS Paint, paste the image there and save. That's so last-century. I don't know how it works these days in Win7, but feel free to let me know below in the comments. OS X went one step further - after you press some magic key combo (which I could never remember), the image is saved on your desktop. But the fearless KDE developers went even further.
After you press the print screen key, the KSnapshot pops up with little window and your screenshot in it. From here you can either save the image to a format and place of your own liking (clever automatic file numbering included). However if you don't like the screenshot you just took, you can easily trigger a new one, even with different options, without the file being saved (which is useful for not wasting space and for saving some time from the need to delete the incorrect screenshots). Automated/batch saving of screenshots could be handy, though I've never had a need for it yet.
The main KSnapshot window allows you to select what screenshot you actually want to take. "Full Screen" obviously captures the full screen. "Window under cursor" will create a screenshot of only the window you are pointing at. This is awesome with enabled KWin compositing as it will capture the window's shadows on transparent background (provided you save it as png; that's for example how the screenshot above was made). "Rectangular region" and "Freehand region" lets you manually select the area you want captured. The last mode is "Section of window", which captures only the selected portion of window, highlighted on mouse over. This way you can take clean screenshot of just a toolbar, just the inner view of the window or some other part.
Great feature is the possibility to set a timer for the capture. So let's say you want to take a screenshot of something, that you need to prepare first, like opening a menu (which would get closed by running KSnapshot). So you set the timer to 10 seconds, press the big "Take a New Screenshot" button and then simply do your thing while watching the countdown on top of the screen. KSnapshot window itself hides during this countdown so it does not get in the way and reappears after the timeout, with the new screenshot.
Once you have the screenshot ready, you can either open it directly in system associated application for images, copy it to the clipboard or export it to a supported service (through kipi-plugins), which includes Facebook, Picasa, popular Czech site rajce.net, Flickr and tens others. Of course you can email the image or print it as well.
Saving image is pretty straight forward, so I'll rather show you a great example of quick screenshots sharing with your friends. First of all you need the "Pastebin" plasmoid (don't confuse it with "Paste" plasmoid which has the same icon, but does a different thing). Add it to some panel and configure if needed (default imagebin is wstav, but you can choose from several image sharing services - wstav.org, imgur, Simplest Image Hosting and img.susepaste.org; if you have some c++ skills, you can easily create your own backend). Once it sits in your panel, you can share you screenshots just by dragging them from the KSnapshot window directly and dropping it onto teh plasmoid. After few seconds you have a link to your uploaded image ready for pasting in your clipboard, so all you have to do is press ctrl+v and you're done. Simple, fast and powerful.
You can also drag&drop the image to anything that accepts image drops, for example your opened image editor, document you're writing or also Plasma Desktop, in which case it will offer you to create a Picture frame (this works for any images dropped on desktop, not just those from KSnapshot).
So that's how we work with screenshots in KDE Workspace (note, that all that is mentioned here, is the standard part of KDE SC, you don't have to install anything additional for this to work). If you have ideas for KSnapshot or if you'd like to share how you use KSnapshot to make your work easier, be sure to leave a comment.
Before I close this part, I'd like to invite you all to Plasma Bug Days, which will be held this Friday and Saturday (December 2nd and 3rd), more info on Aaron's blog. Come give us a hand if you want the 4.8 release to really rock!
You can also always support KDE by Joining the game!
> After you press the print screen key
Where is this configured? I've two settings in:
System Settings ->
Accellerator keys and gestures ->
Global keys ->
kwin
In this menu there are [alt][prt] to capture a window and [ctrl][prt] to capture the desktop to the clipboard. When I use [all][prt], nothing appears in my clipboard and pasting in e.g. kword, gives me only text.
Anything to configure, to get this working correctly?
What I very much would like to see in ksnapshot is the ability to draw e.g. a red square, ovale or the like in the taken screenshot. Or to draw a nice looking arrow (with shadow etc) to pinpoint a location in the screenshot. Gimp can be used to draw the square or
the ovale, but the nice looking arrow is not possible.
Gimp is actually too big for this use case (drawing squares and arrows and don't let forget text).
Anyway there are quite some feature requests for ksnapshot at http://bugs.kde.org/
Posted by: Openid | Sunday, 27 November 2011 at 17:06
Opening the "send to" menu takes over 4 seconds on my dual core Intel, 4GiB machine. A feature request to remove them is here:
Remove unused "Send to" entries
https://bugs.kde.org/show_bug.cgi?id=287663
Posted by: Dotan Cohen | Sunday, 27 November 2011 at 18:33
@Openid - It's in System Settings -> Shortcuts and Gestures -> Global Keyboard Shortcuts -> khotkeys -> PrintScreen
It should work without any configuration as that's how it is configured by default. As for your KWin shortcuts - I don't see this here, so can't really help, sorry :/
@Dotan Cohen - yeah, there's another factor that makes the loading so slow, I was about to look into it, but never found the time. I might have an idea how to fix this properly, but the time is sooo limited. We'll see :)
Posted by: Marty | Sunday, 27 November 2011 at 19:55
The Win7 way is the way you described for XP. I got used to ksnapshot as well, but I don't use it that much ;-).
Posted by: Georg Grabler | Monday, 28 November 2011 at 11:09
s/caputred/captured
Posted by: Softwareandunicycles.wordpress.com | Tuesday, 29 November 2011 at 14:09
@Georg Grabler - Thanks for letting me know :)
@Softwareandunicycles - Thanks, fixed :)
Posted by: Marty | Tuesday, 29 November 2011 at 14:13
Ksnapshot is indeed a very useful tool i don't see myself working without it, or worse the way windows do, it's so 1900's.
The "send to" menu takes over 4 seconds in my setup too
---
Can you please share your wallpaper? I really liked it!
Posted by: Alejandro Mancera | Wednesday, 30 November 2011 at 15:43
@Alejandro Mancera - I had an idea to move the kipi-plugins (which cause that delay) to a separate submenu, that way, it would show you immediately the menu for opening in apps and the delay would be only in the submenu.
The wallpaper is Kaire -- http://kde-look.org/content/show.php/Kaire?content=143524 -- though you might have to modify it a bit to fit your resolution (or bug the author to do more resolutions available ;)
Posted by: Marty | Wednesday, 30 November 2011 at 15:48
Oh thanks.
Yeah, I think that would be better.
Posted by: Alejandro Mancera | Wednesday, 30 November 2011 at 15:56
excuse me, what about the color scheme you use? it's very classy, as the whole desktop, specially tray icons.. if only 48 was like this..! ;)
Posted by: josephk | Saturday, 10 December 2011 at 01:17
@josephk - To be honest, I`m not really sure. This color scheme comes from some Bespin theme I installed months ago and I have it since, even though I switched to Oxygen. I can probably send you the config if you want :)
Posted by: Marty | Sunday, 11 December 2011 at 00:22