What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

On GNU/Linux, the simplest supported method is Python MSS with with_cursor=True when you create the capture object. MSS can still disable that setting when the current display backend cannot provide a pointer image, so inspect sct.with_cursor and verify the saved file. On Windows and macOS, MSS documents screenshot capture but not cursor inclusion; use a manual cursor overlay or a platform-specific capture method instead.

Capture a cursor-bearing screenshot with MSS on GNU/Linux

Install MSS and Pillow in the environment that will run the script:

python -m pip install mss pillow

Then request the cursor while constructing MSS:

from mss import MSS

with MSS(with_cursor=True) as sct:
    print("Cursor requested:", sct.with_cursor)
    shot = sct.grab(sct.primary_monitor)
    shot.to_pil().save("screenshot.png")

primary_monitor captures the primary display. The returned MSS image can be converted to a Pillow image with to_pil() and saved as PNG, JPEG, or another Pillow-supported format. The important detail is that with_cursor must be supplied at object creation; MSS does not support changing it afterward.

A printed value of True means the option remains enabled, not that every resulting image is guaranteed to contain a visible pointer. Move the pointer to a conspicuous location before capturing and inspect screenshot.png on the target desktop.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Logitech M185 Compact Ambidextrous 2.4 GHz Wireless Mouse - Swift Grey
  • Compact Mouse: With a comfortable and contoured shape, this Logitech ambidextrous wireless mouse feels great in either right or left hand and is far superior to a touchpad
  • Durable and Reliable: This USB wireless mouse features a line-by-line scroll wheel, up to 1 year of battery life (2) thanks to a smart sleep mode function, and comes with the included AA battery
  • Universal Compatibility: Your Logitech mouse works with your Windows PC, Mac, or laptop, so no matter what type of computer you own today or buy tomorrow your mouse will be compatible
  • Plug and Play Simplicity: Just plug in the tiny nano USB receiver and start working in seconds with a strong, reliable connection to your wireless computer mouse up to 33 feet / 10 m (5)
  • Better than touchpad: Get more done by adding M185 to your laptop; according to a recent study, laptop users who chose this mouse over a touchpad were 50% more productive (3) and worked 30% faster (4)

Capture a selected region

MSS accepts a monitor description or a dictionary containing screen coordinates. The coordinates below capture an 800 × 600 rectangle whose top-left corner is at (100, 100):

from mss import MSS

region = {"left": 100, "top": 100, "width": 800, "height": 600}

with MSS(with_cursor=True) as sct:
    print("Cursor requested:", sct.with_cursor)
    image = sct.grab(region).to_pil()
    image.save("region.png")

If the pointer is outside the rectangle, it cannot appear in the cropped output. A pointer near an edge can also be clipped by the region, depending on the cursor image and hotspot.

What works on each operating system

Approach GNU/Linux Windows macOS Cursor behavior
MSS with with_cursor=True Documented native option Not documented as supported Not documented as supported MSS may disable the option when unavailable
Pillow ImageGrab.grab() Captures the display when its backend works; may need gnome-screenshot, grim, or spectacle fallback commands Captures the screen or bounding box Captures the screen or bounding box; Retina output is 2× by default No documented cursor parameter
PyAutoGUI screenshot() Captures a screen or region where its screenshot backend is available Captures a screen or region Captures a screen or region No documented cursor parameter
Manual overlay Works when you can obtain a pointer position and cursor image Works with an appropriate position API and cursor asset Works with an appropriate position API and cursor asset You composite a cursor PNG after capture

The documented MSS cursor switch is explicitly GNU/Linux-only. Do not assume that passing with_cursor=True on Windows or macOS adds the pointer. Pillow ImageGrab and PyAutoGUI document capture and region arguments, but their inspected screenshot APIs do not expose a cursor-inclusion argument.

Why the pointer is missing

The backend cannot provide cursor data

MSS can turn off cursor capture during object creation if the current circumstances do not support it. Check sct.with_cursor immediately after construction and test a real image. A successful call to grab() only proves that pixels were captured.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Logitech G305 Lightspeed Wireless Gaming Mouse - Black
  • The next-generation optical HERO sensor delivers incredible performance and up to 10x the power efficiency over previous generations, with 400 IPS precision and up to 12,000 DPI sensitivity
  • Ultra-fast LIGHTSPEED wireless technology gives you a lag-free gaming experience, delivering incredible responsiveness and reliability with 1 ms report rate for competition-level performance
  • G305 wireless mouse boasts an incredible 250 hours of continuous gameplay on just 1 AA battery; switch to Endurance mode via Logitech G HUB software and extend battery life up to 9 months
  • Wireless does not have to mean heavy, G305 lightweight mouse provides high maneuverability coming in at only 3.4 oz thanks to efficient lightweight mechanical design and ultra-efficient battery usage
  • The durable, compact design with built-in nano receiver storage makes G305 not just a great portable desktop mouse, but also a great laptop travel companion, use with a gaming laptop and play anywhere

You are on Windows or macOS

MSS’s documented cursor option does not promise pointer capture on those systems. Use the overlay approach below, or a native operating-system capture API that explicitly includes the pointer.

The pointer is outside the crop

For a region capture, compare the pointer’s desktop coordinates with the region bounds. A full-screen capture is a useful diagnostic: if the pointer appears there but not in the crop, the issue is coordinate selection rather than MSS.

Display scaling changes the coordinate space

Desktop pointer coordinates and image pixels are not always one-to-one. macOS Retina captures are documented as 2× by default in Pillow; scale_down=True requests 1× output. Multi-monitor layouts can also have negative origins or different scale factors. Treat the saved image’s dimensions as authoritative and validate placement at every supported scaling configuration.

The cursor blends into the image

Move it over a dark and then a light area and inspect the file at 100 percent. Hardware cursors can have an outline or shadow that is difficult to notice in a thumbnail.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Logitech M185 Compact Ambidextrous Wireless Mouse with Rubber Grips - Blue
  • Compact Mouse: With a comfortable and contoured shape, this Logitech ambidextrous wireless mouse feels great in either right or left hand and is far superior to a touchpad
  • Durable and Reliable: This USB wireless mouse features a line-by-line scroll wheel, up to 1 year of battery life (2) thanks to a smart sleep mode function, and comes with the included AA battery
  • Universal Compatibility: Your Logitech mouse works with your Windows PC, Mac, or laptop, so no matter what type of computer you own today or buy tomorrow your mouse will be compatible
  • Plug and Play Simplicity: Just plug in the tiny nano USB receiver and start working in seconds with a strong, reliable connection to your wireless computer mouse up to 33 feet / 10 m (5)
  • Better than touchpad: Get more done by adding M185 to your laptop; according to a recent study, laptop users who chose this mouse over a touchpad were 50% more productive (3) and worked 30% faster (4)

Adding a cursor after capture

When the capture library omits the pointer, a practical implementation is to obtain the pointer position, capture the screen, and composite a cursor PNG at that position. This is an application technique, not a built-in guarantee of Pillow or PyAutoGUI.

  1. Read the pointer position immediately before the screenshot.
  2. Capture the full display or the desired region.
  3. Convert desktop coordinates to image coordinates. For a crop, subtract the region’s left and top values.
  4. Apply the display-scale conversion used by the capture backend, such as the Retina factor.
  5. Paste a cursor image with transparency at the cursor hotspot. The hotspot is the point on the cursor graphic that actually touches the screen.
  6. Save and inspect the result on each operating system, backend, monitor arrangement, and scaling setting.

Use a cursor asset whose shape matches the pointer you are documenting. A generic arrow can be misleading when the real pointer is a text beam, resize handle, or busy indicator. If you need the exact system cursor, obtain it through a platform-specific API rather than assuming a standard PNG.

Conceptually, the placement for a cropped image is:

image_x = (pointer_x - region_left) * scale_x
image_y = (pointer_y - region_top) * scale_y

That formula is only correct when the pointer and screenshot use the same desktop coordinate system and the scale factors are known. Test multi-monitor origins, fractional scaling, and cursor positions near every crop edge.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Amazon Basics 3-Button USB Wired Mouse with Responsive Tracking, Plug & Play, Compatible with Windows and Mac, Black
  • Computer mouse for easily navigating a computer interface; click, scroll, and more
  • USB-A wired connection; if existing device only supports USB-C, an additional adapter will be required
  • High-definition (1000 dpi) optical tracking ensures responsive cursor control for precise tracking and easy text selection
  • 3 buttons offer effortless fingertip control
  • Plug-and-go ready for instant use

Pillow and PyAutoGUI alternatives

Pillow ImageGrab

ImageGrab.grab() captures the screen or a bounding box, but its documented signature has no cursor-inclusion option. On Linux, Pillow documents fallback commands including gnome-screenshot, grim, and spectacle when the default X11 display does not produce an image. Those fallbacks do not establish cursor capture; you still need to inspect the output or add an overlay.

PyAutoGUI

pyautogui.screenshot() returns a Pillow image, can write to a filename, and accepts a region. Its documentation does not list a cursor argument. PyAutoGUI gives an illustrative estimate of roughly 100 milliseconds for a 1920 × 1080 screenshot; that is documentation context, not a cross-library benchmark or a guarantee for your machine.

Reliability and performance considerations

  • Capture only what you need: a region reduces memory and encoding work, but increases coordinate-mapping risk.
  • Reuse one MSS object: create it once for a sequence of captures instead of repeatedly initializing the backend.
  • Use lossless output for documentation: PNG preserves cursor edges; JPEG can introduce halos around transparent or high-contrast cursor pixels.
  • Synchronize moving content: pause animations or wait for the UI state you want before reading the pointer and capturing.
  • Validate files automatically: check that the output exists, has expected dimensions, and can be opened by Pillow; visual cursor verification remains necessary.
  • Account for permissions and sessions: headless Linux sessions, remote desktops, Wayland/X11 differences, and locked screens can change what a backend can see.

Troubleshooting checklist

Symptom Likely cause Fix
sct.with_cursor is False The backend or current desktop cannot supply a cursor Use a supported GNU/Linux session, or switch to a manual overlay and test the output
Screenshot saves but has no pointer Unsupported platform, pointer outside crop, or cursor blends into the background Try a full-screen capture, move the pointer to high contrast, then inspect at 100 percent
Overlay is offset Crop origin, scaling, or monitor origin was ignored Subtract region offsets and apply the same scale used by the screenshot image
Overlay points from the wrong spot Cursor PNG hotspot does not match its visual tip Choose or edit an asset whose hotspot corresponds to the actual pointer location
Linux capture is blank Display backend cannot read the current session Check the active display/session and the documented Pillow fallback commands; then verify the resulting image
Retina image is twice the expected size Pillow’s documented macOS default is 2× output Use scale_down=True when 1× dimensions are required, and adjust overlay coordinates accordingly
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If what you actually need is a screenshot of a web page rather than your desktop pointer, ScreenshotNeo captures the page through one HTTP request. It is not a replacement for a desktop screenshot with a live OS cursor, but it avoids installing a browser automation stack for web captures.

See the ScreenshotNeo API documentation for all options. A basic request is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Acer Wireless Mouse for Laptop, 2.4GHz Computer Mouse 3 Adjustable 1600 DPI
  • 【Plug and Play for Home/Office/School】The wireless computer mouse features 2.4GHz connectivity, delivering a stable, interference-free connection up to 32ft. Designed for 𝐦𝐞𝐝𝐢𝐮𝐦 𝐭𝐨 𝐥𝐚𝐫𝐠𝐞 𝐬𝐢𝐳𝐞𝐝 𝐡𝐚𝐧𝐝𝐬, it ensures comfortable use all day. Simply plug in the USB-A receiver for instant pairing—no drivers needed. 📌📌 If the mouse isn’t suitable, place the USB receiver in the battery compartment and return both.
  • 【3 Levels Adjustable DPI】This travel USB mouse offers 3 adjustable DPI settings (800, 1200, 1600), allowing you to customize sensitivity for precise design work. Effortlessly switch to match your task and elevate your productivity. 📌 Please remove the film at the bottom of the mouse before use.
  • 【Effortless Browsing】Equipped with forward and backward buttons, this computer mice streamlines your workflow, making it easy to navigate through web pages and files with a simple click. 📌Side button does not work on Mac.
  • 【Visible Indicator Light】 The pc mouse features a visual indicator for DPI levels and low battery alerts. The red light flashes once for 800 DPI, twice for 1200 DPI, and three times for 1600 DPI. When the battery level is below 10%, the light flashes red until the mouse is completely out of power.
  • 【Click to Wake】With smart sleep mode, it saves power by standby after 10 inactive minutes, just 2-3 clicks to wake. This efficient design delivers 3x longer battery life than motion-wake mice. Engineered for durability, its buttons and scroll wheel are tested for 10 million clicks, ensuring long-term reliability and consistent performance.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
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}`);

ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed as clean shots, and the response identifies the page verdict and billing status in headers. Its MCP server lets Claude, Cursor, and other MCP clients call take_screenshot, get_page_info, and capture_pdf. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Create a free ScreenshotNeo account.

FAQ

Can MSS add the cursor after the object is created?

No. Set with_cursor=True in the constructor; the documented property cannot be changed afterward.

Will a cursor appear in a ScreenshotNeo image?

ScreenshotNeo captures web pages, not your local desktop pointer. Use MSS or a desktop overlay when the OS cursor itself must be visible.

Should I use PNG or JPEG?

PNG is generally preferable for a cursor overlay because it preserves sharp edges and transparency. Choose JPEG only when its smaller files and compression artifacts are acceptable.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

SaleBestseller No. 1
Logitech M185 Compact Ambidextrous 2.4 GHz Wireless Mouse - Swift Grey
Logitech M185 Compact Ambidextrous 2.4 GHz Wireless Mouse - Swift Grey
Product carbon footprint: 3.97 kg CO2e; Contoured shape: Gives you more comfort and control
$14.90
SaleBestseller No. 3
Bestseller No. 4
Amazon Basics 3-Button USB Wired Mouse with Responsive Tracking, Plug & Play, Compatible with Windows and Mac, Black
Amazon Basics 3-Button USB Wired Mouse with Responsive Tracking, Plug & Play, Compatible with Windows and Mac, Black
Computer mouse for easily navigating a computer interface; click, scroll, and more; 3 buttons offer effortless fingertip control
$9.70

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.