Masthash

#xdg

eukara
1 week ago

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!

#XDG #UNIX #videogames #idtech

Ed Howland
2 weeks ago

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.

gnutux بالعربي
2 months ago
تخصيص مُجلدات المُستخدم واستعادتها لو حُذفَت

نتناول في الفيديو شرح كيفية تخصيص مُجلدات المُستخدم، من حيث أسماء المُجلدات وأماكنها، إضافة إلى كيفية استعادة أي مُجلد حال الحذف.
المُجلدات المعنية هي:
- Documents
- Downloads
- Music
- Pictures
- Public
- Templates
- Videos

youtu.be/BMm1E0EIZGE

#لينكس
#linux
#xdg
Mohammed Besar
2 months ago

تخصيص مُجلدات المُستخدم واستعادتها لو حُذفَت

نتناول في الفيديو شرح كيفية تخصيص مُجلدات المُستخدم، من حيث أسماء المُجلدات وأماكنها، إضافة إلى كيفية استعادة أي مُجلد حال الحذف.
المُجلدات المعنية هي:
- Documents
- Downloads
- Music
- Pictures
- Public
- Templates
- Videos

https://youtu.be/BMm1E0EIZGE

#لينكس
#linux
#xdg

Andy Scott
2 months ago

Dear #android, #rust / #cargo, #cmake, #dbus, #hp, #mozilla #firefox & #thunderbird, #npm, #pipewire / #pulseaudio, #putty, #python, #steam, #wine, #yarn (and I'm sure many, many others),

Why don't you use #xdg defaults? This doesn't seem ridiculous to you?

Screenshot of the results from the "ls -a" command in my home directory. It shows about 15 hidden folders and files belonging to applications that blatantly disregard XDG specifications.
postmodern
3 months ago

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

postmodern
5 months ago

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

Robert Mader
5 months ago

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.

Michael :donor:
6 months ago

I'm getting the vibe that if #elonmusk developed linux software, he would definitely put the config file in ~/.app instead of ~/.config/app/

#linux #xdg #standards #elondev

Also, I can't vote but if I could it would be #wayland
Been using it 100% with Sway for last couple years. Now that #xdg-desktop-portal-wlr works with screensharing and sway.. alls well

GNU/Linux.ch
9 months ago

Falscher Dateimanager

Wiederherstellen des Default-Dateimanagers.

#Dateimanager #standard #XDG #Nautilus

https://gnulinux.ch/falscher-dateimanager

ilyess
10 months ago

If you’re making a CLI tool, please support the XDG spec out of the box instead of coming up with your own env vars like $MY_CLI_CACHE_DIR and $MY_CLI_CONFIG, or worse, dumping all config and cache files under ~/.my-cli with no option for customization.

#xdg #cli

1 year ago

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 :)

#xdg #flatpak #linux #rust

Andrew Tropin
1 year ago

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

#guix #rde #xdg

2 years ago
#Dillo doesn't seem to want to follow #XDG standards tho, which sucks
silwol
2 years ago

@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/

Is there any website with a graph or chart of these symbols? I need to replace %s (g_get_home_dir) with g_get_user_data_dir
#glib #help #programming #xdg
maralorn
3 years ago

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
''

#nixos #kitty #xdg

genstar.service
3 years ago

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

digitalfox
3 years ago

@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

Rémi Verschelde
6 years ago

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