20
submitted 8 months ago by indigomirage@lemmy.ca to c/linux@lemmy.ml

Hi There - I'm starting to make use of distrobox, but I have a question about creating custom home directories.

In my ~/.config/distrobox/distrobox.conf file, I've added a line ->

container_user_custom_home="$HOME/dbx"

This ensures that all new containers, by default, have their homes set to ~/dbx .

This is good, however, I'm looking for a way to default new container homes to ~/dbx/<>. Is there a way to do this? I've tried setting the line in distrobox.conf to

container_user_custom_home="$HOME/dbx/$DBX_CONTAINER_NAME" but it doesn't work. Any help would be appreciated.

(Basically, I want to err on the side of a bit of isolation between containers by default so that I can more easily track what each is doing separately.

Thanks!

you are viewing a single comment's thread
view the rest of the comments
[-] oh_gosh_its_osh@lemmy.ml 2 points 8 months ago

I think what you are looking for is

${DBX_CONTAINER_HOME_PREFIX} or container_home_prefix=...

See also

https://github.com/89luca89/distrobox/blob/main/distrobox-create#L716

[-] indigomirage@lemmy.ca 2 points 8 months ago* (last edited 8 months ago)

I've got that, but I want the container home prefix to be named, dynamically, after the container upon creation as a subdirectory of a container home prefix 'parent' directory I've already created.

Desired outcome -> All dbxs get homes in a subfolder of ~/dbx in turn, named after the container name I provide upon creation.

So.. a container called 'utility' would automatically home itself in ~/dbx/utility, and one called 'archtest' would go in ~/dbxarchtest, etc.

As it stands, the config gives each container the same home directory (albeit separate from the host, so at least I've got that...)

this post was submitted on 13 Feb 2024
20 points (85.7% liked)

Linux

47919 readers
1177 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS