various updates

This commit is contained in:
2026-09-07 11:37:56 -04:00
parent 9995fb29ff
commit fc91437228
81 changed files with 1478 additions and 1437 deletions
+89
View File
@@ -0,0 +1,89 @@
# KDE Notes
## Fixing alt tab or taskbar icons
1. System Settings - Window Management - Window Rules - Add New...
2. Bring the buggy app window side-by-side with system settings.
3. Click "Detect Window Properties..." in the bottom.
4. Move the crosshair to the buggy window and click.
5. Click "Window class (application)".
6. Click "Add Property..." in the bottm left.
7. Click "Desktop file name".
8. Enter the base name of the desktop file
For flatpak, check `/var/lib/flatpak/exports/share/applications/`
For system apps, check `/usr/share/applications/`
For user apps, check `~/.local/share/applications/`
9. Click "Apply".
10. The icon should be fixed immediately.
## KDE Connect
Allow KDE Connect via 1714-1764 tcp/udp
```bash
# Set source address to allow connections
sudo firewall-cmd \
--zone=drop \
--permanent \
--add-port=1714-1764/udp \
--add-port=1714-1764/tcp
sudo firewall-cmd --reload
```
## Automatic Display Switching
```bash
# List displays
# Builtin: eDP-2
# Roku: DP-13
# Lenovo: DP-11
kscreen-doctor -o
# Put the builtin display back to normal
kscreen-doctor \
output.eDP-2.enable \
output.eDP-2.position.0,0 \
output.eDP-2.primary \
output.eDP-2.mode.2560x1600@165 \
output.eDP-2.scale.1.25
# Show on Roku TV and Monitor
kscreen-doctor \
output.DP-11.enable \
output.DP-11.position.0,0 \
output.DP-11.mode.2560x1440@60 \
output.DP-11.scale.1 \
output.DP-13.enable \
output.DP-13.position.0,0 \
output.DP-13.mode.2560x1440@100 \
output.DP-13.scale.1 \
output.DP-13.primary \
output.eDP-2.disable
# Show only on the roku TV
kscreen-doctor \
output.DP-11.enable \
output.DP-11.position.0,0 \
output.DP-11.primary \
output.DP-11.mode.3840x2160@60 \
output.DP-11.scale.2 \
output.DP-13.disable \
output.eDP-2.disable
# Mirror the builtin display to the roku tv
kscreen-doctor \
output.DP-11.enable \
output.DP-11.position.0,0 \
output.DP-11.primary \
output.DP-11.mode.3840x2160@60 \
output.DP-11.scale.2 \
output.eDP-2.enable \
output.eDP-2.mode.1920x1080@60 \
output.eDP-2.scale.1 \
output.eDP-2.position.0,0
```
+178 -251
View File
@@ -1,114 +1,204 @@
# Fedora Kinoite
- [Fedora Kinoite](#fedora-kinoite)
- [TPM2 Luks Decryption](#tpm2-luks-decryption)
- [Podman](#podman)
- [Docker Compose and Docker Buildkit with Rootless Podman](#docker-compose-and-docker-buildkit-with-rootless-podman)
- [rpm-ostree](#rpm-ostree)
- [Git, Vim, etc](#git-vim-etc)
- [Libvirt, Qemu, KVM](#libvirt-qemu-kvm)
- [ROCM](#rocm)
- [Ollama](#ollama)
- [Network](#network)
- [Hostname](#hostname)
- [VLAN Setup with nmcli](#vlan-setup-with-nmcli)
- [GPU Support in Distrobox](#gpu-support-in-distrobox)
- [Automatic Display Switching](#automatic-display-switching)
- [Adding users to groups (usermod replacement)](#adding-users-to-groups-usermod-replacement)
- [System Prereqs](#system-prereqs)
- [Toolbox](#toolbox)
- [Clipboard Sharing](#clipboard-sharing)
- [Running Host Commands](#running-host-commands)
- [Saving a Toolbox](#saving-a-toolbox)
- [Apps](#apps)
- [Gear Lever](#gear-lever)
- [VSCodium](#vscodium)
- [Ansible](#ansible)
- [OpenCode](#opencode)
- [Nextcloud](#nextcloud)
- [UV](#uv)
- [NVM](#nvm)
- [Set Hostname](#set-hostname)
- [rpm-ostree Notes](#rpm-ostree-notes)
- [Accent keys when holding a key](#accent-keys-when-holding-a-key)
## TPM2 Luks Decryption
Mostly taken from here:
<https://gist.github.com/jdoss/777e8b52c8d88eb87467935769c98a95>
PCR reference for `--tpm2-pcrs` args
```text
0: System firmware executable
2: Kernel
4: Bootloader
7: Secure boot state
8: Cmdline
9: Initrd
```
Basic commands:
## Adding users to groups (usermod replacement)
```bash
# Show tpm2 devices
systemd-cryptenroll --tpm2-device=list
# Show crypto luks block devices
blkid -t TYPE=crypto_LUKS
# Enroll the tpm2 device with systemd-cryptenroll
systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0,2,4,7,8,9 /dev/nvme0n1p3
# Reenroll
systemd-cryptenroll /dev/nvme0n1p3 --wipe-slot=tpm2 --tpm2-device=auto --tpm2-pcrs=0,2,4,7,8,9
# Append to command line args
rpm-ostree kargs --append=rd.luks.options=tpm2-device=auto
grep -E '^weldr:' /usr/lib/group | sudo tee -a /etc/group
sudo usermod -aG weldr $USER
```
When you update you'll need to reenroll. Add this to your ~/.bashrc
## System Prereqs
```bash
# LUKS TPM2 commands
alias tpm2-reenroll='sudo systemd-cryptenroll /dev/nvme0n1p3 --wipe-slot=tpm2 --tpm2-device=auto --tpm2-pcrs=0,2,4,7,8,9'
# Appimage support
rpm-ostree install fuse fuse-libs
# Editor
rpm-ostree install vim
# Qemu/KVM
rpm-ostree install virt-manager libvirt virt-install
# OSBuild
rpm-ostree install -y osbuild-composer composer-cli openscap-scanner scap-security-guide
# Distrobox
rpm-ostree install -y distrobox
# BTRFS Snapshots
rpm-ostree install -y snapper
# Kitty Terminal
# terminfo prevents the "WARNING: terminal is not fully functional" error
rpm-ostree install -y kitty kitty-terminfo
```
## Podman
## Toolbox
Since you'll be using podman for most container-based services, you'll want to set the
the podman auth file to somewhere persistent, otherwise it'll get deleted every time you
reboot.
### Clipboard Sharing
Add this to your `.bashrc`:
Inside the toolbox run:
```bash
# Podman auth file
export REGISTRY_AUTH_FILE=$HOME/.podman-auth.json
sudo dnf install -y wl-clipboard
```
Source that and then run `podman login` to create the file.
### Running Host Commands
### Docker Compose and Docker Buildkit with Rootless Podman
You'll want to use toolbox for development. Unfortunately, toolbox doesn't
integrate well with host system operations.
Allows you to use podman with full docker-compose compatibility.
<https://emersion.fr/blog/2025/using-podman-compose-and-buildkit/>
I create a `toolbox.sh` in `~/.bashrc.d` with functions that map to host
commands like so:
```bash
rpm-ostree install docker-compose docker-buildx
reboot
systemctl --user enable --now podman.socket
docker context create podman --docker host=unix://$XDG_RUNTIME_DIR/podman/podman.sock
docker context use podman
# Use flatpak-spawn --host podman inside toolbox, regular podman outside
podman() {
if [ -f /run/.containerenv ]; then
flatpak-spawn --host podman "$@"
else
command podman "$@"
fi
}
### Autostarting services with quadlets
If you want to run something as your user at boot (like a systemd process, think ollama) you can
create a user quadlets like so:
```bash
# Generate the .container file
podman run --rm ghcr.io/containers/podlet --install --description "Local AI" \
podman run \
-d \
-v ollama:/root/.ollama \
-p 11434:11434 \
--name ollama \
--restart always \
docker.io/ollama/ollama > ~/.config/containers/systemd/ollama.container
# Verify the service (Note the filename:service, this is required! You will get "Failed to prepare filename" without it)
systemd-analyze verify ~/.config/containers/systemd/ollama.container:ollama.service
# Start the service
systemctl --user daemon-reload
systemctl --user start ollama
# Notify the user if they're trying to run a command that doesn't work in a toolbox
rpm-ostree() {
if [ -f /run/.containerenv ]; then
echo "Command must be run outside toolbox."
else
command rpm-ostree "$@"
fi
}
```
## rpm-ostree
I have the following functions mapped:
1. podman
2. rpm-ostree
3. flatpak
4. firewall-cmd
### Saving a Toolbox
After setting up a base toolbox you'll want to save it for future use. This is easy with podman commit.
```bash
# 1. Commit the running container to a new image
podman commit fedora-toolbox-44 my-toolbox-snapshot
# 2. Save the image to a tar file for later use
podman save -o ~/my-toolbox-snapshot.tar my-toolbox-snapshot
# Load the image
podman load -i ~/my-toolbox-snapshot.tar
# Create a new toolbox from it
toolbox create --image my-toolbox-snapshot
```
## Apps
Anything not mentioned here is installed via flatpak from flathub.
### Gear Lever
```bash
flatpak install it.mijorus.gearlever
```
### VSCodium
Install in toolbox.
<https://vscodium.com/#install-on-fedora-rhel-centos-rockylinux-opensuse-rpm-package>
```bash
sudo tee -a /etc/yum.repos.d/vscodium.repo << 'EOF'
[gitlab.com_paulcarroty_vscodium_repo]
name=gitlab.com_paulcarroty_vscodium_repo
baseurl=https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/rpms/
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg
metadata_expire=1h
EOF
sudo dnf install codium
```
### Ansible
```bash
# Install pipx
python3 -m ensurepip --user
python3 -m pip install --user pipx
pipx ensurepath
# Install ansible
pipx install --include-deps ansible
```
### OpenCode
```bash
curl -fsSL https://opencode.ai/install | bash
# Install pyright LSP
python -m pip install --upgrade pip
python -m pip install --user pyright
```
### Nextcloud
Download the AppImage. Install via Gear Lever.
<https://github.com/nextcloud-releases/desktop/releases>
| Source | Repo | Release file name |
| ------ | -------------------------- | ----------------- |
| Github | nextcloud-releases/desktop | *x86_64.AppImage |
### UV
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
### NVM
<https://www.nvmnode.com/guide/installation.html#nvm-install-for-linux-macos>
```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
```
## Set Hostname
```bash
sudo hostnamectl hostname reesework16
```
## rpm-ostree Notes
Note: if you don't need them, remove extra repos
@@ -133,169 +223,6 @@ rpm-ostree apply-live
rpm-ostree status
```
### Git, Vim, etc
## Accent keys when holding a key
Some packages are nice to have at the system level.
```bash
rpm-ostree install git vim
```
### Libvirt, Qemu, KVM
```bash
rpm-ostree install virt-manager libvirt
systemctl enable --now libvirtd
```
### ROCM
Credit to:
<https://medium.com/@seancheo/running-generative-ai-on-amd-in-fedora-40-28aa3bebb187>
Here are most of the ROCM packages that you'll need.
Fedora is currently working on a ROCM meta package here:
<https://packages.fedoraproject.org/pkgs/rocm/rocm/>
```bash
rpm-ostree install \
hipblas-devel \
hipblaslt-devel \
hipcc \
hipcc-libomp-devel \
hipcub-devel \
hipfft-devel \
hipfort-devel \
hiprand-devel \
hiprt-devel \
hipsolver-devel \
hipsparse-devel \
rocalution-devel \
rocblas-devel \
rocfft-devel \
rocm-clang-devel \
rocm-clang-tools-extra-devel \
rocm-cmake \
rocm-comgr-devel \
rocm-core-devel \
rocm-hip-devel \
rocm-libc++-devel \
rocm-libc++-static \
rocm-llvm-devel \
rocm-omp-devel \
rocm-runtime-devel \
rocm-rpp-devel \
rocm-smi-devel \
rocminfo \
rocdecode-devel \
rocjpeg-devel \
rocprim-devel \
rocrand-devel \
rocsolver-devel \
rocsparse-devel \
rocthrust-devel \
roctracer-devel \
miopen
```
### Ollama
<https://ollama.com/download>
Run the installation script as normal. Make sure you have the [ROCM](#rocm) drivers installed
for GPU acceleration. The script *should* automatically pull the ROCM drivers after installing
the base packages. If not, you should install them manually.
For starting ollama as a service, follow the link below with one exception.
<https://github.com/ollama/ollama/blob/main/docs/linux.md#adding-ollama-as-a-startup-service-recommended>
```bash
# Change the recommended home dir to /var/home/ollama
sudo useradd -r -s /bin/false -U -m -d /var/home/ollama ollama
```
## Network
### Hostname
```bash
sudo hostnamectl hostname reesework16
```
### VLAN Setup with nmcli
```bash
# VLAN 2
nmcli conn
export NMCLI_DEVICE=enp195s0f4u1u3
nmcli connection add type VLAN con-name $NMCLI_DEVICE.2 dev $NMCLI_DEVICE id 2
```
## GPU Support in Distrobox
Fix for `error="failed to check permission on /dev/kfd: open /dev/kfd: invalid argument"`
```bash
# You have to create the video and render group to /etc/group before you can use it
sudo grep -E '^video:' /usr/lib/group | sudo tee -a /etc/group
sudo grep -E '^render:' /usr/lib/group | sudo tee -a /etc/group
sudo usermod -aG video $USER
sudo usermod -aG render $USER
```
Logout and log back in to adopt new groups.
## Automatic Display Switching
```bash
# List displays
# Builtin: eDP-2
# Roku: DP-13
# Lenovo: DP-11
kscreen-doctor -o
# Put the builtin display back to normal
kscreen-doctor \
output.eDP-2.enable \
output.eDP-2.position.0,0 \
output.eDP-2.primary \
output.eDP-2.mode.2560x1600@165 \
output.eDP-2.scale.1.25
# Show on Roku TV and Monitor
kscreen-doctor \
output.DP-11.enable \
output.DP-11.position.0,0 \
output.DP-11.mode.2560x1440@60 \
output.DP-11.scale.1 \
output.DP-13.enable \
output.DP-13.position.0,0 \
output.DP-13.mode.2560x1440@100 \
output.DP-13.scale.1 \
output.DP-13.primary \
output.eDP-2.disable
# Show only on the roku TV
kscreen-doctor \
output.DP-11.enable \
output.DP-11.position.0,0 \
output.DP-11.primary \
output.DP-11.mode.3840x2160@60 \
output.DP-11.scale.2 \
output.DP-13.disable \
output.eDP-2.disable
# Mirror the builtin display to the roku tv
kscreen-doctor \
output.DP-11.enable \
output.DP-11.position.0,0 \
output.DP-11.primary \
output.DP-11.mode.3840x2160@60 \
output.DP-11.scale.2 \
output.eDP-2.enable \
output.eDP-2.mode.1920x1080@60 \
output.eDP-2.scale.1 \
output.eDP-2.position.0,0
```
Settings -> keyboard -> virtual keyboard -> disable virtual keyboard
+38
View File
@@ -4,6 +4,7 @@
- [Installation](#installation)
- [Setup SSH](#setup-ssh)
- [DNF](#dnf)
- [Version lock](#version-lock)
- [Power Profiles with Tuned](#power-profiles-with-tuned)
- [Fail2Ban](#fail2ban)
- [BTRFS Parent Volumes](#btrfs-parent-volumes)
@@ -84,6 +85,7 @@
- [Sound Devices](#sound-devices)
- [Install ffmpegthumbnailer, remove totem](#install-ffmpegthumbnailer-remove-totem)
- [Add compatibility for HEIC to mogrify](#add-compatibility-for-heic-to-mogrify)
- [Redirecting ports for rootless services](#redirecting-ports-for-rootless-services)
<https://docs.fedoraproject.org/en-US/fedora-server/installation/postinstallation-tasks/#_manage_system_updates>
@@ -127,6 +129,16 @@ dnf update --refresh -y
dnf install -y git glances tmux vim python3-libdnf5 borgbackup tpm2-tools
```
### Version lock
```bash
sudo dnf install dnf-plugin-versionlock
sudo dnf list <package> --showduplicates
sudo dnf versionlock add <package_name>-<version>.x86_64
sudo dnf versionlock list
sudo dnf versionlock delete <package_name>
```
## Power Profiles with Tuned
1. `dnf install tuned`
@@ -1486,3 +1498,29 @@ sudo dnf install ffmpegthumbnailer
```bash
sudo dnf install libheic-freeworld
```
## Redirecting ports for rootless services
```bash
# ipv4
sudo firewall-cmd \
--permanent \
--add-forward-port=port=80:proto=tcp:toport=8080
sudo firewall-cmd --add-rich-rule='forward-port port=80 protocol=tcp to-port=8080
```
Or in ansible
```yaml
- name: Forward ports
ansible.posix.firewalld:
port_forward:
- port: "{{ item.from }}"
proto: tcp
toport: "{{ item.to }}"
permanent: true
state: enabled
immediate: true
loop: "{{ forward_ports }}"
```