How can I make saved dconf settings info 'executable'? thank you

Questions about other topics and general discussion about LMDE
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
User avatar
medea
Level 1
Level 1
Posts: 41
Joined: Tue May 30, 2023 7:48 am

How can I make saved dconf settings info 'executable'? thank you

Post by medea »

Hey The Forum,

I'm on LMDE5 with a cinnamon desktop (all updated).

I am halfway through trying (experimenting, first time) to follow the dconf instructions in this post (now locked to new question comments, hence my new post).
viewtopic.php?p=973747#p973747

Basically, I want to save (copy/export in effect) all my appearance settings from my current LMDE5 system, put a new LMDE5 install on a usb key (full system type not live type), and then apply (paste/import in effect) all of these settings onto that new install so I don't have to spend hours digging around in the weeds of the new system settings to make the new install look like my current install.

I have followed the copy/export bit (called a 'dump process' in Linux jargon I think) and have files in my home folder of my cinnnamon, nemo, gtk, gnome settings, that should (according to the post) contain all my settings ready to be applied to a new install.

But I am stuck at the bit about 'make it executable':

"Each of them in a a batch file, make it executable and dump on one pc and load on an another."

Could someone please explain what this term means in this context, and how this can be achieved (in basic beginner level terms)?

I should add that I'm not a confident command line user at all (too much margin for error for those who don't understand what they are doing - a great tool for experts, but a constant source of dread and failure for amateurs).
So if anyone knows of a link on this forum to reliable 'copy and paste' commands to perform this process ('make it executable'), that would be ideal.

Many thanks to anyone who can help me with this problem.

I've been putting off trying this until I had a decent stretch of uninterrupted free time in which to get into this. Now the holidays are here I would really like to get this done.

PS. I asked a more general form of this question here at the end of the summer, but being general it got a bit derailed with (well-intentioned) offers to buy/install new software to achieve a more general solution.
So having learned from that, I have tried to be as specific as I can in my question title and text about what information I am seeking in the hope of avoiding that kind of generalized reply this time.
be a good animal.
User avatar
axisofevil
Level 4
Level 4
Posts: 388
Joined: Mon Nov 14, 2011 12:22 pm

Re: How can I make saved dconf settings info 'executable'? thank you

Post by axisofevil »

"Each of them in a a batch file, make it executable and dump on one pc and load on an another."

This is incorrect - the files are text files.
User avatar
MiZoG
Level 8
Level 8
Posts: 2395
Joined: Fri Jan 26, 2018 8:30 pm
Location: Athens, Greece

Re: How can I make saved dconf settings info 'executable'? thank you

Post by MiZoG »

"Batch file..." just a Windows-jargon term but user actually suggested creating a shell script and making it executable.

Example of dump process:

Open a text editor and insert:

Code: Select all

#!/bin/sh

dconf dump /org/cinnamon/ > ~/Documents/Backups/cinnamon.dconf
dconf dump /org/nemo/ > ~/Documents/Backups/nemo.dconf
dconf dump /org/gtk/ > ~/Documents/Backups/gtk.dconf
dconf dump /org/gnome/ > ~/Documents/Backups/gnome.dconf
Save file with .sh suffix and make it executable:
chmod u+x mycinnamonsettings.sh

Execute in a terminal
./mycinnamosettings.sh

et voila your settings backup is created
You can create a similar script to load those saved settings into your new setup.

Disclaimer: I have never tried myself restoring settings in Mint this way... since my Cinnamon looks very close to default.
User avatar
medea
Level 1
Level 1
Posts: 41
Joined: Tue May 30, 2023 7:48 am

Re: How can I make saved dconf settings info 'executable'? thank you

Post by medea »

MiZoG wrote: Sun Dec 24, 2023 2:41 am "Batch file..." just a Windows-jargon term but user actually suggested creating a shell script and making it executable.

Example of dump process:

Open a text editor and insert:

Code: Select all

#!/bin/sh

dconf dump /org/cinnamon/ > ~/Documents/Backups/cinnamon.dconf
dconf dump /org/nemo/ > ~/Documents/Backups/nemo.dconf
dconf dump /org/gtk/ > ~/Documents/Backups/gtk.dconf
dconf dump /org/gnome/ > ~/Documents/Backups/gnome.dconf
Save file with .sh suffix and make it executable:
chmod u+x mycinnamonsettings.sh

Execute in a terminal
./mycinnamosettings.sh

et voila your settings backup is created
You can create a similar script to load those saved settings into your new setup.

Disclaimer: I have never tried myself restoring settings in Mint this way... since my Cinnamon looks very close to default.
Many thanks for the reply MizoG (and happy holidays if you are celebrating where you are).

I must admit I don't feel confident experimenting with the executable process described, which is entirely due to my lack of experience and not your instructions.
But as I understand from your explanation, this is only an potential extra complication-enhancement someone is proposing for those who know what they are doing, so am I right in thinking that I can still do this dump/load process without that step?

As far as I have got is running the first part of the code (dump process) in the command line:

Code: Select all

dconf dump /org/cinnamon/ > cinnamon.dconf
dconf dump /org/nemo/ > nemo.dconf
dconf dump /org/gtk/ > gtk.dconf
dconf dump /org/gnome/ > gnome.dconf
Which has given me four text documents with the names cinnamon.dconf, nemo.dconf, gtk.dconf, gnome.dconf which are currently in my home folder.

So is the next step that I copy and paste these four documents into the home folder of my new LMDE5 install, then run the second part of the code (load process) in the command line:

Code: Select all

dconf load /org/cinnamon/ < cinnamon.dconf
dconf load /org/nemo/ < nemo.dconf
dconf load /org/gtk/ < gtk.dconf
dconf load /org/gnome/ < gnome.dconf
and this will apply all of the settings from my current system to the new install?

I will probably do these instructions one line at a time to see how and which things change each time (rather than everything at once, which might cause conflicts and be more likely to freeze or crash my system).

Many thanks if you can confirm and I will give it a try.
be a good animal.
User avatar
MiZoG
Level 8
Level 8
Posts: 2395
Joined: Fri Jan 26, 2018 8:30 pm
Location: Athens, Greece

Re: How can I make saved dconf settings info 'executable'? thank you

Post by MiZoG »

medea wrote:... this will apply all of the settings from my current system to the new install?
Yes, probably. However... this sounds like a bulletproof method to reproduce custom personal settings from one installation to LMDE5 to another.
From a system, for instance, with Cinnamon 5.8 to a system that runs the same version of Cinnamon 5.8.
Because you will apply your settings from an older to a newer version of this desktop environment, there is always the possibility (very small, all right) that something is done differently in the newer version. I may blow this out of proportion but a warning doesn't hurt.
Shiva
Level 3
Level 3
Posts: 141
Joined: Thu Jul 07, 2022 11:25 am

Re: How can I make saved dconf settings info 'executable'? thank you

Post by Shiva »

medea wrote: Sat Dec 23, 2023 7:49 pm I want to save (copy/export in effect) all my appearance settings from my current LMDE5 system, put a new LMDE5 install on a usb key (full system type not live type), and then apply (paste/import in effect) all of these settings onto that new install so I don't have to spend hours digging around in the weeds of the new system settings to make the new install look like my current install
Hi,
- About "old" and "new" install, you may encounter far more problems if the username is different. I gave a detailed explanation here :
viewtopic.php?p=2406499#p2406499

- your script misses many settings (but maybe we've only part of it here, so see the list below not as a critic but as a reminder) :
a) Nemo's bookmarks file : ~/.config/gtk-3.0/bookmarks which also contain the user's name
b) your favorite docs
c) custom icons if you have some
d) all apps settings

A piece of advice here ; I would install, at least on the old system, the dconf editor :

Code: Select all

apt install dconf-editor 
Open it, be cautious with it : read but don't change values if you don't know what you're doing. Look carefully at the values preceded by a bold pencil. This icon means that these values are not the default ones but have been changed by the user (through the panel settings mostly).

Last. If you're absolutely satisfied with your current conf, nothing prevents you from dumping and loading your whole settings :

Code: Select all

dconf dump / > All_my_Settings.txt
Opening the file in xreader and consulting it would do no harm and give you an idea of possible problems when restoring (loading) it in a new system (username conflict, apps to install before configuring because they have an icon in the panel...)
User avatar
medea
Level 1
Level 1
Posts: 41
Joined: Tue May 30, 2023 7:48 am

Re: How can I make saved dconf settings info 'executable'? thank you

Post by medea »

MiZoG wrote: Tue Dec 26, 2023 12:18 pm
medea wrote:... this will apply all of the settings from my current system to the new install?
Yes, probably. However... this sounds like a bulletproof method to reproduce custom personal settings from one installation to LMDE5 to another.
From a system, for instance, with Cinnamon 5.8 to a system that runs the same version of Cinnamon 5.8.
Because you will apply your settings from an older to a newer version of this desktop environment, there is always the possibility (very small, all right) that something is done differently in the newer version. I may blow this out of proportion but a warning doesn't hurt.
Thank you for the clarification MiZoG (and happy new year to you!).

"Yes, probably" I like.
In the post I linked (OP^) to the dconf load/dump instructions I want to use, several (most) Mint users (with more experience than me) reported success using this method, so your "yes probably" and their precedents makes me feel this is worth my trying.

Your qualified ("very small" possibility) note that applying old dconf settings to a newer version of cinnamon may not carry over absolutely every setting is also good to know, to account for that possibility if I encounter it.

My next step is making a bootable full LMDE system (not live or permanence) usb drive to apply this too, but that is another topic.

Many thanks again.
Last edited by medea on Wed Jan 03, 2024 6:04 am, edited 1 time in total.
be a good animal.
User avatar
medea
Level 1
Level 1
Posts: 41
Joined: Tue May 30, 2023 7:48 am

Re: How can I make saved dconf settings info 'executable'? thank you

Post by medea »

Shiva wrote: Tue Dec 26, 2023 1:37 pm
medea wrote: Sat Dec 23, 2023 7:49 pm I want to save (copy/export in effect) all my appearance settings from my current LMDE5 system, put a new LMDE5 install on a usb key (full system type not live type), and then apply (paste/import in effect) all of these settings onto that new install so I don't have to spend hours digging around in the weeds of the new system settings to make the new install look like my current install
Hi,
- About "old" and "new" install, you may encounter far more problems if the username is different. I gave a detailed explanation here :
viewtopic.php?p=2406499#p2406499

- your script misses many settings (but maybe we've only part of it here, so see the list below not as a critic but as a reminder) :
a) Nemo's bookmarks file : ~/.config/gtk-3.0/bookmarks which also contain the user's name
b) your favorite docs
c) custom icons if you have some
d) all apps settings

A piece of advice here ; I would install, at least on the old system, the dconf editor :

Code: Select all

apt install dconf-editor 
Open it, be cautious with it : read but don't change values if you don't know what you're doing. Look carefully at the values preceded by a bold pencil. This icon means that these values are not the default ones but have been changed by the user (through the panel settings mostly).

Last. If you're absolutely satisfied with your current conf, nothing prevents you from dumping and loading your whole settings :

Code: Select all

dconf dump / > All_my_Settings.txt
Opening the file in xreader and consulting it would do no harm and give you an idea of possible problems when restoring (loading) it in a new system (username conflict, apps to install before configuring because they have an icon in the panel...)
Thank you for the reply Shiva (and happy new year to you).

My intention is to give a different username to the new full LMDE install (on a usb flashdrive) I want to apply these dconf settings to.
Basically I want an LMDE system I can put in my pocket and take to use on PCs at friends houses, the library, etc, so I don't have to take a laptop everywhere. I am at the age when my memory is not what it was when I was in my 20s, so I'd rather lose a usb key than a laptop if I am having a forgetful day.

So I want to make - in effect - a 'semi-disposable' LMDE system (if I lose it I can just run up another identical one in a few hours) that has the desktop exactly as I'm used to on my home machine (big text, big icons for older eyes and other accessibility additions) but with a different password so if I should lose it somewhere it doesn't contain anything that a bad person could use to compromise my home system directly or remotely (a possibility that seems unlikely to me, but a different password seems safest policy).

So I think I will press ahead, but I will bear in mind your warning that a password difference may cause conflicts, and use you comment about installing and referring to dconf editor for reference:

"A piece of advice here ; I would install, at least on the old system, the dconf editor :

Code: Select all

apt install dconf-editor 
Open it, be cautious with it : read but don't change values if you don't know what you're doing. Look carefully at the values preceded by a bold pencil. This icon means that these values are not the default ones but have been changed by the user (through the panel settings mostly)."

That gives me a route of last resort to recover any settings missed because of password conflicts, so is super-useful information and I am very grateful you mentioned that.

re

"Last. If you're absolutely satisfied with your current conf, nothing prevents you from dumping and loading your whole settings :

Code: Select all

dconf dump / > All_my_Settings.txt
Opening the file in xreader and consulting it would do no harm and give you an idea of possible problems when restoring (loading) it in a new system (username conflict, apps to install before configuring because they have an icon in the panel...)"

I have to admit that (with my current level of understanding-experience) even if I had this xreader file, I feel as if I very probably wouldn't know how to make sense of what it was telling me, so I will save this suggestion for a later time when I have a bit more experience of playing with settings.

Thank you again for your help.
be a good animal.
Shiva
Level 3
Level 3
Posts: 141
Joined: Thu Jul 07, 2022 11:25 am

Re: How can I make saved dconf settings info 'executable'? thank you

Post by Shiva »

medea wrote: Tue Jan 02, 2024 9:06 pm Thank you for the reply Shiva (and happy new year to you).
Happy New Year too.

You didn't choose an easy way to do your job and a lot of difficulties are lying front of you.

However, there seem to be a much easier solution if you're happy with your laptop's distro and that's Foxclone which allows you to clone your whole system on another disk or partition if this disk or partition is big enough to contain it (if your LMDE partition is 100 Gb then the host disk should at least have that size).

There's another reason to tell you about that software : regularly, the developer "travels" through this forum under the AndyMH alias. You couldn't find a better place and a better person to speak about it and see if it fits your wishes.
User avatar
medea
Level 1
Level 1
Posts: 41
Joined: Tue May 30, 2023 7:48 am

Re: How can I make saved dconf settings info 'executable'? thank you

Post by medea »

Thank you for the reply Shiva. Or namaste if that is your preferred thankyou (it's the only indian word I know, but 'thank you' is probably the best word to start with in any new language anywhere).

Unfortunately the block of free time time I thought I had to play with this over christmas got consumed with family matters, but maybe that's for the best after all, as your advice makes me feel I would only be inviting frustration and failure upon myself to attempt this with my current level of knowledge. So I am currently reading up on grubs.

Also my question has evolved/changed a bit, as I was able to download or save (using dconf dump) my dconf info for cinnamon, gnome, gtx and nemo into files without encountering any problems.
Whether running the process in reverse on a new install (using dconf load) will work as smoothly, or I will hit the potential problems you outlined, is yet to see.

So my current sticking point is how to install LMDE on a usb drive and not end up with a grubless install that will only work on my home machine and not any machine anywhere else (library/college/cafe).
I'd prefer that installation to be on my 65gb flashdrive, but I also have a 500gb external usb ssd I was saving for data storage (if 65gb is not big enough).
So anticipating and resolving that grub issue is the thing I am currently working on, and then I can come back to this.

These issues are like the Sorcerer's apprentice brooms (in Fantasia) aren't they? In seeking the answer to one problem, one inevitably finds two new problems to solve before even attempting to resolve the first.

I will look at foxclone. I have seen AndyMH around the forum and he seems a helpful and wise person, so that is encouraging re usefulness of the software.
As it's not in LMDE repository or flatpaks I am going to try Clonezilla first, and if that doesn't work maybe give it a go.

Anyway thank you for your helpful comments and feedback and hope to be back in this thread once I get the new usb install resolved.
be a good animal.
User avatar
axisofevil
Level 4
Level 4
Posts: 388
Joined: Mon Nov 14, 2011 12:22 pm

Re: How can I make saved dconf settings info 'executable'? thank you

Post by axisofevil »

Clonezilla is typically a small bootable application from USB for either taking an exact copy of a disks to another disk, or taking compressed images of multiple disks to a single disk.
It can do other things, but its basically intended for complete backups, to produce the same disk structure. It needs to copy every data block, so it can take some time.

Probably not what you want, at this time.
But 65GB is plenty big enough unless you want to store a lot of data.
20GB is probably just about enough for your system - but you can usefully use the other 40GB for /home
User avatar
medea
Level 1
Level 1
Posts: 41
Joined: Tue May 30, 2023 7:48 am

Re: How can I make saved dconf settings info 'executable'? thank you

Post by medea »

Thanks for your comment, axisofevil.

Interesting to hear what Clonezilla can and can't do. I was under the impression (from threads/comments I have read on this forum and elsewhere previously) that seem to say it is the most versatile of all the options. So now I'm feeling confused.

OK I am going to post another comment today to get some clarification on what each of the varied backup options available to mint users actually do and don't exactly.
I think I really need to get that crystal clear in my thinking before coming back to what I am trying to do above.
be a good animal.
Post Reply

Return to “Other Topics & Open Discussion”