LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Quick screen shots in linux? (https://www.linuxquestions.org/questions/linux-newbie-8/quick-screen-shots-in-linux-801386/)

Rick_Nystrom 04-11-2010 01:29 PM

Quick screen shots in linux?
 
As a user coming from the windows world, one feature that I really hope linux has in it is the following that I found myself using quite often in windows:

When I want to capture the screen to a file in windows I can just hit the keys shift+PrintScreen (to copy the current window to the clipboard) or Ctrl+PrintScreen (to capture the entire display to the clipboard). I then merely open up MS Paint, and hit Edit|Paste and am able to save the window/screen shot to a jpg file.

Is there a similar way to do such a thing in linux? I know I'm not mentioning a distro, and this might vary from one to another, but I haven't yet decided on a distro to stick with for now. (So many choices!)

Many TIA!

Tinkster 04-11-2010 01:37 PM

It's more of a matter of DE/WM as to how this can be done.
KDE certainly has a hot-key feature (that may not be enabled
by default), and with fluxbox I use
ImageMagicks import (bound to two different hot-keys to achieve
the respective result) - I don't copy to clipboard, though, I
save to a time-stamped file directly.



Cheers,
Tink

XavierP 04-11-2010 01:42 PM

As far as I am aware, KDE uses the same keys. At least, the last time I needed a screenshot I didn't use any keys I hadn't used before. Not sure about Gnome though.

fbsduser 04-11-2010 01:49 PM

Gnome-screenshot for gnome/Xfce
Ksnapshot for KDE

clifford227 04-11-2010 02:06 PM

I use fluxbox, which has hotkeys (so like whats already been mentioned, you'd need to find out how your desktop environment/window manager handles that).

so I have a hotkey calling the ImageMagick program with this commandline:

Code:

import screenshot.png && display -resize 75% screenshot.png

Rick_Nystrom 04-11-2010 05:36 PM

Wow! Again, so many choices! Many thanks to all who replied. I really appreciate you taking the time. I'm getting there. Slowly, but surely, but I am getting there.

Thanks all once again!
Rick

Cotun 04-12-2010 12:18 PM

I also use Fluxbox, and I once found a script that makes taking screenshots pretty easy. I never saw any need to replace it.

Code:

#!/bin/bash

DIR="${HOME}/screenshots"
DATE="$(date +%Y%m%d@%H%M%S)"
NAME="${DIR}/screenshot-${DATE}.png"
LOG="${DIR}/screenshots.log"

# Check if the dir to store the screenshots exists, else create it:
if [ ! -d "${DIR}" ]; then mkdir "${DIR}"; fi

# Screenshot a selected window
if [ "$1" = "win" ]; then import "${NAME}"; fi

# Screenshot the entire screen
if [ "$1" = "scr" ]; then import -window root "${NAME}"; fi

# Screenshot a selected area
if [ "$1" = "area" ]; then import "${NAME}"; fi

if [[ $# = 0 ]]; then
  # Display a warning if no area defined
  echo "No screenshot area has been specified. Screenshot not taken."
  echo "${DATE}: No screenshot area has been defined. Screenshot not taken." >>            "${LOG}"
else
  # Save the screenshot in the directory and edit the log
  echo "${NAME}" >> "${LOG}"
fi

Save the script with the name "screenshot" and then type "chmod +x screenshot" to make it executable. After that, it can be run in one of the following ways depending on what you want.

screenshot win
screenshot area
screenshot scr

All screenshots taken are then saved to /home/<user>/screenshots

Hope this helps :)

Cotun

MTK358 04-12-2010 01:46 PM

Try the "scrot" command-line program.

bjrn64 04-13-2010 03:46 PM

hi welcome to LQ in ubuntu applications/accessories/take screenshot

alternative /system/preferences/keyboard shortcuts (its set to print screen but you can apply your own shortcut easily

good luck


All times are GMT -5. The time now is 11:40 PM.