[GNC] create desktop icons for GNC 4.9 Flatpak on Ubuntu

Geert Janssens geert.gnucash at kobaltwit.be
Sat Apr 2 05:26:28 EDT 2022


Op woensdag 30 maart 2022 04:36:27 CEST schreef Adrien Monteleone:
> For the icon issue, while Flatpak apps are sandboxed and might not have
> access to that icon location, have you tried copying it to somewhere in
> your home folder and seeing if that works? (it is the Desktop file using
> it, so this would be weird, but I guess worth a shot)
> 
I agree this would be weird, but not impossible. I haven't seen a reply to 
this yet.

Jeffrey, for clarity, Adrien's suggestion here will not necessarily make your 
desktop file function better. It is only meant to rule out permission issues 
with the icon you wish to show on your desktop. You write it currently 
presents a generic icon instead of the gnucash icon. We want to test if that 
is fixed by using an icon that's stored somewhere in your home directory.

So can you
- copy /var/lib/flatpak/app/org.gnucash.GnuCash/x86_64/stable/active/files/
share/gnucash/pixmaps/gnucash-icon.ico to to somewhere in your home directory
- adjust the "Icon" line in your Dad.desktop file to point to this file in 
your home dir
- refresh your desktop and see if it now shows the appropriate icon for your 
desktop file ?

> https://wiki.gnucash.org/wiki/Flatpak#Desktop_Icon
> gives the example of making a desktop icon and it specifies a /.local
> location in your home folder. That page might be assuming you installed
> the app for one user (you) and not the system. This might be why the
> icon file is in /var/lib instead of /jeffrey/.local. Though why that
> matters, I'm stumped.

It shouldn't matter, but obviously you have to go and use the icon where it's 
installed. If the gnucash flatpak was installed system wide, the icon will be 
in /var/lib, if it's installed for a user only it will be in the user's 
.local/share directory.
> 
> I also find it strange that GnuCash is storing backups on the desktop
> when it is opening the file from the USB drive. But you can try adding a
> "Path" to your desktop file to indicate the 'working' directory:
> 
> path=/media/jeffrey/'Mac Drive'/Ledgers/Dad/Dad.gnucash
> 
That should be without the trailing Dad.gnucash, otherwise it's not a 
directory. However I rather share with your initial surprise this would matter 
or even whether it would help.

Jeffrey, have you tried this and did it have any effect ?

It suggests to me gnucash seems to fail to write to the usb stick and instead 
defaults to the desktop. A trace file could give us some insight but that in 
itself is currently a challenge under flatpak.


> Finally, are you 100% certain you don't have GnuCash installed either
> from a build or .deb?
> 
> When you double-click a data file to open GnuCash (which you say works)
> what version is reported?
> 
> What happens when you run your Exec command from the .desktop file in a
> terminal?
> 
Jeffrey, can you answer these questions individually rather than a generic "I 
tried all suggestions and nothing worked". That helps us establish nothing was 
forgotten.

Regards,

Geert




More information about the gnucash-user mailing list