0

I am glad to share my first question in this forum with you. I hope I can formulate the problem correctly.

I have been working in a QGIS3 Python plugin in a Windows system with QGIS 3.8. From today on I want to develop the plugin in a computer with QGIS 3.6.2 and Linux Mint 19.1 as a OS.

I copy-pasted the plugin folder into the corresponding user profile directory of the Linux computer ("/home/USER/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/PLUGIN"). The plugin is working perfectly.

I could copy-paste the plugin folder and I can edit its files from the file explorer or text editors. However, I cannot access or edit the plugin folder and files from other software, specifically from PyCharm and GitKracken. I realized that there are three subfolders in "/home/USER/.var/app/". These are: "com.axosoft.GitKraken", "com.jetbrains.PyCharm-Community" and "org.qgis.qgis". The last one is where the plugin is located. When browsing the system from these two programs, I can only see their respective folders in "/home/USER/.var/app/", but no sign of the existing "org.qgis.qgis", as if read permissions were missing. I am working as admin user.

I would like to continue developing the plugin code with both software while it is still in the QGIS user profile folder, in order to see and reload the changes dynamically.

Any idea how to solve this?

  • I suggest you keep your dev code out of your standard user profile. You can always start up QGIS with a separate dev profile using qgis --profiles-path – user2856 Jul 12 at 2:21
  • Dear @user2856 , thank you very much for your comments/hints. These were definitely helpful, as I could find the root of the problem and somehow solve it. I installed GitKracken, PyCharm and QGIS directly through the linuxmint Software Manager. This is why the QGIS folder was different, because it is a flatpack app, which creates a number of issues with sandbox permissions between programs (docs.flatpak.org/en/latest/sandbox-permissions.html). After executing: 'sudo flatpak override --filesystem=home org.qgis.qgis' I could access to the QGIS folder from GitKracken already. – Ruben FV Jul 12 at 13:14
  • This somehow did not work for PyCharm, but I could solve it by installing a non-flatpack version of the software manually. Now I have all the permissions to edit the plugin files while it is being used by QGIS, thank you! – Ruben FV Jul 12 at 13:18
1

This permissions' issue was caused by the flatpak versions of QGIS and PyCharm, installed directly from the linuxmint Software Manager. I realized this because the QGIS folder was:

/home/USER/.var/app/org.qgis.qgis/data/QGIS/QGIS3/

instead of:

/home/user/.local/share/QGIS/QGIS3

Sandbox permissions of flatpak intend to isolate apps from each other in order to increase security.

I solved it by typing in the terminal:

sudo flatpak override --filesystem=home org.qgis.qgis

After doing this, I could access to the QGIS folder from GitKracken already. This somehow did not work for PyCharm, but I could solve it by installing a non-flatpack version of the software manually.

Now I have all the permissions to edit the plugin files while it is being used by QGIS, thank you @user2856 for your hints!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.