LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 04-23-2023, 06:39 PM   #31
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,428

Original Poster
Blog Entries: 43

Rep: Reputation: 36

I tried copying .cinnamon, after I reset the profile by deleting the desktop user's (my scratchpad look & feel user) home directory. The look and feel stayed after the profile was deleted and reinstated by another login. I then, with this newly generated profile, tried to copy the .cinnamon folder, which somebody somewhere told me to try copying. Nothing else was copied, since the .local folder didn't seem to work. Nothing beyond what I had still!

I may have to reinstall the OS, and try again, but I'm trying to not have to do that quite yet. This is the only machine in which is configured this way.

The goal now, is eventually to reinstall this machine, and make it roughly like my new machine, except for keeping the look & feel and keeping it for all users who logon. Then, the new machine also needs the same look & feel for all users, which should be copied to this machine. The way I join the domain, will change after the reinstall. Of course, before making major changes, besides look & feel, I will need to backup my files from this machine. You can see the filenames because it's copied from the picture. I didn't really want the file names copied, but it won't do any harm right now. In the look and feel, the files will not be spread to other users.

The commands I used to copy the look & feel were:

Old user
Code:
dconf dump / > settings2.txt
New user
Code:
dconf load / < settings2.txt
I tried:
Code:
dconf update
Which seemed to do nothing useful.

That's as much as I picked up from my Internet search. Please help me with the rest. This is now the problem I'm concerned most with.

For those that followed my other thread, I WILL redo the domain and the servers, and I WILL fix my wiring and make an accurate diagram of my network. However, I'm trying to do the least amount of work possible at once. This thread and the last the way I had it was the way to do that.

If anyone can, please help me along. If you think no one knows enough to help, please at least say so here. I have found a lot, but this is all I found so far. I can't get to the part where I copy to the skel, until I get the look and feel right for this desktop user. Then, all it's files, goes to the skel, pretty much.
 
Old 04-25-2023, 12:54 AM   #32
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,428

Original Poster
Blog Entries: 43

Rep: Reputation: 36
https://forums.linuxmint.com/viewtopic.php?t=289728

This wasn't there before. This seems to work. When I apply them, the settings are STILL not perfect, my clock isn't in the right format, and then my workspace launcher isn't configured right. I don't want to have to go to every user and fix that, as part of my work, though I could do that, and it would work.

HOWEVER, it's close enough. I only should worry about that, on my personal users, which may change from my standard look & feel. Since I only use 1 for day to day use, that will limit my changes to once per computer.

To make it easier now, I will do a script which will do the work for me. Can't close yet, because I need the script and then I need to make sure it works with a fresh install. But I think I'm on the right track!
 
Old 04-26-2023, 08:24 AM   #33
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,616

Rep: Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555
Quote:
Originally Posted by des_a View Post
After research, for those that don't know, dconf seems to be a tool for gnome settings. Whether it's around in later versions, unknown. But since cinnamon is based off of gnome, it inherited this tool.

It's a little bit like the windows registry, but for gnome, to my understanding, except it only stores configuration for gnome, with mostly visible settings, NOT everything to configure.
dconf isn't limited to Gnome (or Gnome-based software).

It is a part of both GTK 3 and GTK 4, and thus any GTK apps (or non-GTK apps that choose to depends on dconf) may store data in that single binary database.

It also isn't limited to configuration - it also contains state information (e.g. window position, search/replace history, etc) - stuff that most people don't want synced between different machines/users and thus should be kept separate, but all gets bunged together in a single obfuscated file.

There are also numerous examples online of people having issues due to corruption of the file.

What puzzles me is why it seems nobody has forked it and produced a text-based version.


Last edited by boughtonp; 04-26-2023 at 08:30 AM.
 
Old 04-26-2023, 12:17 PM   #34
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,428

Original Poster
Blog Entries: 43

Rep: Reputation: 36
Good to know. Now trying to come up with a solution that has the same effect as copying to the default profile (at least on XP), in Linux Mint Cinnamon. The part I'm working on now, is scripts. I spent last night saving the data on my Linux partition. For some reason, partimage wouldn't work suddenly, and appearently it's a bug. So I used dd to copy the partition, which isn't best, but it will work for now. It was complaining that it couldn't read from block 0, but we know that the bootloader and partitions are healthy. I will check, but I think my scripts are good to go.
 
Old 04-27-2023, 01:15 PM   #35
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,428

Original Poster
Blog Entries: 43

Rep: Reputation: 36
dconf database reminds me, just a bit, of the windows registry. When I can finally make my new OS, using Linux, I will probably have some sort of registry like concept too. It's a wonderful idea! I don't know that it will be called the registry, and it likely won't have the same syntax and be designed the exact same way. Let THAT ABILITY come into play when using wine to run software. I'm thinking, I'll have a linux compatibility layer, where things are done the unix way, then a layer on top of that, where you have files, plus a registry, then on top of that, the actual registry like concept. The linux way alone, is not the worst, but in this case, settings are scattered all over the place, and that does make things a bit more difficult. Still working on my solution. I'm at my local library, and my laptop and programs are at home, so I can't show you right now, the progress I've made. But I have made some progress.
 
Old 04-27-2023, 04:25 PM   #36
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,616

Rep: Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555

Just because the legacy mistake of scattering dotfiles in a user's home directory is terrible, doesn't mean lumping everything in a single binary file is a good solution.

There is a better solution than both: the XDG Base Directory specification makes it easy to take snapshots, transfer settings between accounts/systems, etc. KDE came up with it over a decade ago, and it solves this by putting everything in predictable locations without conflating user settings, application state, caches, etc (unless one wishes to configure it that way, because the locations are configurable if the user decides that's what they want).

Only problem is the significant number of software developers that are too stupid and/or arrogant to implement it, or will do it but make you jump through lots of hoops to use, so we still have the situation of dotfiles being everywhere which makes transferring settings far more effort than it should be.

 
Old 04-29-2023, 03:33 PM   #37
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,428

Original Poster
Blog Entries: 43

Rep: Reputation: 36
OK. Thanks for the input. I'll look into the KDE way of doing things, but since my idea was just extra information that may help someone, I won't discuss in more detail than these two posts for now. But I will definately look into the KDE way, before I get the the point of designing my system. While I believe I'd have to have a legacy layer no matter how I did it (that way every program does not have to be rewritten with it in mind), I'll look into the KDE way for the next layer. Maybe it's better than what I imagine thus far? When I get to the point I want to be at, that may be a good idea. There ARE some advantages to the old way, that I would NEVER want to completely use, thus my idea, which is hard to explain in detail here, what I gave was just an overview. But KDE may have a better way. By the way, I would likely use a text file format for my idea if I did it that way. Very unsure of syntax at this point.

OK. Back to main topic, I think I'm done! I'm going to post my solution in the next few posts.
 
Old 04-29-2023, 03:49 PM   #38
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,428

Original Poster
Blog Entries: 43

Rep: Reputation: 36
Here's my solution:

I started, by creating a folder in the home folder, called settings. There is a subfolder, called gui, where most of the actual workings of my system are. This is copied to /etc/skell. Then you run, /etc/skel/settings/gui/install.sh, after giving it +x permission

install.sh
Code:
#! /bin/sh


echo Installing...

sudo mkdir -p /etc/skel/.config/autostart
sudo cp look/apply_look.desktop /etc/skel/.config/autostart


sudo cp look/apply_look.sh /usr/bin
sudo cp look/reset_look.sh /usr/bin

sudo chmod 777 /usr/bin/apply_look.sh
sudo chmod 777 /usr/bin/reset_look.sh

echo
Under look, you need for my look, at minimum, .cinnamon and .local folders.

You need to have a .desktop file as follows

apply_look.desktop
Code:
[Desktop Entry]
Type=Application
Name=apply_look
Comment=Applies look and feel
Exec=/usr/bin/gnome-terminal --window --wait -- /usr/bin/apply_look.sh
X-GNOME-Autostart-enabled=true
NoDisplay=false
Hidden=false
Terminal=false
...And these two .sh files:

apply_look.sh
Code:
#! /bin/bash


echo Applying default look...

if [ -f ~/settings/lookapplied ]
then
 sleep 11
 exit 2
fi

dconf load / < ~/settings/gui/look/settings.txt

cp -r -f ~/settings/gui/look/.cinnamon ~/
cp -r -f ~/settings/gui/look/.local ~/

touch ~/settings/lookapplied

echo Rebooting in 1 minute...
read -s -n 1 -p "Press any key to continue rebooting..."
shutdown -r +1 "Rebooting for look..."


echo
sleep 11
reset_look.sh
Code:
#!/bin/sh


echo Resetting look...

dconf load / < ~/setttings/gui/default/defsettings.txt

sudo rm -r -f /etc/skel
sudo cp -r -f ~/settings/gui/default/skel /etc

echo Rebooting in 1 minute...
read -s -n 1 -p "Press any key to continue rebooting..."
shutdown -r +1 "Rebooting for look..."
echo
Under look, you also need a file, named settings.txt, made this way:
Code:
dconf dump / > settings.txt
Do this on the user you want to copy.

Under default, you need a copy of /etc/skel, and a file made this way, on a user with no changes:
Code:
dconf dump / > defsettings.txt
After you run the install file from the skel, you delete any existing profiles, being sure to back up your work.

The next time you log in, it will create the profile, including with the settings folder. On the log on to cinnamon, it will apply the look, and reboot. After you reboot, it will leave the look, and will have applied the look.
 
Old 04-29-2023, 03:51 PM   #39
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,428

Original Poster
Blog Entries: 43

Rep: Reputation: 36
A little harder than windows for some reason, but effective. Hope this helps someone else! Only applicable to the cinnamon desktop.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware64 current multilib on kaveri mobile APU uses default MESA driver core profile 3.2? dextirias Linux - Laptop and Netbook 2 12-25-2017 06:15 AM
drag-drop copying and cp command both hang at last few KB when copying to flash drive slacker_ Linux - Newbie 1 09-05-2013 07:17 AM
TERM variable TERM=linux keirvt Ubuntu 1 12-23-2012 06:07 PM
[SOLVED] Copying the files inside a folder, without copying the folder (hopefully easy) tibberous Linux - Software 3 12-23-2010 01:50 AM
Message at boot: "Choose a profile: 'default' or 'default.backup' " rm_-rf_windows Mandriva 1 07-07-2007 08:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 06:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration