Merging Custom Portable Config to a Debian Installation

Post Reply
Random Void User
Posts: 56
Joined: 13.07.2024 21:19

Merging Custom Portable Config to a Debian Installation

Post by Random Void User »

I have two different Linux PCs. I wish to copy settings from a Linux "portable" CudaText folder to a Debian-installed CudaText. The portable folder has more plugins and themes than the Debian package. Do all the 'py' and 'data' files in $XDG_CONFIG_HOME/cudatext override the same ones in /usr/share/cudatext? Does CudaText merge these folders, such that if I delete duplicates from ~/.config/cudatext, the app will then find them in /usr/share/cudatext? Thanks!
main Alexey
Posts: 2536
Joined: 25.08.2021 18:15

Re: Merging Custom Portable Config to a Debian Installation

Post by main Alexey »

>Do all the 'py' and 'data' files in $XDG_CONFIG_HOME/cudatext override the same ones in /usr/share/cudatext?

yes and no. only STANDARD plugs/datas must be in /usr/share/cudatext, not additional plugs/data! so pls dont copy additional data/plugs there, they must go directly to ~/.config/cudatext.

>Does CudaText merge these folders

Cud runs this command for /usr/share dirs:
'cp'
with options:
'-R', '-u', '-t'
so maybe it merges data, it's how 'cp' works.
Random Void User
Posts: 56
Joined: 13.07.2024 21:19

Re: Merging Custom Portable Config to a Debian Installation

Post by Random Void User »

Assume no changes to Debian system files. The question is about duplication and override at the user level.

Addons Manager lacks file permissions to modify /usr/share/cudatext contents; regardless, Addons Manager would conflict with apt/dpkg trying to manage those files, namely:

Code: Select all

$ mkdir foo
$ dpkg-deb --vextract cudatext_1.223.5.2-1_gtk2_amd64.deb foo
However a user can add things in ~/config/cudatext: themes, lexers, Python plugins, icons, and settings. That is where Addons Manager puts stuff.

My question is what CudaText loads if duplicate subfolders exist in both $XDG_CONFIG_HOME/cudatext and /usr/share/cudatext. Which folder takes priority? Linux $XDG_CONFIG_HOME normally overrides system files. It's a convention to permit user customization of system-wide defaults.

Thanks!
main Alexey
Posts: 2536
Joined: 25.08.2021 18:15

Re: Merging Custom Portable Config to a Debian Installation

Post by main Alexey »

>My question is what CudaText loads if duplicate subfolders exist in both $XDG_CONFIG_HOME/cudatext and /usr/share/cudatext. Which folder takes priority?

there is no choice here: one folder or another. On first start of new version (Cud sees first start by record in packages.ini) Cud pre-copies content of /usr/share/cudatext to ~/.config/cudatext.
it runs 'cp' with flags -R -u -t.
when done, Cud uses config in ~/.config/cudatext.
Post Reply