TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Linux Wayland Screenshot App – where to start?

5 pointsby helijalmost 2 years ago
I really like the screenshot app on Fedora. It works flawlessly but sometimes I drop screenshots into graphics program (Gimp) to draw arrows, etc. Would be really nice if everything was integrated together.<p>I programmed in Basic in the 80&#x27; and 90&#x27; and Pascal&#x2F;Delphi in early 00&#x27;. After that Python and Django for the usual web stuff. It&#x27;s been awhile since I did major projects - mainly Python scripts now if needed (scraping and data)...If I would to build this kind of app from scratch where do I start?

3 comments

sylwarealmost 2 years ago
As far as I know, this is not part of wayland core, namely you would need an specific and out of core wayland interface <i>AND</i> a wayland compositor which supports such interface.<p>Go to the wayland authority repo for interfaces, see if there is such interface (there could be many in dev), then find a wayland compositor which supports such interface(s) (or code such compositor). Then write your app code to query if a wayland compositor supports such interface:<p>- if not, gracefully fail.<p>- if it does, screenshot your surfaces.<p>That said, it is more an internal feature of a wayland compositor itself. So it seems more appropriate that a wayland compositor supports or not such feature, and if so, optionaly allows an application to remote control of feature via a specific out-of-core wayland interface.<p>I would feel better if it stays into the wayland compositior without the possibility for an external apps to snapshot everything.<p>That said, you could fiddle with platform specific stuff to shorcut the wayland compositor (on linux, drm mode settings and framebuffers).
Zambytealmost 2 years ago
Have you seen flameshot? <a href="https:&#x2F;&#x2F;flameshot.org" rel="nofollow noreferrer">https:&#x2F;&#x2F;flameshot.org</a><p>I haven&#x27;t used it personally - I hacked together a Guile script to wrap a few tools (grim, slurp, tesseract for OCR..., wofi), and then bound my script to a shortcut in my WM.
评论 #36581336 未加载
评论 #36564913 未加载
smoldesualmost 2 years ago
Probably start with wlroots if you want to target multiple Wayland desktops. There are multiple compositor implementations now, so grabbing a framebuffer isn&#x27;t quite as easy as it was in the 90s.<p>You should check out Flameshot and Spectacle if you want feature-complete screenshot apps on Wayland. If <i>those</i> don&#x27;t suit your needs, then you should consider a custom solution.
评论 #36564943 未加载