Quantcast
Viewing all articles
Browse latest Browse all 4919

Raspberry Pi OS • Re: GUI/config step-by-step tweak collection

My methods, expanded upon from my notes at the time:

20241102 set up a new vanilla card for labwc config research
used imager to burn latest 64-bit image
did NOT preset any settings using imager
booted, answered initial minimal setup questions, let it update, rebooted

20241102 built a tool to identify which files (configs) were changed
created "syncup" script, which is essentially:
rsync -auz -v $3 $1 $2
You invoke syncup to create a complete copy of the user's current home directory, in /tmp/pi
syncup ~ /tmp/
You make some tweak via the gui
click, click, click, click, click, ...
You invoke syncup as a "dry run" to see what rsync would need to copy, i.e., what's changed
syncup ~ /tmp/ -n
You look into the changed files (using "diffs" below). When you're ready to try the next tweak, you run the syncup script live again, to copy all the recent changes to tmp. ~ now matches /tmp/pi, and you've a clean slate again.
syncup ~ /tmp/

Code:

# script to sync up directories# usage: syncup source targetdir# (add -n in $3 for test run)# -a, --archive               archive mode; same as -rlptgoD (no -H)#   -r, --recursive             recurse into directories#   -l, --links                 copy symlinks as symlinks#   -p, --perms                 preserve permissions#   -t, --times                 preserve times#   -g, --group                 preserve group#   -o, --owner                 preserve owner (super-user only)#   -D                          same as --devices --specials#         --devices               preserve device files (super-user only)#         --specials              preserve special files# -u, --update                skip files that are newer on the receiver# -z, --compress              compress file data during the transfer# -v, --verbose               increase verbosity# -i, --itemize-changes       output a change-summary for all updates# -n, --dry-run               show what would have been transferred# --ignore-existing       skip updating files that exist on receiverrsync -auz -v $3 $1 $2 
20241102 created the "diffs" script to examine the differences reported by syncup
It's passed one of the changed paths/filenames at a time, in the exact format produced by syncup:
pi/.config/lxterminal/lxterminal.conf
It produces a diff between the previous version still in /tmp/pi and the changed version now in /home/pi (~).
It then cats the entire old version and the entire new version (which may be too long to post).

Code:

# script to examine the differences reported by syncup # syncup ~ /tmp/ -n#   sending incremental file list#   pi/#   pi/.bash_history#   pi/.xsession-errors#   pi/piC12s.txt#   pi/.config/lxterminal/lxterminal.conf#   pi/bin/#   pi/bin/diffs#   #   sent 1,752 bytes  received 65 bytes  3,634.00 bytes/sec#   total size is 57,548,480  speedup is 31,672.25 (DRY RUN)# you would then invoke:#   diffs pi/.config/lxterminal/lxterminal.confechoecho "#####" diff /tmp/$1 /home/$1diff /tmp/$1 /home/$1echoecho "#####" cat  /tmp/$1cat  /tmp/$1echoecho "#####" cat  /home/$1cat  /home/$1echo
Extreme detail:
I was taking notes in vi so I had everything recorded.
I would run the "syncup ~ /tmp/ -n" line from within a vi session using !!
That would deposit the syncup results into the note
For those changed lines that looked likely (some were extraneous or unimportant), I would invoke "diffs <path/file>", also from within vi via !!, and get THOSE results deposited into the note. I could cut them down if the cats were too long, delete them if not actually interesting, try another changed file, etc.
These exact results as recorded in my notes are then cut and pasted into the forum posts.

Statistics: Posted by tinker2much — Sun Nov 03, 2024 5:23 pm



Viewing all articles
Browse latest Browse all 4919

Trending Articles