Recommended Free Tools
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Short answer: PyAutoGUI’s screenshot function accepts a region as (left, top, width, height). If monitor 2 occupies (1920, 0, 1920, 1080) in your operating system’s virtual desktop, this captures that rectangle:
import pyautogui
region = (1920, 0, 1920, 1080)
pyautogui.screenshot("second_monitor.png", region=region)
Those numbers are only an example. More importantly, PyAutoGUI’s own documentation says it currently works only on the primary monitor and is unreliable on secondary displays. A correctly calculated region can therefore still produce a primary-screen, blank, shifted, or failed image.
What the region tuple means
The region argument is a four-item tuple in this exact order:
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problems- left — the monitor’s x-coordinate in the virtual desktop
- top — its y-coordinate in the virtual desktop
- width — the monitor’s pixel width
- height — the monitor’s pixel height
PyAutoGUI uses a top-left origin. x increases to the right and y increases downward. A monitor placed to the left of the primary display has a negative left value; one above it has a negative top value. A monitor can also have a positive offset, such as top=120, when the displays are vertically misaligned.
#1 Best Overall
- Full HD Portable Monitor - MNN 15.6inch portable laptop monitor with 1920*1080 resolution, advanced IPS glossy screen support 178° full viewing angle, it renders accurate and bright color, draws you into the video or game with lifelike colors and amazing detail.It can effectively reduce blue light radiation damage, no flickering, eye-care, and make it easier to watch for a long time.A second monitor for working from home.
- Double Type-C Port -For Plug & Play, the MNN monitor provides 2 Full Feature Type-C ports. Only One USB Type-C Cable is required to connect to the power supply & display signal transmission. NOTE: Your device should support thunderbolt 3.0 or USB 3.1 Type C DP ALT-MODE.which supports multiple connect ways to your laptops, PC, Phones, Macbooks, PS5/PS4, Xbox, and Switch.
- Lightweight Ultra Slim for Travel - As a portable external monitor,MNN portable laptop monitor easily accommodate to every suitcase and backpack and stress-free when you are holding it for a long time. They are truly portable computer monitors for travelers, students, gamers,engineers, and everyone.
- Give consideration to work and games - through multiple display modes [Copy Mode/Extended Mode/Second Screen Mode/Portrait Mode], we can bring you a clear second screen in the meeting, and expand the screen anytime and anywhere to improve work efficiency and improve the quality of life. Adjusting to HDR mode can upgrade the image to a new level, providing you with brighter highlights,deeper and more realistic colors, more realistic images, and amazing viewing/gaming experience.
- Powerful Smart Cover - MNN portable external monitor can work in both landscape and portrait mode, can be used as a gaming monitor, screen extender for laptop or phone. Comes with a scratch-proof smart cover made of durable PU leather exterior, doubles as a stand, provides comprehensive protection for this portable computer monitor.
For example, if your primary display starts at x=0 and is 1,920 pixels wide, and the second display is directly to its right at 1,920 × 1,080, the rectangle is (1920, 0, 1920, 1080). If the second display is to the left, it may instead be (-1920, 0, 1920, 1080). Do not copy either value without checking your own display arrangement.
How to find monitor 2’s coordinates
1. Confirm the physical display arrangement
Open your operating system’s display settings and identify which panel is monitor 2. Make sure it is enabled, not disconnected or set to “show only” on another display. Drag the on-screen display rectangles until they match the physical arrangement. The rectangle’s position relative to the primary display determines left and top.
2. Read the rectangle’s size
Use the display’s configured pixel resolution for width and height. Scaling can make the logical desktop coordinates differ from the monitor’s physical pixel count. If a capture is consistently offset or cropped, treat DPI or display scaling as a likely cause and verify the coordinate space used by your operating system and Python screenshot backend.
3. Convert the result to PyAutoGUI’s order
Write the values as (left, top, width, height), not (x1, y1, x2, y2) and not (top, left, height, width). Keep the tuple in one named variable so it is easy to adjust:
region = (LEFT, TOP, WIDTH, HEIGHT)
image = pyautogui.screenshot("second_monitor.png", region=region)
print(image.size)
The printed size should normally match the requested width and height. It confirms the image object’s dimensions, not that PyAutoGUI successfully captured monitor 2.
Install and run the basic Python capture
Install PyAutoGUI
Install the package in the Python environment that will run your script:
python -m pip install pyautogui
PyAutoGUI uses Pillow/PIL for image-related features. On Linux, the project quickstart documents installing the scrot screenshot utility:
Rank #2
- [Portable Monitor Laptop] InnoView laptop screen extender is no need of app and drivers! 15.6 in is a more suitable size for traveling or remote work. Suitable for traveler, student, gamer, engineer, and white-collar worker to connect HP laptop, Lenovo laptop, Dell laptop, Asus laptop, Macbook, iPhone, game console, tablet, PS, Xbox, etc. The laptop screen can expand the viewing area and be more efficient when playing games, working, meeting and studying
- [Plug and Play] The travel monitor for laptop provides 2 full-function Type-C ports and 1 HDMI port to connect most devices. Only one USB-C cable is needed to connect the external display to computer, and it supports power pass-through reverse charging. Note: Your device should support Thunderbolt 3.0/4.0 or USB 3.1 Type-C DP ALT-MODE. If not, you can connect via HDMI and power cable(NOT INCLUDE IN THE PACKAGE)
- [IPS FHD USB C Monitor] 15.6 inch portable screen with a resolution of 1920*1080P, made of A+ IPS screen, supports 178° full viewing angle, can present accurate and vivid colors. Combined with HDR, images and videos present realistic colors and amazing details. Low blue light can effectively reduce blue light radiation damage, no flicker, eye protection, making it easier for you to work and perform multiple tasks at the same time
- [Versatile Cover and Stand] Equipped with a scratch-resistant smart protective cover made of durable PU leather, it can also be used as a stand when working. Two grooves are used to adjust the angle and fix the external monitor. It can also provide all-round protection for the 1080p monitor when going out or traveling, suitable for putting in a backpack to avoid squeezing. Optional landscape and portrait modes, save more desktop space
- [Worry-free Purchase] Since the output power of each device is different, the screen may flicker or restart. You can power the laptop monitor to solve it. Provide a 30-day return policy and 18-month warranty (excluding external force damage). If you have any concerns, please let us know (displayed on the back of the monitor)
sudo apt-get install scrot
You may also need to grant your desktop session screenshot permission. A locked session, a remote desktop policy, Wayland restrictions, or an application sandbox can prevent capture even when the Python code is correct.
Capture a known rectangle
import pyautogui
# Replace these example values with monitor 2's virtual-desktop rectangle.
left, top, width, height = 1920, 0, 1920, 1080
region = (left, top, width, height)
pyautogui.screenshot("second_monitor.png", region=region)
print(f"Saved second_monitor.png from {region}")
Run it from a terminal, then open second_monitor.png. Check a distinctive window or wallpaper on monitor 2 rather than relying only on the file’s dimensions.
Add a timestamped output path
For repeated captures, create a directory and a unique filename. This avoids accidentally inspecting an old image:
from datetime import datetime
from pathlib import Path
import pyautogui
left, top, width, height = 1920, 0, 1920, 1080
output_dir = Path("captures")
output_dir.mkdir(exist_ok=True)
filename = output_dir / f"monitor2-{datetime.now():%Y%m%d-%H%M%S}.png"
pyautogui.screenshot(str(filename), region=(left, top, width, height))
print(filename.resolve())
The important PyAutoGUI limitation
The official PyAutoGUI README states: “Currently, PyAutoGUI only works on the primary monitor.” It immediately qualifies that PyAutoGUI “isn’t reliable for the screen of a second monitor (the mouse functions may or may not work on multi-monitor setups depending on your operating system and version).” This is a support limitation, not evidence that your tuple is malformed.
The mouse documentation also says that onScreen() checks whether coordinates are inside the primary screen and does not work for secondary screens. Do not use pyautogui.onScreen(x, y) as proof that a second-monitor rectangle is valid.
Use the region example as a best-effort experiment when your platform happens to expose a usable virtual desktop to PyAutoGUI. If the result remains blank, shifted, or shows only the primary display after you have checked the rectangle, assume the documented multi-monitor limitation applies.
A repeatable diagnostic procedure
- Check the display settings. Confirm monitor 2 is enabled and note whether it is left, right, above, or below the primary display.
- Write down the virtual rectangle. Record its logical left and top offsets plus width and height. Include negative coordinates when applicable.
- Capture a small test area. Start with a distinctive corner or a known application window before attempting a full-display image.
- Open the newly written file. Use a unique path or timestamp so an old capture cannot mislead you.
- Compare the content and dimensions. A correct size with primary-monitor content still indicates a capture-backend limitation.
- Check platform prerequisites. On Linux, verify
scrot; on any platform, verify screenshot permissions and that the session is not locked. - Stop changing tuple order once the geometry is correct. If the image is still wrong, investigate multi-monitor support, scaling, and the operating-system capture path instead.
Common failures and fixes
Only the primary display appears
Cause: This is the failure most directly covered by PyAutoGUI’s documented primary-monitor-only behavior.
Rank #3
- Extensive Compatibility - Forhelp portable monitor features 2 full-featured Type-C ports and 1 MINI HDMI port. You can easily access your favorite devices with just one USB Type-C or MINI HDMI cable. NOTE: Your device should support Thunderbolt 3.0/4.0 or USB 3.1 Type C DP ALT-MODE. It is compatible with all devices equipped with HDMI and USB Type-C ports like laptops, PS, XBOX, SWITCH game consoles.
- Full HD Portable Monitor - 15.6inch portable laptop monitor with 1920*1080 resolution, advanced IPS Matte screen support 178° full viewing angle, it renders accurate and bright color, draws you into the video or game with lifelike colors and amazing detail. It can effectively reduce blue light radiation damage, no flickering, eye-care, and make it easier to watch for a long time.
- Ultra-slim Portable Monitor - As a portable external monitor, Forhelp portable laptop monitor's body is made of aluminum alloy, the weight of the whole machine is 1.52lb, 0.3" ultra-thin profile, can easily fit into your bag, so you can carry it with you. With our magnetic smart holster, you can use and store it anytime.
- Able to Balance Work and Play - With multiple display modes [copy mode/extension mode/second screen mode]. During meetings,it can copy your laptop's content as a second screen to share with others. At work, it can be used as a second extended screen to increase productivity. In life, adjusting to HDR mode can upgrade the image to a new level, providing you with brighter highlights, more realistic colors and images. Two built-in speakers provide an amazing viewing and gaming experience.
- DURABLE SMART COVER - Comes with a scratch-proof smart cover made of durable PU leather exterior, doubles as a stand, provides comprehensive protection for this portable computer monitor. There are two grooves in the cover base to give at least some choice of viewing angle for your comfort.
Fix: Verify the second display’s rectangle once, then use a capture method with explicit multi-monitor support. Do not expect onScreen() to validate the secondary coordinates.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →The image is blank or the file is not created
Cause: A missing screenshot dependency, denied permission, a locked desktop, or a platform session that blocks screen capture.
Fix: On Linux, install scrot as documented; confirm the display session permits screenshots; run a primary-monitor test to separate environment problems from secondary-monitor support.
The capture is shifted or cropped
Cause: The display is offset in the virtual layout, the tuple was entered in the wrong order, or display scaling changes logical coordinates.
Fix: Re-read (left, top, width, height), include the actual nonzero or negative offset, and compare logical desktop dimensions with configured display scaling.
The dimensions look right but the content is wrong
Cause: Image dimensions reflect the requested rectangle; they do not prove the backend captured that physical monitor.
Fix: Inspect visible content and treat primary-display output as the documented PyAutoGUI limitation rather than repeatedly adjusting width and height.
Rank #4
- [ FHD 1080P PORTABLE MONITOR ]: KYY using a 15.6''(8.8"x14.2") advanced IPS screen with 178° wide viewing angle, Delivers 1920*1080 breathtaking viewing quality and HDR technology, KYY portable gaming monitor has excellent color rendering ability, provide you the clearer, smooth, excellent performance in gaming/multimedia. It can effectively reduce blue light radiation damage, no flickering, eye-care, and make it easier to watch for a long time
- [ WIDE COMPATIBILITY ]: KYY portable monitor for laptop equipped with 2 Full Function Type-C ports and Mini-HDMI port, easy access to your favorite devices with 1 cable solution as long as your device support Thunderbolt 3 or 3.1 USB-Type-C, compatible with most laptop, smartphone, PC, PS4, XBOX and more.
- [ ULTRA-SLIM PORTABLE DISPLAY ]: KYY USB C portable monitor features a 0.3inch ultra-slim profile(1.7lb), it is easy to slides into your bag, allows you to carry it everywhere, ideal for a simple on-the-go dual-monitor setup or extend your phone screen for movies or games. No driver needed and equipped with 3.5mm audio inputs and 2 built-in stereo speakers to enhance entertainment experience
- [ DURABLE SMART COVER ]: Comes with a scratch-proof smart cover made of durable PU leather exterior, doubles as a stand, provides comprehensive protection and frameless magnetic design for this portable computer monitor. There are two grooves in the cover base to give at least some choice of viewing angle for your comfort for less cumbersome installation
- [ LIGHTWEIGHT BUT POWERFUL ]: KYY portable external monitor can work in both landscape and portrait mode, can be used as a gaming monitor, screen extender for laptop or phone. It has a unique designed Premium gray metal appearance, 2 built-in speakers to play audio, a friendly menu control wheel for setting, and 24/7 professional support team
The script works locally but fails over remote desktop
Cause: Remote sessions can expose a different desktop layout or disable access to physical displays.
Fix: Run the test in the logged-in local session, confirm which displays the remote session exposes, and do not assume its coordinates match the physical workstation.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
When PyAutoGUI is the wrong tool
PyAutoGUI is convenient when your automation already controls the mouse and keyboard and you need a quick image file. It is a poor fit when reliable secondary-monitor capture is a hard requirement. Evaluate alternatives on these axes:
- Whether every monitor can be captured, rather than only the primary display
- Whether negative and offset virtual-desktop coordinates are supported
- Operating-system and desktop-session coverage
- DPI and scaling behavior
- PNG, JPEG, WebP, or other output formats
- Whether an additional system screenshot utility is required
For a guaranteed workflow, prefer an operating-system capture API or a library that explicitly documents multi-monitor support for your platform. Test the exact combinations of OS, desktop session, scaling, and remote access that your application will use.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
If what you actually need is a screenshot of a web page displayed on a second monitor, a browser-based capture API avoids desktop-coordinate problems entirely. ScreenshotNeo takes a URL and returns a PNG, JPEG, WebP, or PDF; it does not capture a physical monitor.
One GET request is enough:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for parameters and response details. The equivalent Python request is:
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
timeout=90,
)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`${res.status} ${res.statusText}`);
const body = Buffer.from(await res.arrayBuffer());
require('fs').writeFileSync('shot.webp', body);
ScreenshotNeo accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status with X-Page-Verdict and X-Billed headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.
Every plan includes features such as full-page lazy-image loading, CSS-selector element capture, dark mode, device presets, custom viewport and retina scale, PDF controls, custom CSS and JavaScript, waits, request blocking, headers and cookies, timezone and geolocation, transparent backgrounds, resizing, TTL caching, signed links, asynchronous webhooks, bulk capture of up to 100 URLs per call, usage reporting, and an OpenAPI specification. Plans start with 1,000 free shots per month without a card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
Best Value
- 15.6" FHD Portable Monitor - Featuring a 1920*1080P resolution, 178°FULL viewing angle, HDR, and Low Blue Light Super Clear IPS A-grade screen, this portable screen for laptop enhanced visual experience, reduces eye strain and fatigue.
- Double Type-C Port -For Plug & Play - Portable monitor features 2 full-featured Type-C ports and 1 MINI HDMI port. You can easily access your favorite devices with just one USB Type-C or MINI HDMI cable. NOTE: Your device should support Thunderbolt 3.0/4.0 or USB 3.1 Type C DP ALT-MODE.
- Portable & Light Weight - At just 1.43lbs and 0.31inch thin, this portable laptop monitor is ultra-portable and perfect for on-the-go productivity or gaming. flexible to use anywhere you need a second screen for laptop. bringing you efficiency for meetings, work from home, and presentations.
- Able to Balance Work and Play - With multiple display modes [copy mode/extension mode/second screen mode]. During meetings,it can copy your laptop's content as a second screen to share with others.At work, it can be used as a second extended screen to increase productivity. In life, adjusting to HDR mode can upgrade the image to a new level, providing you with brighter highlights, more realistic colors and images.Two built-in speakers provide an amazing viewing and gaming experience.
- Wide Compatibility - Enjoy hassle-free plug-and-play functionality with the portable monitor. it is compatible with all devices equipped with HDMI and USB Type-C ports like laptops, PS, XBOX, SWITCH game consoles, No app or driver installation required.
Cost, performance, and reliability considerations
A local PyAutoGUI capture has no API usage charge, but it depends on a logged-in graphical session, display permissions, the current monitor arrangement, and the screenshot backend. It is also tied to the machine’s screen resolution and scaling, so a script can change behavior after a docking, undocking, or resolution change.
For repeatable web captures, an API removes physical-display dependencies. Use an explicit wait for dynamic content, cache only when a cached result is acceptable, and choose image format and viewport deliberately. Treat HTTP errors, timeouts, and the returned verdict headers as part of your application’s error handling rather than assuming every response is a clean page image.
Free tools Windows power users keep installed
One-click scans. No signup required.
Frequently Asked Questions
Can I pass monitor 2 as a monitor number to PyAutoGUI?
No. The screenshot API takes a coordinate rectangle, not a monitor index. You must supply the display’s virtual-desktop left, top, width, and height, and secondary-monitor support remains unreliable.
Why can my mouse move to monitor 2 while the screenshot cannot?
Mouse and screenshot support use different platform paths. PyAutoGUI’s mouse functions may work on some multi-monitor systems even though its documented screenshot support is limited to the primary monitor.
Should I use a negative coordinate for a monitor on the left?
Yes, if the operating system’s virtual desktop places that monitor left of x=0. Use the actual offset from display settings, then keep the tuple order as (left, top, width, height).
The Bottom Line
Use region=(left, top, width, height) with coordinates taken from your virtual desktop, but regard secondary-monitor capture as best effort: PyAutoGUI officially supports the primary monitor and warns that other displays may not work.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteQuick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

