jan icon indicating copy to clipboard operation
jan copied to clipboard

feat: implement xdg-desktop-portal in Jan for better Linux integration

Open louis-jan opened this issue 2 months ago • 0 comments

Summary

Implement support for xdg-desktop-portal to improve Jan's integration with Linux desktop environments and enable better sandboxing support.

Background

xdg-desktop-portal is a standardized D-Bus API that provides desktop integration features in a secure, sandboxed manner. It's the modern standard for Linux applications, especially those distributed via Flatpak, Snap, or running in sandboxed environments.

Benefits

  1. Native File Dialogs: Use the desktop environment's native file picker instead of generic dialogs
  2. Better Sandboxing: Enable proper sandboxing support for enhanced security
  3. Desktop Integration: Improved integration with GNOME, KDE, and other desktop environments
  4. Future-Proof: Align with modern Linux desktop standards
  5. Flatpak/Snap Support: Better compatibility with containerized distribution formats

Proposed Implementation

  • [ ] Integrate xdg-desktop-portal for file picker operations
  • [ ] Use portal APIs for system integration (notifications, etc.)
  • [ ] Test with various desktop environments (GNOME, KDE, Xfce)
  • [ ] Ensure fallback behavior for systems without portal support
  • [ ] Update documentation for Linux users

Implementation Considerations

  • Tauri may already have some portal support - need to verify current capabilities
  • Should maintain backwards compatibility with non-portal systems
  • Consider runtime detection of portal availability

Test Plan

  • [ ] Test on GNOME with portal support
  • [ ] Test on KDE with portal support
  • [ ] Test on systems without portal (fallback behavior)
  • [ ] Test in Flatpak environment
  • [ ] Verify file picker dialogs use native DE styling

References

🤖 Generated with Claude Code

louis-jan avatar Oct 03 '25 04:10 louis-jan