Skip to content

Any tools out there to take scrolling screenshots? Like how Firefox has a built-in method of taking a boxed screenshot that scrolls with the page (producing images larger than your screen). But for anywhere, e.g. in the terminal, in a file explorer, programs like Discord, etc etc?

Essentially I'm looking for a program that can take scrolling screenshots? That is you can select a box like with normal screen selection screenshots, but which can also scroll to take images larger than what's on screen?

Firefox (and I'm sure Chrome) has this feature already. Just right click -> Take Screenshot, then you can scroll through the page and the selection box "sticks" to the page.

9 points7 comments
Open on Reddit
About this post
Posted
Archived
Score
9 · 92% up
Kind
Text
ID
10943o7

Author

5
posts
7
comments
2
media
View profile

7 comments

OK, there's three ways I can think of.

Method 1: automatic scrolling script

The first is to write a script that does the screenshooting and scrolling automatically. you will need to install xdotool to simulate the mouse wheel, scrot to take the screenshots, and image-magick to stich screenshots together into one long image. I imagine your script would look something like this:

#!/bin/bash
for i in $(seq 10) # Repeat 10 times
do
    # take a full-screen screenshot and save it to 0.png, 1.png, 2.png, and so on...
    # you will probably want only a part of the screen. For this you will need the `-a` option.
    # You can read more in `man scrot`.
    scrot -o $i.png
    # Scroll down by 10 steps. Replace 5 with 4 to scroll up
    xdotool click --repeat 10 5
done

# Stitch images together and save to 'scrot.png'
# the `convert` command is provided by image-magick.
# `sort -n` makes sure that the images are in order.
convert -append $(ls *.png | sort -n) scrot.png

Of course you will have to fiddle with the --repeat parameter and how many times you need to take the screenshots, which can get very annoying.

Method 2: very tall virtual monitor

Another method is to create a very long virtual display that would allow the window you're trying to screenshot to display all of its content simulataneously, without needing to scroll. You will first need to create a dummy monitor. On my system (void linux), I had to install xf86-video-dummy, which added a VIRTUAL1 monitor to my list of monitors (you can check by running xrandr). On Ubuntu, this package seems to be called xserver-xorg-video-dummy, by the way. If you cannot get the dummy driver to work, you can also pick any unused monitor given by the xrandr command. From this point on, follow the following steps (I'm using VIRTUAL1 as my dummy monitor):

  • Create a new display mode with the following command: xrandr --newmode VERY_TALL $(cvt $WIDTH $HEIGHT 60 | tail -n 1 | cut -d '"' -f 3) (replacing $WIDTH and $HEIGHT with the desired values, for example 1680 and 4000)

  • Apply the new mode to you virtual monitor with xrandr --addmode VIRTUAL1 VERY_TALL

  • From now on, you can use your desktop environment's display configuration utility to enable VIRTUAL1. If you don't have a desktop environment, you can install the application arandr to do this.

  • Now, move the window you want to screenshot over to VIRTUAL1 and make it fullscreen/maximised.

  • Finally, take the screenshot. You can use scrot and then simply click on the window. It'll be a little awkward though, since you can't actually see the window.

  • You can now disable VIRTUAL1.

Be careful with this though, making too big of a virtual monitor can make your computer freeze for a while.

Method 3: scale your current monitor.

OK, this is probably the simplest method. it's similar to method 2, but with less steps.

  • Find out what your current monitor is called. You can do this either with your desktop environment's monitor configuration tool, or by running xrandr and seeing which ones are connected. My laptop's built-in display is called eDP1, so I will be using that

  • Make the monitor four times bigger by using xrandr --output eDP1 --scale 4x4

  • Stretch the window until it fits all desired content and take the screenshot

  • Set the monitor to normal size with xrandr --output eDP1 --scale 1x1

Keep in mind that, while the window's contents may look smaller when you scale the monitor, in the screenshot they will be at the same resolution as normal.

3 points

Browsers can do it because they "only" have to render the visible html, css, etc. The rest still exists, just outside of your view. That's usually not the case for anything outside of browsers though so it'd be Incredibly hard to create something similar

2 points

I don't think it'd be very hard to create a tool that simulates scrolling (using touch events for precise scrolling, for example), taking a screenshot for every N units scrolled, and later stitching the screenshots together into a larger one. This is almost exactly how scrolling screenshots work on Android, for example.

I don't think I've come across a tool that actually does this in practice, though.

1 points

There are chrome/firefox extensions that will screenshot the whole page. Basically just a macro that scrolls and takes a picture and scrolls again and then takes another picture. Then it just adds them to each other.

1 points

Have you considered using another window system like vnc or xnest inside your own, with a higher resolution than your desktop? You could then maximize the window in question inside that windowing system and then take a screenshot of the vnc window.

1 points

Haven't seen any for Linux but for Windows there's a couple, e g ShareX and PicPick, so, it's definetely doable unless there's some kind of Linux limitation.

0 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.