#xdg
Did you know that pretty much every game starting with Quake III Arena has some pretty neat filesystem related console variables that can help store user specific information in more sensible places?
fs_homedir is the one to know! It works on Windows too! I primarily use this so we can make games play nicer with user files on UNIX when playing through stuff like Wine.
Example: Call of Duty
Win32 game. Ditched OpenGL for Direct3D - not even aware of the user folder on Windows as it was a pre Vista app - simply dumps savefiles, configs into its own game directory. Normally a lost cause, let’s educate it!
If you own the game on Steam and play it with Steam Play there, you can put this into your launch options: +set fs_homepath "Z:\home\username\Save Games\Call of Duty"
…and it’ll start looking for config files, savegames and all that in $HOME/Save Games/Call of Duty. Only user data, nothing else. This works with Call of Duty 2 and later titles as well. However there it starts to get janky with the multiplayer player profile and progression in games like Modern Warfare. It’ll actually only write to fs_homepath but not read from it. So that’s a bug that’s preventing us from doing anything useful in that game - grr!
The cvar was not changed in later id Tech games as far as I can tell (they still exist in MachineGames’ titles), so depending on if games managed to break it, it should still work.
I use this A LOT because this makes backing up save files, as well as configs, very easy. Hope this is useful to somebody!
For #ScreenReader users, this #CLI based file manager is very easy to use:
https://github.com/leo-arch/clifm
Note: Use the wiki to learn its many commands and key bindings
If not using #ArchLinux, use the #OpenSUSE build server to get a binary for your #Distro
#A11Y #Accessability #Linux #Bash #XDG #FileManagers
@kaitlynethylia Like #XDG definately! Their system is far better for backups and for storing stuff in different drives (e.g. the binaries on the SSD and the data on the HDD)
Additionally, doing things by category first helps with writing #AppArmour and #SELinux profiles.
نتناول في الفيديو شرح كيفية تخصيص مُجلدات المُستخدم، من حيث أسماء المُجلدات وأماكنها، إضافة إلى كيفية استعادة أي مُجلد حال الحذف.
المُجلدات المعنية هي:
- Documents
- Downloads
- Music
- Pictures
- Public
- Templates
- Videos
youtu.be/BMm1E0EIZGE
#لينكس
#linux
#xdg
تخصيص مُجلدات المُستخدم واستعادتها لو حُذفَت
نتناول في الفيديو شرح كيفية تخصيص مُجلدات المُستخدم، من حيث أسماء المُجلدات وأماكنها، إضافة إلى كيفية استعادة أي مُجلد حال الحذف.
المُجلدات المعنية هي:
- Documents
- Downloads
- Music
- Pictures
- Public
- Templates
- Videos

Are there best practices for defining which default files/dirs should have ENV variables that override the default locations? Should every cache or config file have an ENV variable to change it's location? Some? Should the app/util have it's own APP_HOME or APP_CONFIG_DIR env vars? Or is supporting XDG_CACHE_HOME, XDG_DATA_HOME, and XDG_CONFIG_HOME "good enough" (tm)?
#envvars #xdg #cli
Why isn't there an XDG `~/.opt` directory? Version managers (rbenv/ruby-build, chruby/ruby-install, nvm, etc) could install additional software versions into it for the local user without the need for `sudo` access.
#xdg #freedesktop
If your app uses #gstreamer to access cameras - be it for videochat or an ever more common QR code scanner - and you'd like it to be properly sandboxed as #Flatpak without direct device access using #xdg-desktop-portal, then #PipeWire just landed an MR for its gstreamer plugin that might make your life easier.
I'm getting the vibe that if #elonmusk developed linux software, he would definitely put the config file in ~/.app
instead of ~/.config/app/
Falscher Dateimanager
Wiederherstellen des Default-Dateimanagers.
I’d like to share a side-project that I finally got to a minimally-useful state this weekend, in case others find it useful
Repository: https://gitlab.com/jokeyrhyme/xdp-hook-rs
Features (as of 0.1.2):
- monitors Location, ScreenCast, and RemoteDesktop portal sessions
- triggers configured scripts/command when these sessions are created/closed
Example use case:
- I’m using eww ( https://github.com/elkowar/eww ) as my status bar across the top of my screen
- I wanted to show/hide indicators whenever an application was using the ScreenCast portal (e.g. https://meet.jit.si/ or Zoom, or Teams, or whatever)
- so I’m using xdp-hook to detect when any application creates a ScreenCast session, and update the state in eww accordingly so that a blinking widget is displayed/removed
Suggestions and code contributions are welcome :)
It's funny, but XDG_STATE_HOME appeared in Guix Home earlier than it was added to the spec :)
https://git.sr.ht/~abcdw/rde/commit/c872857
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables
Reorganizing $HOME - Lemmy https://lemmy.ml/post/59410 #structure #folder #linux #home #user #xdg
@liw has written a great wrap-up on the current state of support for the #XDG base directory specification in #Rust: https://blog.liw.fi/posts/2021/02/14/xdg-base-dirs-rust/
#microsoft #csharp #dotnet #xdg #linux
Microsoft loves Linux. \s
#glib #help #programming #xdg
I am sorry @gnome, but you left me no chance:
Exhibit A: https://gitlab.gnome.org/GNOME/glib/blob/master/gio/gdesktopappinfo.c#L2546-2584
Exhibit B: (10 year open issue) https://gitlab.gnome.org/GNOME/glib/-/issues/338#note_205914
Consequence:
pkgs.runCommandLocal "fake-gnome-terminal" {} ''
mkdir -p $out/bin
ln -s ${pkgs.kitty}/bin/kitty $out/bin/gnome-terminal
''
So... I've tried the GNOME Screencast plug in and the Desktop Screencast plug in. Neither show a prompt asking for permission to share the desktop so neither show anything and have size of 0x0 or sometimes something infinitely large (I guess it's just an overflow). Any help here? I'm using the AUR git version of OBS and I wouldn't like to install the flatpak version to just record with OBS on Wayland.
#OBS #Wayland #xdg #xdg-desktop-portal #Screencast #Archlinux
@IceWolf Possibly this?
https://wiki.archlinux.org/index.php/Firefox#KDE.2FGNOME_integration
> For integration with #KDE MIME type system and file dialog, one can use firefox-kde-opensuse AUR variant from AUR with OpenSUSE’s patches applied. Alternatively, integration with #MIME types can be achieved by creating a symbolic link to the MIME database ~/.config/mimeapps.list from the deprecated ~/.local/share/applications/mimeapps.list that is used by #Firefox. See [ #XDG MIME Applications#mimeapps.list].
https://wiki.archlinux.org/index.php/XDG_MIME_Applications#mimeapps.list
Well, looks like I managed to implement decent support for the #XDG Base Dir spec in #GodotEngine, should make it for the #beta:
https://github.com/godotengine/godot/pull/12988
It's good to do some dev work for once and not just reviewing others' work/various project management tasks. #FOSS