diff --git a/pi4/build/README.md b/pi4/build/README.md index 33c093f..bd457b7 100644 --- a/pi4/build/README.md +++ b/pi4/build/README.md @@ -48,6 +48,7 @@ If the build is interrupted, run `sudo umount -R /mnt && sudo losetup -D` to be - **Packages**: Edit the package list inside `pi4/build/build-stormux.sh` (search for `pacman -Su --needed`). Add or remove entries as needed, then rebuild. - **Package sources**: The build does not fetch or compile packages from the AUR. Packages are installed from the official Arch Linux ARM repositories or the Stormux repository. The finished image includes `yay`, but it is installed as a prebuilt package from the Stormux repository and is not used during the build. - **First-boot behavior**: Modify `pi4/files/usr/local/bin/configure-stormux` to change the guided setup that runs when the image boots the first time. +- **X resources**: `pi4/files/etc/skel/.Xresources` is installed in the default user's home and `/etc/skel`, so newly created users inherit it too. Remember to keep permissions sensible (`chmod 755` for scripts, `644` for configs) so rsync copies them correctly. diff --git a/pi4/build/build-stormux.sh b/pi4/build/build-stormux.sh index 3c07736..d9c40f1 100755 --- a/pi4/build/build-stormux.sh +++ b/pi4/build/build-stormux.sh @@ -603,6 +603,8 @@ install_rhvoice_english_fixes # Copy skel files to stormux user home (after user rename in chroot) find ../files/etc/skel/ -mindepth 1 -exec cp -rv "{}" /mnt/home/stormux/ \; +install -Dm644 ../files/etc/skel/.Xresources /mnt/etc/skel/.Xresources +arch-chroot /mnt chown stormux:users /home/stormux/.Xresources # Copy boot files again to ensure custom config overrides any package changes cp -rv ../files/boot/* /mnt/boot diff --git a/pi4/files/etc/skel/.Xresources b/pi4/files/etc/skel/.Xresources new file mode 100644 index 0000000..8a41917 --- /dev/null +++ b/pi4/files/etc/skel/.Xresources @@ -0,0 +1,25 @@ +! Start in Unicode +XTerm*utf8: 1 +UXTerm*utf8: 1 +! Use white-on-black colors +XTerm.vt100.reverseVideo: true +UXTerm.vt100.reverseVideo: true +! XTerm already has 256 colors support +! We ask it to set the correct $TERM XTerm.termName: xterm-256color +UXTerm.termName: xterm-256color +! Start with maximized window +xterm*maximized: true +! Make Alt key behave like in other terminals +XTerm.vt100.altIsNotMeta: true +UXTerm.vt100.altIsNotMeta: true +XTerm.vt100.metaSendsEscape: true +UXTerm.vt100.metaSendsEscape: true +URxvt.perl-ext-common: "default, -searchable-scrollback" +URxvt.font: xft:terminus:size=16 +*VT100.Translations: #override \ + BackSpace: string(0x7F)\n\ + Delete: string("\033[3~")\n\ + Home: string("\033[1~")\n\ + End: string("\033[4~")\n\ + Ctrl Shift V: insert-selection(CLIPBOARD) +*ttyModes: erase ^? diff --git a/x86_64/README.md b/x86_64/README.md index 461863e..cb5db07 100644 --- a/x86_64/README.md +++ b/x86_64/README.md @@ -172,6 +172,17 @@ Edit `packages.x86_64` and add package names (one per line). Place files in `airootfs/` following the target filesystem structure. The x86_64 build uses this overlay directly. +### Default X Resources + +Keep `airootfs/etc/skel.stormux/.Xresources` and +`airootfs/home/stormux/.Xresources` identical. The home copy supplies the live +user's defaults. During ISO creation, the skeleton copy is placed in +`/etc/skel`; `install-stormux` copies it into the target's `/etc/skel` after +package installation and before creating users. All users created with new +home directories by the installer inherit `~/.Xresources`, regardless of the +selected desktop or partition layout. Users created later with `useradd -m` +inherit it as well. Reused home directories keep their existing files. + ## Troubleshooting ### Build fails with GPG errors diff --git a/x86_64/airootfs/etc/skel.stormux/.Xresources b/x86_64/airootfs/etc/skel.stormux/.Xresources new file mode 100644 index 0000000..8a41917 --- /dev/null +++ b/x86_64/airootfs/etc/skel.stormux/.Xresources @@ -0,0 +1,25 @@ +! Start in Unicode +XTerm*utf8: 1 +UXTerm*utf8: 1 +! Use white-on-black colors +XTerm.vt100.reverseVideo: true +UXTerm.vt100.reverseVideo: true +! XTerm already has 256 colors support +! We ask it to set the correct $TERM XTerm.termName: xterm-256color +UXTerm.termName: xterm-256color +! Start with maximized window +xterm*maximized: true +! Make Alt key behave like in other terminals +XTerm.vt100.altIsNotMeta: true +UXTerm.vt100.altIsNotMeta: true +XTerm.vt100.metaSendsEscape: true +UXTerm.vt100.metaSendsEscape: true +URxvt.perl-ext-common: "default, -searchable-scrollback" +URxvt.font: xft:terminus:size=16 +*VT100.Translations: #override \ + BackSpace: string(0x7F)\n\ + Delete: string("\033[3~")\n\ + Home: string("\033[1~")\n\ + End: string("\033[4~")\n\ + Ctrl Shift V: insert-selection(CLIPBOARD) +*ttyModes: erase ^? diff --git a/x86_64/airootfs/home/stormux/.Xresources b/x86_64/airootfs/home/stormux/.Xresources new file mode 100644 index 0000000..8a41917 --- /dev/null +++ b/x86_64/airootfs/home/stormux/.Xresources @@ -0,0 +1,25 @@ +! Start in Unicode +XTerm*utf8: 1 +UXTerm*utf8: 1 +! Use white-on-black colors +XTerm.vt100.reverseVideo: true +UXTerm.vt100.reverseVideo: true +! XTerm already has 256 colors support +! We ask it to set the correct $TERM XTerm.termName: xterm-256color +UXTerm.termName: xterm-256color +! Start with maximized window +xterm*maximized: true +! Make Alt key behave like in other terminals +XTerm.vt100.altIsNotMeta: true +UXTerm.vt100.altIsNotMeta: true +XTerm.vt100.metaSendsEscape: true +UXTerm.vt100.metaSendsEscape: true +URxvt.perl-ext-common: "default, -searchable-scrollback" +URxvt.font: xft:terminus:size=16 +*VT100.Translations: #override \ + BackSpace: string(0x7F)\n\ + Delete: string("\033[3~")\n\ + Home: string("\033[1~")\n\ + End: string("\033[4~")\n\ + Ctrl Shift V: insert-selection(CLIPBOARD) +*ttyModes: erase ^? diff --git a/x86_64/airootfs/usr/local/bin/install-stormux b/x86_64/airootfs/usr/local/bin/install-stormux index 27bc055..595d854 100755 --- a/x86_64/airootfs/usr/local/bin/install-stormux +++ b/x86_64/airootfs/usr/local/bin/install-stormux @@ -1467,6 +1467,10 @@ install_base_system() { copy_rhvoice_english_fixes + # Populate the target skeleton before configure_system creates users. + log_info "Installing default X resources" + install -Dm644 /etc/skel/.Xresources "$mountPoint/etc/skel/.Xresources" + # Generate or preserve fstab if [[ "$useExistingMount" == true ]]; then if grep -Eq '^[[:space:]]*[^#[:space:]]' "$mountPoint/etc/fstab" 2>/dev/null; then