I saw that there’s this nifty xdg-ninja that informs you on what you have installed that doesn’t respect the XDG spec, if it has support for it or not and what you can do to make it comply.
But now I was wondering if there was any tool to do the actual work automatically, I believe I have once seen a program that spoofed your home directory to non-complying apps so that you could transparently override their whole app data location to a path you wanted so they can keep functioning, but I can’t for the life of me find it again.
It would be double awesome if it did both, i.e. auto-applying any changes to apps that support XDG but need to be configured to enable it and, for those who don’t, forcefully spoofing the home directory

  • BodaciousMunchkin@links.hackliberty.org
    link
    fedilink
    arrow-up
    2
    ·
    10 days ago

    You can use bubblewrap (its CLI name is bwrap) to make an arbitrary directory as $HOME for a specific program session. Basically, you can bind or set any environment variable you need for that particular program. I recommend checking out the arch wiki on this topic.

    For example: bwrap --dev-bind / / --bind $HOME/your/dir/path $HOME <your_program>. This will let <your_program> have access to / and device permissions, with $HOME/your/dir/path serving as its $HOME.

    • QuazarOmega@lemy.lolOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      7 days ago

      That looks pretty good! Though the automatic part I think is pretty important, know if there are any tools that do that? I tried searching, but didn’t find much, just this bubblejail that would at least make things a little easier I guess

      • I haven’t come across any information regarding the automatic aspect, and I don’t have any personal experience with bubblejail either. However, bubblejail is mentioned on the arch wiki. It might be the closest match in this case, so you could give it a try.