Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly improve Linux support for the desktop app #86

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Schnouki
Copy link

For context: I started writing an Arch Linux package for proxyscotch, but quickly hit a roadblock: if proxyscotch-desktop is installed in /usr/bin, then at runtime it tries to creates its certificates in /usr/bin/data, which is obviously wrong.

So, I looked into doing what I wanted: install the binary and icon system-wide, but use the user's home directory to store app data (certificates).

In the end, I changed the following things:

  • Use the XDG data home for certificates storage, with fallback to the previous behavior if certificates already exists. This means that new install will by default use ~/.local/share/proxyscotch/cert.pem (Linux) or ~/Library/Application Support/proxyscotch/cert.pem (macOS) or LocalAppData\proxyscotch\proxy.pem (Windows)
  • Similarly, the app icon is looked up in the previous location for backward compatibility, then in /usr/local/share/proxyscotch and /usr/share/proxyscotch (Linux), /Library/Application Support/proxyscotch (macOS), RoamingAppData\proxyscotch and ProgramData\proxyscotch (Windows)
  • Implement a basic Linux notifier by simply calling the notify-send command (much simpler than adding a library that implements DBus notifications...)

I believe all these changes should be backward-compatible. Please let me know of any issue, or if you would prefer me to split this into several smaller PRs.

This allows the desktop app to be installed in /usr/bin and have certificates
created in the user's home directory, for instance.
So that the icon can be globally installed too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant