-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
Quick Add does not work in flatpak #246
Comments
I've installed Planner 2.2.8 on Fedora 32 using ninja install. Quick-add works without any problem. I wonder if quick-add shouldn't be installed as a separate flatpak application? |
I think it's most likely. I still have some technical issues to solve, for example: my flatpak installation doesn't recognize me "org.gnome.settings-daemon.plugins.media-keys, I'm not sure how to fix this. |
I've also noticed a warning about media keys. |
In the AppCenter version I am using a dbus server to connect the two applications and thus update each time a task is created from QuickAdd. Do you think that if we reference this dbus server in the flatpak installation file, the two applications can be connected? |
@roypen Could you tell me how you did this? I'd be very grateful to you. |
|
I built a flatpak quick-add application based on the original manifest file. In manifest changed every line containing
|
com.github.alainm23.planner-quick-add.txt |
Thank you very much, everything works very well, the only thing that worries me is the symbolic links. One solution could be to use our DBus server to get the database information and some dconf settings, but for this to work Planner would have to be running all the time. |
I think most users allow Planner to run in background. |
As another workaround the following command seems to open the quick-add window:
|
@nils-asmussen Thank you very much, that's an incredible solution. |
Flatpak expects that all the exported files or services (this case DBus) should be prefixed by the app-id. Renaming the Quick Add ID to use something like |
@bilelmoussaoui thank you very much for your time, I have changed the app-id of Quick Add but when I run Planner I have an error with my service that configures the keyboard shortcuts.
This service does all the work: |
It's normal that you cant access the scheme of |
@bilelmoussaoui Thank you very much for your time, I will continue investigating. |
@alainm23 Would you mind to try if you can set the keyboard shortcut if you start planner with the following command?
On the system I am currently using, the dbus namespace seems to have a different name, |
@nils-asmussen I am getting the same warning. |
You need to add dconf access https://docs.flatpak.org/en/latest/sandbox-permissions.html#dconf-access |
@bilelmoussaoui Thank you very much, I have changed the permissions of my application to:
I have noticed that I can now access the system's dconf settings but I still don't have access to Do you think it is necessary to add one more permit? |
I'm not sure what you mean by "you don't have access", access to modifying the scheme? |
Yes I am getting the same error,
|
@alainm23 Thank you for testing the flatpak option and for your work on this amazing program! On my "main" system the gsettings schema |
SummaryI can now confirm that the schema needs to be installed in Details of the testAs a dirty hack to check if it works, I copied the glib-2.0 folder to my home folder and started the flatpak with access to the copy,
Now, in the shell inside flatpak, I make the schemas in ~/glib-2.0 available to glib/gsettings, by adding the home directory to XDG_DATA_DIRS,
and I can actually see the schema
If I start Note: The keyboard shortcut runs the command Conclusions
|
I've been following this for awhile. I love this program, but not having the quick-add feature in the flatpak was problematic. I don't know if it helps, but I have added (from the comment above)
to my keyboard shortcuts on Pop!_OS, and the quick add is working perfectly. It's not the most elegant solution, but I've been using it for a few days without any problems. Thank you for a wonderful program. |
Thank you all very much to everyone to help. I will make some changes in the Quick Add preferences indicating the steps to configure the keyboard shortcuts in the system 😔️. |
I just looked at the issue again, and indeed. Flatpak limits the access to the system by default to avoid malicious applications doing random things on the system. I don't think there will be a way to do this automatically like apps used to do so, the best way to handle this would be a portal that allows an app to set a specific shortcut. Shipping the packages that ships the schema doesn't make sense as you will be able to change the setting, inside the sandbox and won't matter for your system at all. |
My previous post seems to have been missed. There I describe how one can make this feature work. |
Maybe not the cleanest, but the simplest way is to add the following to the manifest (I added it as last module before planner):
|
@nils-asmussen I can confirm that the keyboard shortcut settings work on flatpak and elementary OS. I will still do some tests on other distributions. |
@alainm23 Is the black bar part of the window decoration? The input field also looks a bit cut off.
@bilelmoussaoui So are there currently any security concerns about including Quick Add in a flatpak? |
I'm no security expert, but Flatpak isn't designed for hackish solutions as this. Apps used to do whatever they wanted at host level and they really shouldn't. It's a a hackish solution for now, but shouldn't be taken as "the solution". |
@alainm23 Perhaps the code can be annotated to reflect this? |
I am still having this problem, my version: 2.7 |
Update: Running |
This seems like it is related to the autostart permission; I wonder if the background portal can/should be extended to handle launching on keyboard shortcuts, or if it would be best for a new portal. 🤔 |
Has there been any progress on the quick-add function for the flatpak version? |
Quick Add is under construction, but it will most likely not be automatic as Panner 2 did, it will probably require additional configuration by the user. |
@alainm23 also note that Flatpak/xdg-portals now support a global shortcuts portal for exactly this sort of thing. 😄 Based on an issue I opened inspired by Planner: flatpak/xdg-desktop-portal#624 It would probably be the best way to implement this in the proper way. |
Describe the bug
Quick Add Shortcut "CTRL + TAB" should trigger Quick Add to add a item in the inbox. The flatpak variant does not trigger this Quick Add app.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Quick Add application starts
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: