Ok, found this for X windows:
FVWM Forums • View topic - Thumbnailing a Window on another Viewport
As to why you can't access a window (that is, take a picture of it when it is not on the same desk/page as the current viewport) is because windows that are not on the current page are unmapped. This is true when one changes pages/desks -- the windows are unmapped, and the windows on the current viewport are remapped.
So, I guess that means what I want is impossible? Although there are two workarounds:
- use
xrandr
to increase the virtual size of (each of the four) viewports
This is what works for me - first query to see which output you want, then execute:
$ xrandr -q
Screen 0: minimum 320 x 200, current 1024 x 600, maximum 4096 x 4096
LVDS1 connected 1024x600+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024x600 60.0*+
800x600 60.3 56.2
640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
$ xrandr --output LVDS1 --panning 1600x768
... see also X/Config/Resolution - Ubuntu Wiki
- Use
xvfb
for virtual render
Got this via x11 - Remote offscreen rendering - Server Fault, also see Xvfb - Wikipedia, the free encyclopedia for examples. This is what worked for me - each command goes in own terminal (as some of them are meant to be services)
# start xvfb as display 1 - note the "screen 0" there refers to "its own" screen 0; should set it to 24-bit color
Xvfb :1 -screen 0 1600x1200x24 -pixdepths 3 -fp /usr/share/fonts/X11/Type1
# start metacity on display 1 (would start gdm, but [Bug #598848: gdm no longer works with xvfb](https://bugs.launchpad.net/bugs/598848)
# needed to we have title bars, and possibility to move windows around
DISPLAY=:1 metacity
# start application (here web-browser arora) again on display 1
DISPLAY=:1 arora
# start vnc server, which will bridge display 1 to port 5900
# note - this command exists, however starts a server in background
x11vnc -display :1 -bg -nopw -listen localhost -xkb
# start vnc viewer on port 5900 - so we can see display 1:
# note also - when vncviewer exits, it also will kill the x11vnc server
vncviewer -FullColor=1 localhost:5900
The problem here is that not all parts of the OS are initialized - so there are no window decoration, and only basic X fonts; although, apps may find their own fonts, as seen below:
xvfb
looks almost ideal to me - since I could basically set up an "invisible" environment, as big as I want, and take screenshots directly from it (using xwd
). The problem is that I cannot have a window on "my" DISPLAY=:0, then switch it to the 'virtual' DISPLAY=:1 for screenshotting, then bring it back to DISPLAY=:0. Then one must set up an application specifically for xvfb
; and if so happens you need more size - then the whole chain above needs to be restarted.
On the other hand, I find working with 4 workspaces and large viewports (shwere the mouse moves you around within a viewport) a bit confusing - then again, can change the size there on the fly and nothing needs to be restarted; and plus I can use any of the usual screenshot tools (but I'd still have to switch viewports).
Needless to say, I'd still love to hear about a possible command line solution that could do this kind of screenshotting in one go :)
You can use VLC or scrot for this task.
Using VLC
This method allows you to make a screenshot using VLC, which is a very common program. To install VLC, use sudo apt-get install vlc
- Start up VLC and open your video
- Make the video fullscreen ( double click the video or press
F11
)
- Go to the time or frame where you would like your screenshot and press pause (this isn't really necessary since VLC can take snapshots on the fly, but this will help you get an exact frame)
- Right click anywhere on the video, and go to
Video -> Take Snapshot
- Your video will be saved in the default snapshot directory
~/Pictures/
as xxxx-xx-xx-xxhxxmxxs.png
(the directory to save screenshots can be changed by going to Tools -> Preferences -> Video -> Video Snapshots
and changing the directory setting.
Using Scrot
This method isn't as elegant as the one above, but it will work with most video players.
Scrot isn't installed by default, so you may have to use sudo apt-get install scrot
.
- Pause your video player.
- Open terminal
- Issue the command
sleep 10 && scrot /path/to/new/image
(obviously change /path/to/new/image)
- Quickly change to your video in fullscreen
- Wait
Using Scrot + Keyboard Shortcut
Now, this method can be quite annoying to use, so let's bind it to a shortcut.
- Open System Settings (This can be found in the dash.
- In the Hardware section, go to
Keyboard -> Shortcuts -> Shortcuts
- Now click the plus "+" button, and give your new command a name (e.g. "Screenshot"), and for the command type in
scrot -e 'mv $f /your/pictures'
(As always, change the directory to your liking)
- Now click on where it says "Disabled" next to your command, and the text should change to "New accelerator...", enter your new keystroke in.
- (Optional) If you want to remove the existing keystrokes for PrintScreen, you can click on the left side where it says "Screenshots" and remove each key-binding manually.
You can look scrot's documentation for more powerful features. man scrot
Best Answer
Shutter
Shutter is a feature-rich screenshot program. You can take a screenshot of a specific area, window, your whole screen, or even of a website - apply different effects to it, draw on it to highlight points, and then upload to an image hosting site, all within one window.
You can set the size of default selection in it's Preferences. Go to Edit > Preferences > Advanced and change the value of start with selection size of.
You can get more details about Shutter on it's website.