Mirrored ~/.config ?

Post here if you are a new Porteus member and you're looking for some help.
User avatar
blue4meridian
Shogun
Shogun
Posts: 279
Joined: 29 Sep 2014, 05:58
Distribution: 64bit LxQt (Plastique/Mikachu)
Location: Jersey City N.J. USA

Mirrored ~/.config ?

Post#1 by blue4meridian » 02 Sep 2015, 22:24

Salutations... :good:

I'm a big fan of overwriting defaults and using persistent parameters by either
copying folders to ~/rootcopy and/or making a module from the rootcopy folder.

All doing this as opposed to using ~/changes (cowloop?) and the inherent possibility of it's corruption.

Lately... I've been taking /root/.config and copying it to ~/porteus/rootcopy/root
However... this doesn't work with /home/guest/.config

So... I assume the most practical solution is to mirror the
/root/.config to overwrite the /home/guest/config ...

Is there a way to mirror /root/.config to overwrite /home/guest/.config???

Best Regards... :beer:

Posted by 100.1.102.215 via http://webwarper.net
This is added while posting a message to avoid misusing the service
Last edited by blue4meridian on 06 Sep 2015, 13:33, edited 2 times in total.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5558
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Mirrored ~/.config ?

Post#2 by brokenman » 03 Sep 2015, 03:56

It should work. It is probably permissions if you are copying as root.

Code: Select all

mkdir -p /mnt/sdxY/rootcopy/home/guest/ 
cp -a --parents /root/.config/* /mnt/sdxY/rootcopy/home/guest/.config/

## Just to be sure
chown -R guest:guest /mnt/sdxY/rootcopy/home/guest 
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
blue4meridian
Shogun
Shogun
Posts: 279
Joined: 29 Sep 2014, 05:58
Distribution: 64bit LxQt (Plastique/Mikachu)
Location: Jersey City N.J. USA

Re: Mirrored ~/.config ?

Post#3 by blue4meridian » 03 Sep 2015, 10:53

Salutations... :good:

Outstanding... :Yahoo!:

Now how do I automate the above example so that on startup...
/mnt/sd**/porteus/rootcopy/root/.config overwrites... /home/guest/.config ???

If I can achieve this overwrite successfully ~/changes will NEVER be needed
because the changes will be done from ~/rootcopy or even from ~/modules (rootcopy_.xzm).

The idea is... every time I make changes in superuser and copy them manually from /root/.config to...
/mnt/sd**/porteus/rootcopy/root/.config OR automatically from /mnt/sd**/porteus/rootcopy/root/.config to...
/home/guest/.config that on startup... "guest" has the same default as "superuser".

The added advantage (other than persistent default) is to reduce corruption
and conserve resources by using "overwrite" instead of "save" (eg. DSL cowloop).
Cowloop

Best Regards... :beer:

Posted by 100.1.102.215 via http://webwarper.net
This is added while posting a message to avoid misusing the service
Last edited by blue4meridian on 03 Sep 2015, 11:58, edited 6 times in total.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Mirrored ~/.config ?

Post#4 by Bogomips » 03 Sep 2015, 11:41

Maybe in the porteus/rootcopy/etc/rc.d/rc.local script inserting:

Code: Select all

cp -a /mnt/sd**/porteus/rootcopy/root/.config  /home/guest/.config
chown -R guest:guest /home/guest/.config
could work?
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
blue4meridian
Shogun
Shogun
Posts: 279
Joined: 29 Sep 2014, 05:58
Distribution: 64bit LxQt (Plastique/Mikachu)
Location: Jersey City N.J. USA

Re: Mirrored ~/.config ?

Post#5 by blue4meridian » 03 Sep 2015, 12:05

Salutations... :good:

The "**" wildcard could be problematic if booting from multiple installs.
This is why I place different rootcopy's (and ~/changes) in timestamped dated folders (eg. 1509030803)
Will "**" search for the correct boot device and/or partition?

Best Regards... :beer:

Posted by 100.1.102.215 via http://webwarper.net
This is added while posting a message to avoid misusing the service
Last edited by blue4meridian on 03 Sep 2015, 12:53, edited 2 times in total.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Mirrored ~/.config ?

Post#6 by Bogomips » 03 Sep 2015, 12:20

Corrected previous post. Did not take into account .config being directory.

First try suggestion without wildcard. See if it works. :unknown:
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
blue4meridian
Shogun
Shogun
Posts: 279
Joined: 29 Sep 2014, 05:58
Distribution: 64bit LxQt (Plastique/Mikachu)
Location: Jersey City N.J. USA

Re: Mirrored ~/.config ?

Post#7 by blue4meridian » 03 Sep 2015, 14:39

Salutations... :good:

Tried it. Nothing so far.

Best Regards... :beer:

Posted by 100.1.102.215 via http://webwarper.net
This is added while posting a message to avoid misusing the service

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Mirrored ~/.config ?

Post#8 by Bogomips » 03 Sep 2015, 19:11

After a bit of experimentation with cp -a, maybe this could work:

Code: Select all

rm -rf --one-file-system  /home/guest/.config
cp -a /mnt/sd**/porteus/rootcopy/root/.config  /home/guest
chown -R guest:guest /home/guest/.config
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
blue4meridian
Shogun
Shogun
Posts: 279
Joined: 29 Sep 2014, 05:58
Distribution: 64bit LxQt (Plastique/Mikachu)
Location: Jersey City N.J. USA

Re: Mirrored ~/.config ?

Post#9 by blue4meridian » 03 Sep 2015, 20:18

Salutations... :good:

Still nothing yet.

Best Regards... :beer:

Posted by 100.1.102.215 via http://webwarper.net
This is added while posting a message to avoid misusing the service

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Mirrored ~/.config ?

Post#10 by Bogomips » 03 Sep 2015, 20:36

^ This is not very clear. You should have got something if the above code was in rc.local script of rootcopy folder.
  • The .config in /home/guest should have been deleted
  • So, is .config different from /mnt/sd**/porteus/rootcopy/root/.config?
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
blue4meridian
Shogun
Shogun
Posts: 279
Joined: 29 Sep 2014, 05:58
Distribution: 64bit LxQt (Plastique/Mikachu)
Location: Jersey City N.J. USA

Re: Mirrored ~/.config ?

Post#11 by blue4meridian » 03 Sep 2015, 21:33

Salutations... :good:

I used that script to overwrite the default script.

Best Regards... :beer:

Posted by 100.1.102.215 via http://webwarper.net
This is added while posting a message to avoid misusing the service

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Mirrored ~/.config ?

Post#12 by Bogomips » 03 Sep 2015, 22:01

In the start up screen you should have seen if .config was being deleted, unless it whizzes past you too fast. Then the next thing to investigate is to see what is in .config, and whether it is different from the /sd../../root/.config. Can you not see the contents of .config?
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
blue4meridian
Shogun
Shogun
Posts: 279
Joined: 29 Sep 2014, 05:58
Distribution: 64bit LxQt (Plastique/Mikachu)
Location: Jersey City N.J. USA

Re: Mirrored ~/.config ?

Post#13 by blue4meridian » 03 Sep 2015, 22:21

Salutations... :good:

Code: Select all

rm -rf --one-file-system  /home/guest/.config
cp -a /mnt/sdb2/porteus/1508290631/rootcopy/root/.config  /home/guest
chown -R guest:guest /home/guest/.config
Best Regards... :beer:

Posted by 100.1.102.215 via http://webwarper.net
This is added while posting a message to avoid misusing the service

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Mirrored ~/.config ?

Post#14 by Bogomips » 03 Sep 2015, 23:42

So, ok, after rootcopy has been processed on startup, open a terminal and post the output of command, if not too long:

Code: Select all

diff -qr .config  /mnt/sdb2/porteus/1508290631/rootcopy/root/.config
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
blue4meridian
Shogun
Shogun
Posts: 279
Joined: 29 Sep 2014, 05:58
Distribution: 64bit LxQt (Plastique/Mikachu)
Location: Jersey City N.J. USA

Re: Mirrored ~/.config ?

Post#15 by blue4meridian » 04 Sep 2015, 00:10

Salutations... :good:

Permission denied? :unknown:

Code: Select all

Files .config/Qlipper/qlipper.ini and /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/Qlipper/qlipper.ini differ
Files .config/Trolltech.conf and /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/Trolltech.conf differ
Only in /mnt/sdb2/porteus/1508290631/rootcopy/root/.config: autostart
Only in /mnt/sdb2/porteus/1508290631/rootcopy/root/.config: cairo-compmgr
Only in /mnt/sdb2/porteus/1508290631/rootcopy/root/.config: fontconfig
diff: /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/gconf/apps/%gconf.xml: Permission denied
diff: /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/gconf/apps/nm-applet/%gconf.xml: Permission denied
Only in /mnt/sdb2/porteus/1508290631/rootcopy/root/.config: google-chrome
Only in /mnt/sdb2/porteus/1508290631/rootcopy/root/.config: gtk-2.0
Files .config/lxqt/globalkeyshortcuts.conf and /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/lxqt/globalkeyshortcuts.conf differ
Files .config/lxqt/lxqt.conf and /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/lxqt/lxqt.conf differ
Files .config/lxqt/panel.conf and /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/lxqt/panel.conf differ
Files .config/lxqt/session.conf and /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/lxqt/session.conf differ
Only in /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/lxqt: windowmanagers.conf
diff: /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/lxterminal/lxterminal.conf: Permission denied
Files .config/pcmanfm-qt/lxqt/settings.conf and /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/pcmanfm-qt/lxqt/settings.conf differ
Files .config/qxkb.pid and /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/qxkb.pid differ
Files .config/spacefm/session and /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/spacefm/session differ
Only in /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/spacefm: session-last
Only in /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/spacefm: session-prior
diff: /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/transmission/settings.json: Permission denied
Best Regards... :beer:

Posted by 100.1.102.215 via http://webwarper.net
This is added while posting a message to avoid misusing the service

Post Reply