SnapX: The Power of ShareX, Hard Forked for Linux, FreeBSD, macOS, and Windows (built with Avalonia)
Posted by BrycensRanch@reddit | linux | View on Reddit | 24 comments
SnapX: The Power of ShareX, Hard Forked for Linux, FreeBSD, macOS, and Windows (built with Avalonia)
Hey nerds,
I've just released the first usable pre-release of SnapX (for basic usecases). It is a cross-platform screenshot tool that can upload to most of ShareX's preconfigured destinations and also upload to custom destinations (.sxcu)
GitHub: https://github.com/SnapXL/SnapX (600+ stars)
Packages are available for: Flatpak (Not submitted on Flathub yet), Snap, RPM, DEB, MSI, and uber tarballs. (similar to uber jars, with all needed dependencies)
For screenshotting:
- It uses XDG Portals with a fallback to X11 screenshotting on Linux/FreeBSD
- Direct3D11 & WinRT to capture on Windows
- XCap on macOS
Additionally, SnapX uses a cross-platform OCR powered by PaddleOCR/RapidOCR. From my tests, it blows away Windows built-in OCR and is vastly more portable, only relying on the ONNXRuntime from Microsoft. This makes SnapX the first Avalonia app to run on FreeBSD and offer industry-leading OCR while also offering screenshot & upload functionality.
The image formats currently supported are: PNG, WEBP, AVIF, JPEG, GIF, TIFF, and BMP.
I am looking into adding JPEG XL support with a jxl-rs wrapper NuGet package.
The image library I chose for it is ImageSharp. It's simpler than SkiaSharp and open source for open source projects. It also doesn't rely on a native library.
You can also fully configure SnapX via the Command Line, Environment variables, and the Windows Registry.
You don't need .NET installed.
It is built on .NET 10, the same as ShareX. SnapX is deployed with NativeAOT using Avalonia. If you want to know how I migrated all of hundreds of thousands of lines of UI in WinForms, I simply deleted them and reimplemented what I knew users would immediately need while looking at ShareX's source. Kudos to ShareX's developers for making their codebase simple to develop in.
With that being said, I spent a lot of nights with 10,000+ errors after doing so... I probably lost a decent bit of my sanity, but nothing worth doing comes without a cost. After the UI migration, I decided to make sure SnapX could take advantage of NativeAOT, as it's an exciting technology. No .NET install needed on the user's machines?!? Anyway, that led to a few more nights of migrating the destinations to use System.Text.Json.
I even went as far as making the configurations use YAML for comment support. I did try TOML since it's very popular with other Linux users. However, for such a heavily nested configuration, I ran into a multitude of issues that were not something I'm willing to subject someone else to.
As for why I chose Avalonia over something like GTK4? I might face some backlash for this, but... I like writing UI in XAML. I'm new to it, but there's a lot of documentation for it. It's also a nicely integrated experience with my editor. If I had gone with GTK4 in C#, it would've been more difficult.
Kousket@reddit
I don't understand the 900 star, there is no app, it's an empty skin for nothing that work, everything is said "under construction this feature hasn't been written yet, chatgpt is down" like the author seem to rely on pure vibecoding and there are NOTHING that work, you can't add any shortcut for example to have pt-scr as screen record region or shift+pt-scr for opening screenshots directory or anything that made sharex usable. I don't really understood the purpose of this fake 900stars you bought if nothing work and it's just an electron app with fake menu but nothing that ressemble anyhow the original sharex app.
BrycensRanch@reddit (OP)
I hear your concerns about the app's completion and accept them wholeheartedly. By far, SnapX has been one of the most difficult projects I've taken on to date. It's challenged me in ways I never thought possible. However, that doesn't mean the app is an empty skin. UI development is by far my biggest weakness. I'm still really new to it. I'm used to backend, to be honest. It's slow because I'm learning what it takes to create a good GUI instead of just trying to pump out poorly designed interfaces. This does slow down development, but I know the community will appreciate it.
As for the current status, the core code from ShareX, such as uploading, is there. I have used SnapX to take many screenshots. I know the current workflow is clunky due to the lack of hotkey support. The rewrite I'm working on has hotkey support on Linux/FreeBSD (X11/Wayland), Windows, macOS.
Regarding the settings menus, they give me nightmares because I'm so scared to get it wrong. There are so many settings, and I want to figure out a way to make configuring SnapX more approachable. I think we've all felt the cognitive overload when looking for a setting in ShareX.
Screen recording is coming soon with GStreamer / GPU Screen Recorder as supported capture methods.
I understand your indignation about the state of the project. I'm angry with myself, too, and I'll do better. It shouldn't be taking this long, but here I am.
Finally, SnapX does not use Electron (which is very offensive). It is written in modern C# with .NET 10 with Avalonia as the UI framework. SnapX is not vibe-coded either. That part about "Under construction: This feature hasn't been written yet. ChatGPT is down. " is a joke. I hoped it'd make some of the testers laugh, which it did. I didn't mean to give anyone the wrong idea. I have removed it from the rewrite. And no, I did not waste money on "buying GitHub stars"; this project is a massive time sink to begin with, and I've spent over 700+ hours on it. I imagine someone more experienced would be able to have this app in a better state, but I'm not him. I'm someone who's always been more passionate than talented. I’m not sure what the world would be if passion alone weren’t enough to create something real.
Mui-Mui@reddit
Good luck with that! Learning how to design the UI is quite a journey 😄 People often fall to backend, sadly. Good thing you decided you want to tacke that challenge!
hornyforbrutalism@reddit
Thank you so much for this!! I have always found ShareX by far the best screenshot tool, I have tried every alternative for Linux and it's just not comparable, it was the only software that I truly miss
hell31@reddit
I've been waiting this whole time for it to work. I'm really excited and will test it tomorrow. Thanks for all the effort🙏
BrycensRanch@reddit (OP)
No problem. Let me know about any issues you run into.
hell31@reddit
Is my issue a known issue?
Damglador@reddit
If they're gonna make a tarball with all dependencies, why not just make an AppImage already.
There's also an official rewrite of ShareX in Avalonia called XerahS or something like that, but the Linux version is kinda ass due to how it works with portals, plus it dumps a dotfolder in home.
BrycensRanch@reddit (OP)
The nice part about the tarball is that it doesn't require fuse in any way.
Meaning, it's slightly more portable than AppImages. Granted, it doesn't have the desktop integration helpers but that's something I want to add down the road. I've even tested the self-contained tarball approach, and it runs under FreeBSD's Linux compatibility layer, which I find a great feat.
If more people ask for AppImages, you will receive.
I like the work they're doing on XerahS; however, something to keep in mind is that SnapX is geared towards Linux users. It doesn't litter your home directory and follows the XDG Directory spec, as any program on Linux should. I daily drive Linux. I do fear that XerahS might struggle to be accepted onto Flathub due to its agentic coding practices.
Damglador@reddit
AppImages don't have to either https://github.com/pkgforge-dev/Anylinux-AppImages
BrycensRanch@reddit (OP)
I was unaware this existed, thanks! If more people ask for a AppImage, I’ll do it using this.
Occasion_Jealous@reddit
GitHub Repository is gone, as is the profile that created this.
BrycensRanch@reddit (OP)
Hi, this issue has been resolved. My account and repos are restored.
BrycensRanch@reddit (OP)
Unfortunately, I believe I've been mistakenly shadow-banned from GitHub. I haven't received any notification of enforcement. It's just as if all my software, issues, and discussions were never there. I've contacted GitHub Support. Thank you for your report!
battler624@reddit
Can sharex users on windows migrate to this? I'm honestly intrigued by the ability to take HDR Screenshots (assuming it works on windows)
BrycensRanch@reddit (OP)
Not yet on Windows, I am considering adding the tone mapping patch to SnapX's existing Windows code. However, since we use slightly more modern capture methods + ImageSharp, saving HDR content to something like a PNG is something very feasible for us. If any other software developers experienced with HDR are interested, help is much appreciated.
battler624@reddit
Idk how this would fit with that, I honestly use SKIV for HDR images, maybe you guys could learn from it? Its been pretty perfect in that regard.
SpecialKO/SKIV: Special K Image Viewer -- Strong emphasis on HDR capture, encode and tonemapping
ReferenceFit25@reddit
looks great, will be checking it out soon! sharex was the only real program i sincerely missed from windows.
TerribleReason4195@reddit
Thank you so much for this. It is pretty uncommon for someone to care about FreeBSD and other BSD's.
SwizzleTizzle@reddit
Awesome work, I'm excited to see what happens with the image editor, the way doing annotations work in ShareX I found to be the best I've ever used.
grahamperrin@reddit
deb, stable: gpg: no valid OpenPGP data found · SnapXL/SnapX · Discussion #433
FengLengshun@reddit
I'm good with Spectacle, but more option for people are nice.
Looking forward for more jxl support - was disappointed that it took so long for ShareX to add any modern image support (webp, avif, heif, jxl). I don't think they have jxl support yet since they started implementing the request just days before the news of Google waving the white flag to the format.
It is interesting to hear more Avalonia ports. I've mainly followed it for Playnite but how has its support for Wayland been? My main worry as a ROG Ally user would be touchscreen & OSK support.
everburn_blade_619@reddit
I've been waiting for somebody smarter than me to do this for years. ShareX is by far the best screenshot/recording tool I've ever used. I miss it sorely every time I boot into Fedora. Thanks for your hard work!
BrycensRanch@reddit (OP)
Wow, another Fedora user! I daily drive Fedora too. ShareX was one of the reasons I was hesitant to move to Linux!