Mirrored ~/.config ?

Post here if you are a new Porteus member and you're looking for some help.
Bogomips
Full of knowledge
Full of knowledge
Posts: 2522
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Mirrored ~/.config ?

Post#16 by Bogomips » 04 Sep 2015, 01:06

OK then,
  • make

    Code: Select all

    #!/bin/bash
    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
    into script, say blue.sh.
  • Then

    Code: Select all

    chmod a+x blue.sh
  • Boot parameter (cheatcode) cliexec=/home/guest/blue.sh
  • Compare as before
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#17 by blue4meridian » 04 Sep 2015, 09:07

Salutations... :good:

It only boots to login.

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: 2522
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Mirrored ~/.config ?

Post#18 by Bogomips » 04 Sep 2015, 11:26

Log in as root, and then compare:

Code: Select all

    diff -qr /home/guest/.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#19 by blue4meridian » 04 Sep 2015, 14:04

Salutations... :good:

Code: Select all

Files .config/Qlipper/qlipper.ini and /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/Qlipper/qlipper.ini differ
Only in .config: leafpad
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
Files .config/spacefm/session-prior and /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/spacefm/session-prior differ

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: 2522
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Mirrored ~/.config ?

Post#20 by Bogomips » 04 Sep 2015, 14:22

Seems to be getting a bit closer. Next try,
  • after doing comparison:

    Code: Select all

    init 4
  • Lastly instead of cliexec, use: guiexec=/home/guest/blue.sh
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

tome
Contributor
Contributor
Posts: 561
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: Mirrored ~/.config ?

Post#21 by tome » 04 Sep 2015, 17:04

Why

Code: Select all

rm -rf --one-file-system  /home/guest/.config
- it will delete all, even files that will not be copied from rootcopy so at this stage you can probably use

Code: Select all

cp -a /root/.config  /home/guest
Another choice is to copy and point (symlink) guest/.config and root/.config to non posix filesystem, but it is not possible to share some configurable files (eg geany). Rootcopy is not universal - you can not overwrite directories with symlinks.

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#22 by blue4meridian » 04 Sep 2015, 19:44

Salutations... :good:

Why run level 4 (init)?.

Same result?

Code: Select all

Files .config/Qlipper/qlipper.ini and /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/Qlipper/qlipper.ini differ
Only in .config: leafpad
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
Files .config/spacefm/session-prior and /mnt/sdb2/porteus/1508290631/rootcopy/root/.config/spacefm/session-prior differ

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: 2522
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Mirrored ~/.config ?

Post#23 by Bogomips » 04 Sep 2015, 21:18

tome wrote:Why

Code: Select all

rm -rf --one-file-system  /home/guest/.config
- it will delete all, even files that will not be copied from rootcopy so at this stage you can probably use

Code: Select all

cp -a /root/.config  /home/guest
Because .config exists and is a directory:

Code: Select all

guest@porteus:~$ diff -qr apak tst/apak
Only in apak: cld
guest@porteus:~$ cp -a tst/apak /home/guest
guest@porteus:~$ diff -qr apak tst/apak
Only in apak: cld
blue4meridian wrote: Why run level 4 (init)?.

Same result?
Good.

Code: Select all

init 4
Starts X.
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#24 by blue4meridian » 05 Sep 2015, 09:31

Salutations... :good:

Still booting to login... although I'm very anxious to see the end result.
I first encountered "changes" like approaches over 10 yrs ago (eg. DSL/cowloop).
Even then I felt default parameter "overwrite" was more pragmatic than "save".

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: 2522
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Mirrored ~/.config ?

Post#25 by Bogomips » 05 Sep 2015, 12:54

blue4meridian wrote:Still booting to login... although I'm very anxious to see the end result.
I first encountered "changes" like approaches over 10 yrs ago (eg. DSL/cowloop).
Even then I felt default parameter "overwrite" was more pragmatic than "save".
Getting insufficient feedback to be of any meaningful help.
  1. Do you normaly have to log in?
  2. blue4meridian wrote:Still booting to login
    Where? In console (init3) or in X?
    • Did you try tome's suggestion? Along the lines of

      Code: Select all

      cp -a /mnt/sdb2/porteus/1508290631/rootcopy/root/.config  /home/guest
      chown -R guest:guest /home/guest/.config
      in /etc/rc.d/rc.local
    • If you were in a console did you login as root and do init 4?
    • Did you try booting with guiexec=/home/guest/blue.sh?
    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#26 by blue4meridian » 05 Sep 2015, 13:41

    Salutations... :good:

    (a)... I do not normally have to login (to the "guest" desktop).

    (b)... I'm auto logged to X (the default login... eg. "guest" desktop).

    (c)... I did not try tome's suggestion (yet).

    (d)... I was not in a console.

    (e)... I booted using the porteus.cfg "cheatcode"... guiexec=/home/guest/mirror.sh

    I will try tome's suggestion and report back.

    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

    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#27 by blue4meridian » 05 Sep 2015, 14:42

    Salutations...

    I tried tome's suggestion and it boots to the default "guest" desktop
    However... the "guest" desktop does not mirror the "root" (superuser) desktop.

    In "root" LxQt panel is top... in "guest" LxQt panel is bottom.
    The same goes for wallpaper "root" does not match "guest".

    This is likely to be the case with all parameters.

    Best Regards...

    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: 2522
    Joined: 25 Jun 2014, 15:21
    Distribution: 3.2.2 Cinnamon & KDE5
    Location: London

    Re: Mirrored ~/.config ?

    Post#28 by Bogomips » 05 Sep 2015, 15:05

    Have you tried booting with guiexec=/home/guest/mirror.sh, and then logging in as guest?
    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#29 by blue4meridian » 05 Sep 2015, 17:21

    Salutations... :good:

    Yes. However... using that script only allows login to "root".
    Attempts to login to "guest" end up only refreshing the login screen.

    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: 2522
    Joined: 25 Jun 2014, 15:21
    Distribution: 3.2.2 Cinnamon & KDE5
    Location: London

    Re: Mirrored ~/.config ?

    Post#30 by Bogomips » 05 Sep 2015, 18:30

    Any better if we remove first statement from mirror.sh script, and just have:

    Code: Select all

        #!/bin/bash
            cp -a /mnt/sdb2/porteus/1508290631/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

    Post Reply