this post was submitted on 08 Jan 2026
43 points (95.7% liked)

Linux

60916 readers
425 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 6 years ago
MODERATORS
 

Okay, so I've been reading about dotfile management apps such as GNU Stow, and I love the idea. I have a good grasp on how it works. Seems like it should work flawlessly for corralling all my dotfiles into one folder so I can easily clone them across machines. Makes sense for apps whose config folders and files are named something static like ~/.config/appname/settings.conf.

That said, can somebody help me understand the cloning/syncing workflow for apps that generate folders and/or files with dynamic/random/inconsistent names? For example, I'm thinking of Firefox, which creates folders with seemingly random strings for each profile.

Do I just need to clone my Firefox profiles before I launch Firefox for the first time on a new machine? Can I configure GNU Stow w/ something like *.Profile for the top level folder name? Am I doomed to manually syncing my Firefox settings, or is there some other trick for handling these dynamically named configs that I haven't come across in the tutorials yet? This little cliff hanger is pretty much the last thing stopping me from installing GNU Stow at this point. Thank you!

top 13 comments
sorted by: hot top controversial new old
[–] 2910000@lemmy.world 12 points 4 days ago (3 children)

When I think of dotfile management, I think it means handling standalone config files that are a few KB, intended to be user-editable, and are probably not changed by the running program itself.

I don't think the Firefox config files meet those criteria. I don't know, because I just leave them alone. I think a better tool for managing Firefox config would be to sync your profile, either through their servers or by self-hosting a sync server

[–] giddy@quokk.au 2 points 2 days ago

FF sync doesn't cover everything, in particular toolbar setup. There is a user.js file you can create that plugs the gap but this hits the exact problem (picking the right folder) the OP stated

[–] Obin@feddit.org 2 points 3 days ago* (last edited 3 days ago)

There are still things you can do with Firefox to fit the dotfiles pattern if you care enough. The files managing the profile and profile directory are mostly static and plain-text. For example I had a profiles.ini pointing to a fixed profile directory default containing a user.js file with most of my settings. You also need to update and commit the installs.ini for every machine, because Firefox insists to have a unique default-profile entry for every system/install. (And the actual setup was even more complicated and contained a merge-script to clone/update/merge multiple user.js sources, but most people wouldn't need that)

These days I use librewolf which has saner, more secure defaults and a more powerful global (profile-independent) config file. All I now store in my dotfiles is .librewolf/librewolf.overrides.cfg.

[–] yo_scottie_oh@lemmy.ml 1 points 4 days ago

Yeah, I'll have to study some more examples and read the docs. With some creativity I might be able to finagle something using the --target option. Thanks for weighing in.

[–] ClownStatue@piefed.social 5 points 4 days ago (2 children)

Sort of in this topic, I stumbled on this today and thought it looked interesting. Haven’t had a chance to look at it at all.

https://github.com/chezmoi

[–] giddy@quokk.au 2 points 2 days ago (1 children)

I think this will hit the same problem - the profile folders are named differently every install. While you could theoretically back up the whole folder there are references inside that would break if you used it on different systems

[–] giddy@quokk.au 1 points 2 days ago

UPDATE - looks like chezmoi MIGHT handle this https://www.chezmoi.io/reference/templates/functions/mozillaInstallHash/. Haven't found a working example of it in use though

[–] Amaterasu@lemmy.world 1 points 4 days ago

Yeap, chezmoi is my go to for dotfiles management

[–] FauxLiving@lemmy.world 2 points 4 days ago (1 children)

Stow has no “glob for target” option, so you can't do *.profile.

You could write a script that, when you're deploying a stow, symlinks the profile into the right location. You'd have to remember to run it in the future so create a README file and include the instructions.

[–] yo_scottie_oh@lemmy.ml 1 points 4 days ago* (last edited 4 days ago) (2 children)

You mean write a script with something like find followed by stow --target=/path/to/profile/folder firefox?

[–] giddy@quokk.au 1 points 2 days ago

I just look for the folder with -release on the end

    PROFPATH=$(grep 'Path=' $HOME/.var/app/org.mozilla.firefox/.mozilla/firefox/profiles.ini | sed s/^Path=// | grep release)
[–] FauxLiving@lemmy.world 2 points 3 days ago

Yeah, exactly. You could glob with find to locate the directory, store the path in a variable and then pass that to stow.

I'm not sure what you have to do to make Firefox acknowledge the profile, but I believe it simply enumerates all of the folders in the directory and displays all that are valid (but definitely double check on that first).

[–] pinball_wizard@lemmy.zip 1 points 4 days ago

Ansible has extensive tools for applying partial configs to specific configuration files, leaving the rest unchanged.

It's meant for remote hosts, but it works fine pointed at localhost.

Ansible might be overkill - might be enough to make a quick bash script that finds the most recently active Firefox profile and just drops the files you care about there.

This does sound like more than most dotfile managers as are able to handle.