Friday, August 22, 2025

KDE's Own Distro


For installation details see the Installation section

https://community.kde.org/KDE_Linux#Installation and https://kde.org/linux/install/

Install homebrew: (do oh-my-zsh and powerlevel10k first so .zshrc modification by brew survives)

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install distrobox: 

 curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sh -s -- --prefix ~/.local

echo 'export PATH="$PATH:~/.local/bin"' >> ~/.bashrc
echo 'export PATH="$PATH:~/.local/bin"' >> ~/.zshrc

Flatpaks:

flatpak install -y \
    be.alexandervanhee.gradia \
    com.github.xournalpp.xournalpp \
    org.kde.kmymoney \ 
    dev.zed.Zed-Preview \
    io.github.benini.scid \
    org.remmina.Remmina \
    io.github.dvlv.boxbuddyrs \
    com.github.tchx84.Flatseal \
    com.discordapp.Discord \
    com.google.ChromeDev \
    com.dropbox.Client \
    org.openrgb.OpenRGB \


OneDrive: 

brew install onedrive
# type onedrive to register/connect with your MSft OneDrive account 
brew services start onedrive-cli
onedrive --force --skip-dot-files --skip-dir venv --sync 

Tailscale:

brew install tailscale
sudo cp /home/linuxbrew/.linuxbrew/Cellar/tailscale/1.86.2/homebrew.tailscale.service /etc/systemd/system/tailscaled.service
sudo systemctl daemon-reload
sudo systemctl enable --now tailscaled

sudo /home/linuxbrew/.linuxbrew/bin/tailscale set --operator=$USER

tailscale up --ssh

sudo bash -c 'echo "
# Manually add Tailscale hosts so name resolution works
103.115.66.62 raspberrypi
101.96.180.30 raspberrypi3 " >> /etc/hosts'


Printer:

sudo mkdir -p /var/spool/cups /run/cups/certs
sudo chown root:cups /var/spool/cups /run/cups/certs
sudo chmod 755 /var/spool/cups /run/cups/certs
sudo usermod -a -G lp hugh
sudo systemctl start cups.service
systemctl status cups.service

sudo lpadmin -p HL-L2370DW -E -v ipp://192.168.68.54/ipp/print -m everywhere

Rclone:

mkdir -p ~/GoogleDrive
mkdir -p ~/.config/systemd/user
brew install rclone
rclone config
cp ~/OneDrive/rclone-mount.service ~/.config/systemd/user/

systemctl --user enable --now rclone-mount.service
systemctl --user start rclone-mount

Visual Studio:

So you can sign into github:
flatpak override --user --talk-name=org.kde.kwalletd5 --talk-name=org.freedesktop.secrets com.visualstudio.code

You can configure VS Code to use kwalletd5.  Open the Command Palette in VS Code (Ctrl+Shift+P) and search for "Configure Runtime Arguments". Add the following line to the argv.json file:
"password-store": "kwallet5" 

 For python  in visual studiodo:

python3 -m venv venv   

select as interpreter and pip install needed modules. 


Warp Terminal:
 
 
mkdir ~/.local/share/applications
cp ~/OneDrive/warp.desktop ~/.local/share/applications/ 
sudo update-desktop-database ~/.local/share/applications/
 
Python Packages (I need):
python3 -m pip install --user --break-system-packages chess pandas colorama reportlab svglib  
 
Mounting extra data drive:
see ~/OneDrive/home-hugh-media-data.mount to be placed in /etc/systemd/system/  
 
Rstudio:

https://dailies.rstudio.com/rstudio/cucumberleaf-sunflower/electron/noble-amd64/ 

distrobox create --name debian-testing --image docker.io/library/debian:testing  --additional-flags "--env=DISPLAY --env=WAYLAND_DISPLAY --env=XDG_RUNTIME_DIR --env=PULSE_RUNTIME_PATH --volume=/tmp/.X11-unix:/tmp/.X11-unix:rw --volume=$XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR:rw --device=/dev/dri"

sudo apt install r-base r-base-dev libnspr4 libnss3 libasound2t64 libcurl4-openssl-dev

# Install RStudio (this will also install any missing dependencies)

sudo dpkg -i rstudio-2023.12.1-402-amd64.deb

# If there are dependency issues, fix them with: 

sudo apt-get install -f 

OpenRGB:

Use the flatpak.  Follow instructions to download the shell to install the udev rules.  Then:

sudo /home/hugh/Downloads/openrgb-udev-install.sh

sudo mv /home/hugh/Downloads/60-openrgb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
sudo udevadm trigger 
  

virt-manager:

Install flatpaks
org.virt_manager.virt-manager
org.virt_manager.virt_manager.Extension.Qemu

Then in virt-manager, add a QEMU/KVM User session (not system session)

Script to compare image information and feed to AI for summary: 

https://drive.google.com/file/d/1aNoOaoCZIPrj66MFDNvywvHuLeS6EpHX/view?usp=sharing

Friday, July 25, 2025

Microsoft fonts on Arch

 

yay -S ttf-ms-fonts ttf-selawik

To achieve Microsoft-level font clarity on Arch Linux after installing Microsoft fonts, you'll need to configure several rendering components:

Font Rendering Configuration

Install necessary packages:

yay -S freetype2 fontconfig cairo ttf-selawik

Enable subpixel rendering (equivalent to ClearType): Edit /etc/fonts/local.conf or ~/.config/fontconfig/fonts.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match target="font">
    <edit name="lcdfilter" mode="assign">
      <const>lcddefault</const>
    </edit>
    <edit name="rgba" mode="assign">
      <const>rgb</const>
    </edit>
    <edit name="hinting" mode="assign">
      <bool>true</bool>
    </edit>
    <edit name="hintstyle" mode="assign">
      <const>hintslight</const>
    </edit>
    <edit name="antialias" mode="assign">
      <bool>true</bool>
    </edit>
  </match>
</fontconfig>

Enable subpixel rendering in freetype2: Uncomment or add to /etc/profile.d/freetype2.sh:

export FREETYPE_PROPERTIES="truetype:interpreter-version=40"

Set font priorities: Configure fontconfig to prefer Microsoft fonts by adding font substitution rules in your fontconfig file:

<alias>
  <family>sans-serif</family>
  <prefer>
    <family>Segoe UI</family>
    <family>Arial</family>
  </prefer>
</alias>

Desktop Environment settings:

  • Enable subpixel rendering in Tweaks and set font to Selawik semibold and Selawik (for docs)
  • Configure font smoothing/antialiasing in your desktop environment settings
  • Set appropriate DPI scaling if needed

Rebuild font cache:

fc-cache -fv

The key is that Linux's freetype2 + fontconfig combination can achieve similar quality to Windows' font rendering, but requires manual configuration to match Microsoft's defaults.

Monday, July 14, 2025

Raspberry Pi WOL via cable

 

By default, the ethtool setting for Wake-on-LAN does not persist across reboots on most Linux systems. To make Wake-on: g permanent for your network interface (enp69s0), you have several reliable options:

1.

Create a custom systemd service that sets WOL after the network interface is up:

  1. Create the service file /etc/systemd/system/wol@.service with the following content:

    text
    [Unit] Description=Enable Wake-on-LAN for %i Requires=network.target After=network.target [Service] Type=oneshot ExecStart=/usr/bin/ethtool -s %i wol g [Install] WantedBy=multi-user.target
  2. Enable the service for your interface:

    text
    sudo systemctl enable wol@enp69s0.service

    This ensures the command runs at every boot, after the network is initialized123.

2.

Alternatively, you can use a udev rule to apply the setting whenever the interface appears:

  1. Create the file /etc/udev/rules.d/81-wol.rules with:

    text
    ACTION=="add", SUBSYSTEM=="net", NAME=="enp69s0", RUN+="/usr/bin/ethtool -s enp69s0 wol g"

    This ensures the setting is applied every time the device is added (e.g., at boot or after suspend)45.

3.

If you manage your network with NetworkManager, you can set WOL via:

text
nmcli connection modify <connection-name> 802-3-ethernet.wake-on-lan magic

Replace <connection-name> with the actual connection name for enp69s0. This will set the WOL option at the NetworkManager level4.

When connecting two Linux devices directly via Ethernet (without a switch/router), common issues include:

  • : By default, neither side provides DHCP, so both devices may not get an IP address, resulting in connection errors.

  • NetworkManager Misconfiguration: If the connection profile is not set to "shared" or "link-local", automatic IP assignment may fail.

  • : Windows uses APIPA to assign addresses automatically, but Linux requires explicit configuration.

Option 1: Use NetworkManager's "Shared" Method

  • On your Arch system, run:

    text
    nmcli con add type ethernet ifname enp69s0 con-name direct-pi ipv4.method shared nmcli con up direct-pi

    This will assign a local IP and enable basic network sharing67.

: Manual Static IPs

  • Assign static IPs on both devices. For example:

    • On Arch: sudo ip addr add 10.0.0.1/24 dev enp69s0

    • On Raspberry Pi: sudo ip addr add 10.0.0.2/24 dev eth0

  • Now you should be able to ping each device from the other8.

  • Ensure the Ethernet cable is good and supports direct connections (modern devices usually auto-negotiate, but older ones may need a crossover cable).

  • Disable or configure firewalls if needed for testing.

  • If using Avahi/mDNS for .local hostnames, ensure nss-mdns is installed and configured on both systems6.

TaskRecommended Solution
Persist WOL settingsystemd service (wol@enp69s0.service) or udev rule
Fix direct LAN "connection errors"Use NetworkManager's "shared" method or assign static IPs on both devices

By following these steps, you can make Wake-on-LAN persistent and resolve direct LAN connection errors between your Arch Linux system and Raspberry Pi.

  1. https://bbs.archlinux.org/viewtopic.php?id=202132
  2. https://necromuralist.github.io/posts/using-systemd-to-enable-wake-on-lan/
  3. https://gist.github.com/paddy74/9cd4160a1ff4eedb0366d0e6e5c02c50
  4. https://blog.galt.me/getting-wol-on-manjaro-20-working/
  5. https://linuxconfig.org/introduction-to-wake-on-lan
  6. https://bbs.archlinux.org/viewtopic.php?id=284239
  7. https://www.reddit.com/r/archlinux/comments/lkmvds/arch_not_connecting_with_raspberry_pi/
  8. https://raspberrypi.stackexchange.com/questions/121315/problem-in-connecting-my-arch-linux-to-my-raspberry-pi-raspbian
  9. https://wiki.archlinux.org/title/Wake-on-LAN
  10. https://bbs.archlinux.org/viewtopic.php?id=267311
  11. https://forum.endeavouros.com/t/cannot-persistently-enable-wake-on-lan/38301
  12. https://man.archlinux.org/man/extra/ethtool/ethtool.8.en
  13. https://forums.opensuse.org/t/how-to-enable-wake-on-lan-why-ethtool-opts-dont-work/132474
  14. https://forum.endeavouros.com/t/wake-on-lan-not-working/9206
  15. https://www.youtube.com/watch?v=ry2QxA9VOsE
  16. https://forum.proxmox.com/threads/wake-on-lan-on-pve.124785/
  17. https://bugzilla.kernel.org/show_bug.cgi?id=217069
  18. https://www.asus.com/us/support/faq/1045950/
  19. https://forum.manjaro.org/t/setting-up-wake-on-lan/144600
  20. https://bbs.archlinux.org/viewtopic.php?id=284950
  21. https://www.reddit.com/r/aorus/comments/rgt7r6/using_wakeonlan_with_aorus_trx40_i211_gigabit/
  22. https://www.youtube.com/watch?v=uUwaxrVIBiI
  23. https://www.reddit.com/r/archlinux/comments/10l4af0/i_need_help_with_wake_on_lan/
  24. https://www.youtube.com/watch?v=qX8KBFL0jjI
  25. https://www.reddit.com/r/Proxmox/comments/13blw5x/wake_on_lan_not_working/
  26. https://wiki.archlinux.org/title/Network_configuration/Ethernet
  27. https://www.gigabyte.com/at/Support/Consumer/Faq/376
  28. https://forum.manjaro.org/t/wake-on-lan-not-working/37696
  29. https://forum.manjaro.org/t/troubles-with-setting-up-wol/24815
  30. https://www.antixforum.com/forums/topic/wol-wake-on-lan/
  31. https://aur.archlinux.org/packages/wol-systemd?O=10
  32. https://serverfault.com/questions/1142769/trying-to-set-wake-on-lan-persistently-on-linux-fails
  33. https://www.reddit.com/r/openSUSE/comments/1eknqe2/how_to_enable_wol/
  34. https://github.com/gamer-os/gamer-os/issues/102
  35. https://wiki.archlinux.org/title/Udev
  36. https://askubuntu.com/questions/1142470/trouble-with-wake-on-lan-ubuntu-16-04
  37. https://forums.raspberrypi.com/viewtopic.php?t=304206
  38. https://forums.raspberrypi.com/viewtopic.php?t=187065
  39. https://forums.raspberrypi.com/viewtopic.php?t=196282
  40. https://forums.raspberrypi.com/viewtopic.php?t=47852
  41. https://wiki.archlinux.org/title/Network_configuration/Wireless
  42. https://stackoverflow.com/questions/26886952/direct-ethernet-connection-to-raspberry-pi-running-arch-linux

Saturday, July 5, 2025

Using rclone to integrate Google Drive in Arch

 sudo pacman -S rclone

rclone config  # will need to set up secret key and client ID follow instructions

 

 mkdir ~/GoogleDrive

 

rclone mount gdrive: ~/GoogleDrive --vfs-cache-mode writes --daemon 

# can also use following to run in background (nohup):

nohup rclone mount gdrive: ~/GoogleDrive --vfs-cache-mode writes --allow-non-empty --dir-cache-time 1000h --poll-interval 15s 

systemctl --user edit --force --full rclone-mount.service

 

add:

[Unit]
Description=RClone Mount Google Drive
After=network-online.target

[Service]
Type=notify
ExecStart=/usr/bin/rclone mount gdrive: %h/GoogleDrive --vfs-cache-mode writes --vfs-cache-max-age 1h
ExecStop=/bin/fusermount -u %h/GoogleDrive
Restart=on-failure
RestartSec=5

[Install]
WantedBy=default.target

 

 Enable: systemctl --user enable --now rclone-mount.service

 

 

 

 

Sunday, June 15, 2025

Getting rtcwake working on Bluefin

#!/bin/bash
# User systemd setup for auto suspend/wake on Bluefin

#Please run these two commands manually:

#1. First, create the sudo rule:
echo "$(whoami) ALL=(ALL) NOPASSWD: /usr/bin/rtcwake" | sudo tee /etc/sudoers.d/rtcwake-nopasswd
#bash
#2. Then set the correct permissions:
sudo chmod 440 /etc/sudoers.d/rtcwake-nopasswd
#bash
#After you've run those commands, we can test if passwordless sudo works:
sudo rtcwake -m show
#❯ sudo rtcwake -m show
#alarm: off

# Create user service directory

mkdir -p ~/.config/systemd/user

# Create helper script for suspend + rtcwake
mkdir -p ~/bin
cat > ~/bin/rtc-suspend.sh << 'EOF'
#!/bin/bash
# Helper script to suspend and set RTC wake time
# Usage: rtc-suspend.sh "wake_time_description"

if [ $# -ne 1 ]; then
echo "Usage: $0 'wake_time_description'"
echo "Example: $0 '15:00 today'"
exit 1
fi

wake_time="$1"
wake_timestamp=$(date -d "$wake_time" +%s)

if [ $? -ne 0 ]; then
echo "Error: Invalid time format '$wake_time'"
exit 1
fi

echo "Setting RTC wake for: $(date -d @$wake_timestamp)"

# Set the RTC wake time first (before suspend)
sudo rtcwake -m no -t $wake_timestamp

if [ $? -eq 0 ]; then
echo "RTC wake time set successfully"
# Small delay then suspend
sleep 2
systemctl suspend
else
echo "Error: Failed to set RTC wake time"
exit 1
fi
EOF

chmod +x ~/bin/rtc-suspend.sh

# Create the morning suspend service (9 AM - 3 PM)
cat > ~/.config/systemd/user/morning-suspend.service << 'EOF'
[Unit]
Description=Suspend system at 9 AM until 3 PM
After=graphical-session.target

[Service]
Type=oneshot
Environment=PATH=/usr/local/bin:/usr/bin:/bin:%h/bin
ExecStart=%h/bin/rtc-suspend.sh "15:00 today"
Restart=no

[Install]
WantedBy=default.target
EOF

# Create the evening suspend service (9 PM - 5 AM)
cat > ~/.config/systemd/user/evening-suspend.service << 'EOF'
[Unit]
Description=Suspend system at 9 PM until 5 AM tomorrow
After=graphical-session.target

[Service]
Type=oneshot
Environment=PATH=/usr/local/bin:/usr/bin:/bin:%h/bin
ExecStart=%h/bin/rtc-suspend.sh "05:00 tomorrow"
Restart=no

[Install]
WantedBy=default.target
EOF

# Create timer for 9 AM suspend
cat > ~/.config/systemd/user/morning-suspend.timer << 'EOF'
[Unit]
Description=Trigger morning suspend at 9 AM
Requires=morning-suspend.service

[Timer]
OnCalendar=*-*-* 09:00:00
Persistent=true
AccuracySec=1min

[Install]
WantedBy=timers.target
EOF

# Create timer for 9 PM suspend
cat > ~/.config/systemd/user/evening-suspend.timer << 'EOF'
[Unit]
Description=Trigger evening suspend at 9 PM
Requires=evening-suspend.service

[Timer]
OnCalendar=*-*-* 21:00:00
Persistent=true
AccuracySec=1min

[Install]
WantedBy=timers.target
EOF

echo "Setting up user systemd services..."

# Reload user systemd daemon
systemctl --user daemon-reload

# Enable the services
systemctl --user enable morning-suspend.timer
systemctl --user enable evening-suspend.timer
#systemctl --user enable wake-notification.service

# Start the timers
systemctl --user start morning-suspend.timer
systemctl --user start evening-suspend.timer

# Enable lingering so services run when not logged in
sudo loginctl enable-linger $USER

echo ""
echo "=== SETUP COMPLETE ==="
echo ""
echo "Your system will now:"
echo " • Suspend at 9:00 AM and wake at 3:00 PM"
echo " • Suspend at 9:00 PM and wake at 5:00 AM"
echo ""
echo "Active hours:"
echo " • 5:00 AM - 9:00 AM (4 hours)"
echo " • 3:00 PM - 9:00 PM (6 hours)"
echo ""
echo "=== TESTING ==="
echo "Test your RTC wake capability first:"
echo " sudo rtcwake -m mem -s 30 # 30-second test"
echo ""
echo "Test the helper script:"
echo " ~/bin/rtc-suspend.sh '$(date -d '+2 minutes' +'%H:%M today')'"
echo ""
echo "=== MONITORING ==="
echo "Check timer status:"
echo " systemctl --user list-timers"
echo ""
echo "View service logs:"
echo " journalctl --user -u morning-suspend.service"
echo " journalctl --user -u evening-suspend.service"
echo ""
echo "=== CONTROL ==="
echo "Disable (stop automatic suspend):"
echo " systemctl --user stop morning-suspend.timer evening-suspend.timer"
echo " systemctl --user disable morning-suspend.timer evening-suspend.timer"
echo ""
echo "Re-enable:"
echo " systemctl --user enable morning-suspend.timer evening-suspend.timer"
echo " systemctl --user start morning-suspend.timer evening-suspend.timer"
echo ""
echo "=== TROUBLESHOOTING ==="
echo "If suspend doesn't work, check:"
echo " 1. Your user can suspend: 'systemctl suspend'"
echo " 2. RTC wake works: 'sudo rtcwake -m mem -s 30'"
echo " 3. User lingering is enabled: 'loginctl show-user $USER'"
echo ""
echo "Common issues on Bluefin:"
echo " • May need to add user to 'wheel' group for suspend permissions"
echo " • Some hardware doesn't support RTC wake from suspend"
echo " • Check BIOS/UEFI settings for wake-on-RTC support"



Monday, June 2, 2025

Export existing distrobox environment to another machine

 

On the Source Machine (Exporting)

see also: https://www.perplexity.ai/search/detailed-instructions-on-how-t-g5vpRZiUSx6L6aE6fk.5og#0

1. List Your Distroboxes

First, identify which distrobox you want to export:

bash
distrobox list

2. Stop the Distrobox

Stop the container you want to export (replace mydevbox with your container name):

bash
distrobox stop mydevbox

3. Export the Container

Use podman to export the container as a tar archive:

bash
podman export mydevbox > mydevbox-export.tar

4. Save the Distrobox Configuration

Export the distrobox configuration to recreate it with the same settings:

bash
distrobox generate-entry mydevbox > mydevbox-config.desktop

Alternatively, note down the original creation command. You can find this information with:

bash
podman inspect mydevbox | grep -A 20 "Labels"

Transferring Files

Transfer both files to your target machine using your preferred method:

Via SCP:

bash
scp mydevbox-export.tar mydevbox-config.desktop user@target-machine:~/

Via USB drive, network share, or cloud storage: Simply copy both files to your transfer medium.

On the Target Machine (Importing)

1. Import the Container Image

Import the tar file as a new container image:

bash
podman import mydevbox-export.tar mydevbox:latest

2. Recreate the Distrobox

Create a new distrobox using the imported image. If you have the original creation command, use that. Otherwise, create it with basic settings:

bash
distrobox create --name mydevbox --image mydevbox:latest

If you need specific options (like additional volumes, environment variables, etc.), add them:

bash
distrobox create --name mydevbox --image mydevbox:latest \
  --additional-packages "package1 package2" \
  --volume /host/path:/container/path \
  --nvidia  # if you need GPU access

3. Enter and Verify

Enter the distrobox to verify everything transferred correctly:

bash
distrobox enter mydevbox

Check that your development tools, configurations, and files are present.

Alternative Method: Using Distrobox Assemble

For a more automated approach, you can create an assemble configuration file:

1. Create a Configuration File

On the source machine, create a YAML file describing your setup:

yaml
# mydevbox-assemble.yml
container_name: mydevbox
image: registry.fedoraproject.org/fedora-toolbox:38
additional_packages:
  - git
  - nodejs
  - python3-pip
  - vim
init_hooks:
  - "pip install --user some-package"
  - "npm install -g some-global-package"

2. Transfer and Apply

Transfer this file to the target machine and run:

bash
distrobox assemble create --file mydevbox-assemble.yml

Important Notes

  • Home Directory Integration: Distrobox automatically mounts your home directory, so personal files and configs in ~/ will be available immediately on the new machine.
  • Host Integration: Applications installed in the distrobox and integrated with the host (using distrobox-export) will need to be re-exported on the new machine.
  • System Dependencies: Ensure both machines have the same version of distrobox and podman for best compatibility.
  • Storage Space: The exported tar file can be quite large depending on your container's contents. Clean up unnecessary files before export if space is a concern.

This method preserves your entire development environment including installed packages, configurations, and any custom setups within the container.

KDE's Own Distro

For installation details see the Installation section https://community.kde.org/KDE_Linux#Installation  and  https://kde.org/linux/install/...