this post was submitted on 11 Jun 2024
15 points (100.0% liked)

linux4noobs

1356 readers
1 users here now

linux4noobs


Noob Friendly, Expert Enabling

Whether you're a seasoned pro or the noobiest of noobs, you've found the right place for Linux support and information. With a dedication to supporting free and open source software, this community aims to ensure Linux fits your needs and works for you. From troubleshooting to tutorials, practical tips, news and more, all aspects of Linux are warmly welcomed. Join a community of like-minded enthusiasts and professionals driving Linux's ongoing evolution.


Seeking Support?

Community Rules

founded 1 year ago
MODERATORS
 

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

you are viewing a single comment's thread
view the rest of the comments
[–] BodaciousMunchkin@links.hackliberty.org 2 points 5 months ago (1 children)

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.lol 1 points 4 months ago* (last edited 4 months ago) (1 children)

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

[–] BodaciousMunchkin@links.hackliberty.org 2 points 4 months ago (1 children)

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.

[–] QuazarOmega@lemy.lol 2 points 4 months ago

Alright, thanks! I'll be trying that