paolostivanin / OTPClient

Highly secure and easy to use OTP client written in C/GTK3 that supports both TOTP and HOTP
GNU General Public License v3.0
482 stars 47 forks source link

Doesn't remember last used database #294

Closed Lancer11211 closed 1 year ago

Lancer11211 commented 1 year ago

I've installed the latest version from flathub but every time I reopen otpclient, it opens the default empty database and I've to go for the "Change database" menu item and select my db again and again. The native version(2.4.6 on ubuntu) doesn't have this issue.

paolostivanin commented 1 year ago

Hello, I tried that on a new system, and it worked fine, it remembered the last used database. Some questions

  1. did you select the database that was being used by the non-flatpak version?
  2. when creating a new/changing db, did you select the flatpak folder $HOME/.var/app/com.github.paolostivanin.OTPClient/data/ or one on the file system? Because, due to sandboxing, when using flatpak you can only use that specific folder.

Either ways, I've noted down a couple of things I can improve with flatpak. I'll work on that.

Lancer11211 commented 1 year ago

Hi!

I've added the extra folder with flatseal but it didn't work. I'm not going to store my important DBs in .var/app so I'm just going to keep using the old native version.

paolostivanin commented 1 year ago

Until I figure out what's wrong, you can always install the latest version from my ppa (https://launchpad.net/~polslinux/+archive/ubuntu/otpclient), but it's only for LTS.

paolostivanin commented 1 year ago

The issue is happening because on flatpak the db is hardcoded to the app's data dir. Since using flatseal to override the sandbox is not really supported, this won't be fixed. If you want to use flatpak, you can always take care of syncing the db to another location :)

This helped me find a couple of unrelated bugs though, so thank you :)