Super-productivity: Cannot export to mounted USB on Ubuntu

Created on 29 Sep 2020  路  11Comments  路  Source: johannesjo/super-productivity


Similar use case as #192, trying to save data to a USB stick for portability.

Your Environment

  • Version used: 5.9.0 (snap version)
  • Operating System and version: Ubuntu 20.04
  • Desktop Environment: Gnome
  • Browser Name and version: n/a

Expected Behavior



It should be possible under Ubuntu to export data directly to a USB drive.

Current Behavior



Trying to do Settings > Import/Export >
Export data, then selecting the USB drive in question (which I can access from Nautilus and the command line), I get an error message "Error opening directory '/media//': Permission denied".

Steps to Reproduce (for bugs)


  1. Mount a USB drive on Ubuntu
  2. Try to export

Console Output


No.

Error Log (Desktop only)

Log doesn't exist at ~/snap/superproductivity/current/.config/superProductivity/log.log, there's one in ~/snap/superproductivity/current/.config/superProductivity/logs/main.log, which is empty.

enhancement good first issue help wanted

All 11 comments

I have the feeling this could be to do with snaps being mounted, and perhaps not having rights beyond the snap runtime?

Can confirm that this isn't a problem with the .deb installed version, where the default backup is in ~/.config rather than nested deep in ~/snap/.../current/....

.deb: In addition, when starting with --user-data-dir=/media/<user>/<usb-name>/<arbitrary-directory>, the directory is created, but superproductivity doesn't start:

user@computer:~$ superproductivity --user-data-dir=/media/user/KINGSTON/bkup
Saving backups to /media/user/KINGSTON/bkup
Using custom directory for user data /media/user/KINGSTON/bkup
{ enabled: null, showDevTools: false, mode: 'bottom' }
user@computer:~$

Thanks for reporting! I'll try to have a look this Friday.

Thanks!

This is pretty much this issue here:
https://askubuntu.com/questions/1034030/how-to-get-access-to-usb-storage-from-an-application-installed-as-snap
See also:
https://github.com/electron-userland/electron-builder/issues/4150
https://github.com/electron-userland/electron-builder/issues/4252

I am a bit unsure if I should attempt to add the removeable-media support, as the only use case would be to export data there from the settings and I had problems with this in the past, leading to the snap not working at all.

I don't know... What do you think?

Sorry for the delay. I'm not sure either.

I think the use case is a valid one though: exchanging data between machines with different platforms, in cases where Google Drive/Dropbox aren't an option.

One other thing that may work for this use case would be background git pushing perhaps. I imagine it like this:

Setup

User sets up git repo for backups, with token authentication (would need to check what the minimal rights would have to be for a repo).

Flow

  1. SP starts up:

    1. Check remote for updates

    2. Pull if necessary

    3. Sync UI

  2. On each change set, do

    1. commit

  3. SP shuts down (if you can listen to that event)

    1. push

There is opportunity for this to go wrong, e.g., with different CRLF across systems, etc., but I think it could be done if considered system-side rather than user-side.

Would take some thinking about the changesets you'd want to commit (e.g., time-based on some idle threshold, or content-based once a (atomic on some level) change has been completed (focus-loss on current element or something)).

What do you think?

Thanks for getting back to me. Not sure if I understand this correctly. Are you suggesting background git sync as another feature or is it an example of why we might want to add removable-media support?

The former, i.e., git sync as a new feature. Should I open a new issue for this?

Should I open a new issue for this?

Generally yes, please. This makes it easier to keep the discussion focused on one topic at a time.

Of course, I agree. Feel free to close and I'll open a new one.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GabrielRodriguesS picture GabrielRodriguesS  路  4Comments

wimel picture wimel  路  3Comments

Kl4tch picture Kl4tch  路  3Comments

generic-user picture generic-user  路  3Comments

D06E picture D06E  路  3Comments