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

Don't use --filesystem=home #204

Open
alexmo1997 opened this issue Jul 29, 2023 · 4 comments
Open

Don't use --filesystem=home #204

alexmo1997 opened this issue Jul 29, 2023 · 4 comments

Comments

@alexmo1997
Copy link

Using filesystem=home is not really a good practice as it allows access to the whole user home directory which is not needed here.

@jmaibaum
Copy link
Collaborator

Thanks for opening the issue. I am happy to remove it if it doesn't break the app. Have you already tested how KiCad behaves without the filesystem=home permissions?

If you create a PR removing the permissions, a test build will automatically be created that could easily be tested.

@alexmo1997
Copy link
Author

Weirdly, it doesn't, even though wxwidgets supports using the xdg documents portal afaik. Could be due to a old wxwidgets version or using the wrong APIs, that's going to need more investigation.

@jmaibaum
Copy link
Collaborator

jmaibaum commented Jul 29, 2023

I suspect the reason is that a KiCad project consists of multiple files. While you can easily File-Open a project file (using the xdg portal), or double click on a schematic file from you file browser, that doesn't give KiCad permissions to also access the board file, footprints, symbols, and all other project related files needed to work correctly. Those are loaded automatically by the individual tool using traditional file opening calls, which are then blocked as they don't go through the portal.

I am afraid this is not something that we can fix only by altering the flathub flatpak manifest (this repo), but it is a topic that should be brought up with the KiCad main repo at https://gitlab.com/kicad/code/kicad . I'd suggest you file an issue there where it will be seen by the main KiCad Devs.

Yet I don't think that it is an easy to solve task, but I assume it will need major re-enigineering of the whole set of KiCad applications.

The xdg portal doesn't allow a concept like "auxillary files" next to the file you actually opened through a portal, yet (see flatpak/xdg-desktop-portal#463).

At least in the short term I don't think that we can get rid of the filesystem=home permission. Yet I am leaving this open for further discussion.

@jmaibaum
Copy link
Collaborator

FWIW we are using the most recent stable wxWidgets version, which is 3.2.2.1 at the time of writing this comment.

@jmaibaum jmaibaum changed the title dont use filesystem=home Don't use --filesystem=home Sep 1, 2023
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

No branches or pull requests

2 participants