ungoogled-chromium icon indicating copy to clipboard operation
ungoogled-chromium copied to clipboard

Support multilingual "Downloads" folder. Debian.

Open Francewhoa opened this issue 3 months ago • 10 comments

Description

Find the title above

Who's implementing?

  • [ ] I'm willing to implement this feature myself

The problem

About Ungoogled-Chromium version 124.0.6367.118. For newcomers and beginner end-users, the challenge is that if the Debian Linux is set to another default language than English, all downloads fail. Because the Downloads folder do not exist. Details in the steps to reproduce down below.

Possible solutions


Solution 1. XDG.

How about XDG? XDG is included in all Debian and most Linux distribution. XDG has a Base Directory Specification. Maybe $XDG_DOWNLOAD_DIR? Details at https://www.freedesktop.org/wiki/Software/xdg-user-dirs/

For UC newcomers and beginner end-users. For UC to support multilingual "Downloads" folder, how about during Ungoogled-Chromium startup, using XDG, somehow automatically detect the present default download folder?

This table shows a summary of XDG's Base Directory Specification at https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c#xdg---base-directory-specification

In this table above, Linux / BSD column might solve this challenge with $XDG_DOWNLOAD_DIR

If you're not familiar with XDG, it is an API. Which is available on most Linux distributions and MacOS. Including Debian Linux. "xdg-user-dirs is a tool to help to manage "well known" user directories like the desktop folder and the music folder. It also handles localization (i.e. translation) of the filenames."

Details about XDG for Flatpak at https://flatpak.github.io/xdg-desktop-portal/docs/api-reference.html

Source about XDG at https://www.freedesktop.org/wiki/Software/xdg-user-dirs/

Any volunteer to implement this new feature ? If needed, both me and the Ubertus.Org team would be happy to contribute beta testing and documentation for this new feature.


Solution 2. Environment Variable.

Maybe there is a Linux environment variable for this? Then at UC start, how about automatically adapt the download path to the download folder.


Alternatives

This alternative does not resolve this challenge for newcomers and beginner end-users. But a temporary resolution for UC advanced users with Debian in French, you can manually change the default download folder using those steps:

  1. Go to chrome://settings/?search=emplacement
  2. Click on the Modifier button next to emplacement
  3. Manually navigate to any download folder to your liking

Additional context

Steps to reproduce

  1. Using Debian 12 Bookworm, configure its default language to another language than English. In this example, we will use French (Français).

  2. Install Ungoogled-Chromium (UC) from https://flathub.org/apps/io.github.ungoogled_software.ungoogled_chromium

  3. Assuming that both your Debian is in French and your UC is in French, using UC, go to chrome://settings/?search=emplacement

  4. Next to Emplacement double-check that the present default download folder is set to UC default Downloads. If yes, do not change it. Also check that Always ask for where to download file/Toujours demander où enregistrer les fichiers is presently deactivated. If yes, leave it deactivated.

    Screenshot-197

  5. Using UC, try to download any file. For example, from:

    • Test file from OVH at https://proof.ovh.net/files/

    • Extension from https://chrome.google.com/webstore/

  6. All downloads fail. Ungoogled-Chromium (UC) says the download is in progress, but never completed. The file is not stored at all. This is the challenge. UC newcomers and beginner end-users expect to be able to download file without changing any default configuration. All other internet browsers that I know of are able to do this by default. Such as, but not limited to, LibreWolf, Tor Browser, Firefox.

Most newcomers and beginner end-users that I know of are intimidated by the clutter of Chromium settings. And for the few who find how to change the default download folder. Most of the time, what they do is that, in good faith, they choose a folder outside the UC flatpak sandbox permission. In other words, outside its allowed filesystem=home default access. For example, a remote storage or local storage. Which is located outside home. As you know, UC, by default, and for good stronger security reason, can't store or access anything outside home. In other words, for most of them, the few who find the deep-buried settings, the download still fails. And obviously, using Flatseal and configuring it appropriately is way outside their present skills and interest. To resolve this challenge, I suggest to simply use the default download folder located inside home. But to somehow adapt it for multilingual.

My guess about the cause of this challenge is that, by default, UC always download file to the user's Downloads folder. But in Debian, when the user configured its Debian to another language than English. For example, French (Français). The Downloads folder is titled Téléchargements. The Downloads folder does not exist. Obviously, UC is not allowed to store files into a folder that does not exist.

Francewhoa avatar May 05 '24 17:05 Francewhoa