Not agree with all your statement.
Because it depends of users use case and developpers choices.
For severals things we already have rfc/iso and more. Also database
mostly sql if can have several schema for pure data services (not
application metadata) have for mostly identify use cases a best case
schema exist and should be used by all application and extend with there
own. It’s a pain to try stuff (same functionalities) when software not
share data.
Game the worst case of software industries. Maintain nothings embed
instead of using something like "DEFINE". And also the great of the
great the missing part of multi users system.
Game data are just again stupidly store why not using .config .local and
more why i m not fucking able to use a file that set my username, my
town name, my default keybord layout !!! a simple xml file can do the
job and can be easily extends. Why not a save game directory that can be
just add to a general backup path ? it can also permit to all game to
use the same protocol to managing stuff. And when u see gaming is now
more profitable than video industry i think they can help us to help
everybody. The concept can also be use for game assets with a good
format migrating system based on some dimension rules. And one asset for
ie a bannier or a fancy skin can be use in several games.
I currently think some stuff need a separation between my stuff, the
others stuff i use. I see 3 different cases :
- only personnal stuff : email, my own writing, passwords, internet
bookmark.
- mixed content (Images = personnal photo + a set of wallpapers )
- only "not" personal (except the fact data exist or not) like ebooks,
torrents file, rss link.
I always try to have a global approach to systems.
I know i will have to deep dive inside in stuff like dbus(which is not
recommend to be used for security reasons if i remember well) and gvfs.
I have lot and lot things to learn. : \
and remember i m a crooker rules adept http://sl4.org/crocker.html so
feel free to improve my knowledge :)
On 22/11/2021 14:26, Elsie Hupp wrote:
Hi Jérôme,
The way I see it, applications only having access to certain things by default
is a good security practice. There are ways for applications to access files
outside their sandboxes, but they need to get explicit permission from the
system (i.e. the user) in order to do so.
The case of ebooks (as well as the case of notes) is similar to the case of
email, where for performance and data integrity reasons it may work better for
the items and their metadata to be stored in a database rather than in the
filesystem. Additionally, items on disk may be a cache of canonical versions
stored remotely. Items in the database can then be exposed to the operating
system through DBUS or FUSE.
My take on `xdg-user-folders` is that even if the data in them is technically
stored elsewhere, in sandboxes or databases, they can still be important as a
primary means for the user to interact with their files. A way of reconciling
secure, high-performance backends with a user-friendly folder hierarchy is with
a virtual filesystem library like GVFS. Unfortunately, GVFS is not easily
extensible and not very approachable from a development standpoint.
There does remain the issue of certain items not neatly fitting the existing
taxonomy of `xdg-user-folders`, and I do feel like it could be useful to
revisit the categories in use in order to make them a bit more comprehensive.
Doing so without creating an even worse mess would be a bit of a process,
though.
Probably the tidiest approach would be to introduce more generalized synonyms
in both the backend and localized frontend names, then let applications use
either the original terms or their alternate versions. You would then get
things like:
• Images -> Pictures
• Audio -> Music
But also the reverse could be useful. As someone who uses both Linux and macOS,
something that has repeatedly tripped me up is the fact that Linux has a folder
called “Videos”, while macOS has a folder called “Movies”. So in order to catch
typos it could be useful to have the more specific synonym also point to the
more general one, like:
• Movies -> Videos
And, as you mentioned, there are items that don’t fit even in the more
generalized categories, so we could have things like:
• Projects (i.e. Git repositories, but in general this could include any type
of media that “belongs” to a specific project rather than a shared “library”)
• Reading/Reference (i.e. books, periodicals, and the like)
And, along the lines of “Reading”, there could be a set of synonyms like:
• Writing -> Documents
Obviously these synonym categories have a lot of flaws and holes, so I’m
presenting them not as a coherent set but as an assemblage of potential ideas
for adapting the existing categories without discarding or breaking them.
With regard to “Games”, though: “Games” can refer to either the applications
themselves or their stored data, and saved game data typically isn’t shared
with other applications, so Games are kind of the perfect use case for
sandboxed per-application data folders.
For the purpose of making per-application data more accessible to end users, I
opened several related issues suggesting an extension to GVFS for that purpose:
https://gitlab.gnome.org/GNOME/gvfs/-/issues/547
https://github.com/flatpak/flatpak/issues/4173
But implementing this is beyond my ability, and it doesn’t seem to be a
priority for the GVFS maintainers.
What other thoughts do you have?
Best,
Elsie Hupp
On Nov 22, 2021, at 2:28 AM, BARDOT Jérôme <bardot.jer...@gmail.com> wrote:
Thx
Yes it is (helpfull). I already know some stuff i just need to make stuff i
need works. :)
I first come here for some data approch too.
Do you think about more data like ebooks that can be great to have ?
where each application basically just has its own sandboxed home folder => most
stupid thing in the world
We need an appropriate data security policies tool with an real identity
manager.
And i currently try to working on a such tool. If people here have ideas feel
free to share.
J.
On 20/11/2021 20:15, Elsie Hupp wrote:
Hi Jérôme,
The Arch Wiki has a pretty good guide to the `xdg-user-dirs` package installed
on most Linux distributions:
https://wiki.archlinux.org/title/XDG_user_directories
I’ve dug around in the boilerplate code for *looking up* `xdg-user-dirs`, and
it basically queries `XDG_FOOBAR_DIR` for `FOOBAR`, so you *should* basically
be able to define any custom folder you want. You can check out my pending pull
request on `pyxdg` for a version of the code that’s somewhat easier to read
than the original C:
https://gitlab.freedesktop.org/xdg/pyxdg/-/merge_requests/13
The actual Python file:
https://gitlab.freedesktop.org/xdg/pyxdg/-/blob/8fa45fbbe4cd6676b388ca0549f875739301ed21/xdg/UserDirectory.py
Note that this is a simplified line-by-line translation of
`xdg-user-dir-lookup`:
https://gitlab.freedesktop.org/xdg/xdg-user-dirs/-/blob/master/xdg-user-dir-lookup.c
However, a big part of the functionality behind `xdg-user-dirs` is (a) the
basic list is standardized across most Linux distros, and (b) the actual name
of the directory is localized into a large number of natural languages.
The main reason actually that I joined this mailing list was to ask about
directories for difficult-to-categorize use cases, like ebooks or podcasts (or
code repositories or, yes, games).
So, hypothetically, yes, you could define your own `xdg-user-dirs`. However,
`xdg-user-dirs` is a tool rather than standard, and even if you got a pull
request approved for some additional directory, it would probably take years to
percolate out through the install base and never actually reach 100% of users.
Oh, and you’d also need to get it adopted by both GLib and Qt. (Qt would
probably be easier, considering Windows does IIRC have a `My Games` directory,
so there’s already a cross-platform precedent.)
This is to say that if you define your own custom directories in
`xdg-user-dirs` in application code, you should always define a fallback. And
in some respects `xdg-user-dirs` is kind of falling out of fashion with the
rise in Flatpak and Snap for end-user applications, where each application
basically just has its own sandboxed home folder, rather than using a shared
per-content-type directory, even though Flatpak portals do increasingly support
arbitrary locations in userspace.
Anyway, I hope this is helpful!
Best,
Elsie Hupp
On Nov 19, 2021, at 3:51 PM, Jérôme Bardot <bardot.jer...@gmail.com> wrote:
Hello,
There is a way to to add this own stuff in XDG_CONFIG_HOME/user-dirs.dirs ? I
want a XDG_GAMES_DIR=
Also can i access to XDG var from a shell ?
thx
More specifically someone can mentor me to push stuff if needed ?