Hacker News new | ask | show | jobs
by _8j50 1242 days ago
I actually am in a position where I need to take a screenshot but haven't found any tool on linux that has the right UX like macos builtin screenshot or on windows, greenshot and lightshot.

I want to press printscr or some shortcut and immediately screenshot an area of the screen or the whole screen and by default have it saved to a numerically incrementing files under a folder I configure and not have to close or interact with any popups. This is on Linux. Any recommendations?

6 comments

I use Sharex on Windows and I don't think there's any better tool, so I searched for "run sharex on linux" and there is indeed a guide - https://github.com/ShareX/ShareX/issues/6531 - maybe you can get it to work?

I believe it can do all of the things you want. Certainly area capture, remembered area capture, fullscreen capture, all bound to different hotkeys. Mine saves with the name = the timestamp but you can probably config it to be an incrementing index. It's incredibly full-featured.

I also have hotkeys for "capture current pixel's hex code" and "measure bounded box in pixels." When you take a capture you can also annotate it including showing labeled steps. After capture you can do one or more of: save locally (to one or more places), upload (to one or more hosts), copy to clipboard, etc. That includes pastebin if you have text saved to your clipboard so I use this for that also.

I can't recommend ShareX enough, it is the most well thought out, intuitive and comprehensive tool for handling screenshots. I really miss it on Linux, I'll try that guide.
Thanks, looks featureful. But I really need it very stable so running it in wine is a dealbreaker, since I already have a wine setup I have to fumble with a lot to get different windows executables to behave in certain ways.
I can recommend flameshot[0]. It has good editing tools built-in, low dependencies, and is ergonomic.

[0] https://flameshot.org/

Thanks, from the demo gifs on that page, this is my favorite so far.
I think this is highly dependent on your distro (and comfort with the CLI but I'm taking that for granted on HN) but I found the gnome screenshot to be very simple, quick, and effective. Piping a hotkey to a CLI command is presumably easy, and after 5s of googling I found the guide below for Gnome. Not exactly fancy and I haven't used this specific tool recently enough to say whether it meets all your requirements exactly (e.g. you might need to press "Enter" once to close a popup), but I think a solution like this might fit the Linux ethos best!

https://linux.die.net/man/1/gnome-screenshot https://docs.fedoraproject.org/en-US/quick-docs/proc_setting...

Thanks, will check it out, my main problem with gnome-* is the package pulling in gnome deps into my "minimal" lxqt environment.
If you can deal with it being a datetime name, a script that generates the filename and calls `maim` should be really easy, just to be hooked up to the key combination through the desktop environment/window manager.

Make two to distinguish between "save entire screen" and "let me drag a selection that it will save".

I've been using https://screencloud.net/ for the past few years. Custom file naming rules, you can upload to your own FTP server, then it will automatically copy a link to the file. Works perfectly for sharing and archiving screenshots.
It's best to just use a printer, makes it easy to review screenshots I've taken at night or in the loo
I use i3 and I think I pretty much had that at one time…

Basically I bound a key combo to a script, and that script would call scrot (the app), screenshot, and save the picture to date_plus_random_4_digit_number.png.

I think I wrote that script in Ruby and put it in .local/bin. But you could write it in another language too.