Auto-connect + read/write access to ~/Downloads using personal-files for desk-pos-app

Hello @review-team

I would like to request approval for using the personal-files interface for my snap: desk-pos-app.

:small_blue_diamond: Snap name

desk-pos-app

:small_blue_diamond: Interfaces requested

I am requesting the following plug:

plugs: downloads-access: interface: personal-files read: - $HOME/Downloads write: - $HOME/Downloads

:small_blue_diamond: Reason for access

My application is a Qt-based desktop app that must:

• download CSV/PDF reports into the user’s Downloads folder
• let the user open the folder after download
• read previously downloaded files for viewing

This folder access is essential for normal functionality.

:small_blue_diamond: Notes

  • The app does not access any other personal folders.
  • Only the Downloads directory is required.
  • This request is for strict confinement with limited personal-files access.

Please let me know if any additional information is required.
Thank you!

You do not need a personal-files interface for this, the home interface will give you full access to all non-hidden directories underneath $HOME (including Downloads), it automatically connects and doesn’t require special approval…

1 Like

I have a Qt 6 application using QWebEngineDownloadRequest to download files. When I run the app in CLION normally (outside Snap), the downloaded files go correctly into:

/home/<username>/Downloads

But after packaging the app as a Snap, the same download is saved into:

/home/<username>/snap/desk-pos-app/current/Downloads

Here is my dowload code,

QString downloadsFolder = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
download_request->setDownloadDirectory(downloadsFolder);
download_request->accept();

Why it’s not saved in system download folder

Try changing what your app considers to be the home folder. I did this with engrampa-kyu like this.

apps:
  engrampa-kyu:
    command: usr/bin/engrampa
    desktop: usr/share/applications/engrampa.desktop
    extensions: [gnome]
    environment:
      HOME: $SNAP_REAL_HOME
    plugs:
      - unity7
      - home
      - removable-media
      - mount-observe
2 Likes

@Kyuyrii Thank you for your solution — it works perfectly now!

3 Likes

By default the user’s $HOME directory is rewritten to the $SNAP_USER directory(/home/<username>/snap/desk-pos-app/current).

This request has not been added to the review queue. It should be placed in the appropriate store-requests subcategory using the subcategory template for classic-confinement, privileged-interfaces and aliases requests.