A port of Greenshot screenshot tool from Windows/.NET 4.8/WinForms to Ubuntu/.NET 8/Avalonia.
- .NET Framework 4.8
- WinForms (System.Windows.Forms)
- Win32 P/Invoke via Dapplo.Windows.* libraries
- GDI+ screen capture (BitBlt)
- DWM/Aero window capture
- Dapplo.Ini config system (INI files)
- Windows Registry access
- UWP Toast notifications
- COM/OLE clipboard
- log4net logging
- .NET 8
- Avalonia 11 (XAML-based, GTK backend)
- X11 P/Invoke (libX11.so.6) for screen capture and hotkeys
- SixLabors.ImageSharp for image processing
- SkiaSharp (via Avalonia.Skia) for editor rendering
- JSON config stored in
~/.config/greenshot/ - D-Bus notifications via
notify-send - X11 clipboard via
xclip/xsel/wl-clipboard - Microsoft.Extensions.Logging
src/
├── Greenshot.sln # Solution file
├── Directory.Build.props # Global build settings (targets net8.0)
├── Greenshot.Base/ # Platform-agnostic core
│ ├── Core/ # ICapture, ICoreConfiguration, enums
│ ├── Interfaces/ # IDestination, IGreenshotPlugin
│ └── Platform/ # IScreenCaptureProvider, IHotkeyProvider
├── Greenshot.Linux/ # Linux platform implementations
│ ├── X11/X11Api.cs # X11 P/Invoke declarations (libX11.so.6)
│ ├── X11/X11ScreenCapture.cs # Screen capture via XGetImage
│ ├── X11/X11HotkeyProvider.cs # Global hotkeys via XGrabKey
│ └── DBus/DbusNotificationService.cs # notify-send wrapper
├── Greenshot.Editor/ # Avalonia image editor
│ ├── Drawing/Surface.cs # Avalonia Canvas + SkiaSharp drawing
│ ├── Drawing/*.cs # Drawing containers (Rect, Ellipse, Arrow, etc.)
│ └── Views/EditorWindow.axaml # Editor UI
├── Greenshot/ # Main application
│ ├── App.axaml # Avalonia application root
│ ├── Views/CaptureOverlayWindow.axaml # Fullscreen capture overlay
│ ├── Views/SettingsWindow.axaml
│ ├── Helpers/CaptureHelper.cs # Capture orchestration
│ ├── Destinations/ # File, Clipboard, Editor destinations
│ └── ViewModels/MainViewModel.cs # Tray icon, hotkey coordination
├── Greenshot.Plugin.Imgur/ # Imgur upload plugin
└── Greenshot.Plugin.Dropbox/ # Dropbox upload plugin
- Full screen capture (all monitors via X11 XGetImage)
- Region capture (interactive overlay with magnifier)
- Last region repeat
- Window capture (interactive selection)
- Active window capture (X11 _NET_ACTIVE_WINDOW to come)
- Wayland capture (portal API — XWayland fallback works)
- Rectangle annotation
- Ellipse annotation
- Arrow annotation
- Text annotation
- Freehand drawing
- Highlight overlay
- Obfuscate/blur region
- Undo/Redo
- Save (PNG, JPEG, BMP, TIFF)
- Copy to clipboard
- Step labels
- Image effects (blur, brightness, contrast)
- System tray (Avalonia TrayIcon → GTK StatusIcon)
- Global hotkeys (X11 XGrabKey; doesn't work on pure Wayland without XWayland)
- Desktop notifications (notify-send)
- Clipboard copy (xclip/xsel/wl-clipboard)
- Wayland global hotkeys (portal API TBD)
- JSON config in
~/.config/greenshot/greenshot.json - Settings UI
- Ubuntu 22.04+ (or other modern Linux)
libX11.so.6(X11 display server or XWayland)notify-send(fromlibnotify-bin) for notificationsxcliporxselfor clipboard, orwl-clipboardfor Wayland
- .NET 8 SDK
# Install dependencies
sudo apt install libnotify-bin xclip
# Build
./build.sh
# Run
./publish/Greenshot| Aspect | Windows Original | Linux Port |
|---|---|---|
| UI Framework | WinForms | Avalonia 11 |
| Screen Capture | GDI BitBlt / DWM | X11 XGetImage |
| Global Hotkeys | SetWindowsHookEx | X11 XGrabKey |
| Clipboard | Win32 OLE Clipboard | xclip/wl-clipboard |
| System Tray | NotifyIcon | Avalonia TrayIcon |
| Notifications | UWP Toast | notify-send |
| Config | Dapplo.Ini + %APPDATA% | JSON + ~/.config |
| Image Processing | System.Drawing (GDI+) | SixLabors.ImageSharp |
| Editor Rendering | WinForms Control + GDI+ | Avalonia + SkiaSharp |
- Microsoft Office integration (Word, Excel, PowerPoint, Outlook, OneNote)
- Confluence plugin (depends on WPF XAML forms)
- OCR features
- [] Imgur (anonymous upload)
- [] Dropbox (requires access token)
MIT
