Skip to content

Instantly share code, notes, and snippets.

View noslin005's full-sized avatar

Nilson Lopes noslin005

  • Source Code Corp.
  • United States of America
View GitHub Profile
@noslin005
noslin005 / pulseaudio.sh
Created April 21, 2026 16:48
PulseAudio
#!/bin/bash
set -e
echo "=== PulseAudio Setup ==="
echo "[1/5] Installing packages..."
sudo dnf install -y -q pulseaudio pulseaudio-utils alsa-plugins-pulseaudio
echo "[2/5] Restarting PulseAudio..."
pulseaudio -k 2>/dev/null || true
@noslin005
noslin005 / headless-vnc.md
Created April 16, 2026 00:57
Headless VNC Server Setup Reference

Headless VNC Server Setup Reference

AlmaLinux / RHEL 8+ — Single shared session via x11vnc on a dedicated virtual display


Architecture

xinit (~/.xinitrc + Xvfb :10) → x11vnc (port 5910)
  • Create a backup of current driver
KVER=$(uname -r)

tar --numeric-owner -czpf /tmp/nvidia_driver_files.tar.gz \
    /lib/modules/$KVER/kernel/drivers/video/nvidia* \
    /lib/modules/$KVER/kernel/drivers/video/nvidia/ \
    /usr/lib64/libcuda* \
```bash
export PS1='\n\[\033[1;37m\][\[\033[1;32m\]*\[\033[1;37m\]]\[\033[1;37m\]\342\224\200\[\033[1;37m\][\[\033[1;32m\]\h\[\033[1;37m\]]\[\033[1;37m\]\342\224\200[\[\033[1;34m\]\w\[\033[1;37m\]]\n\[\033[1;37m\]\342\224\224\342\224\200\342\224\200> \[\033[0m\]'
@noslin005
noslin005 / freeipa.md
Created March 16, 2026 03:07
Setup FreeIPA/IDM

FreeIPA/IDM Setup

RHEL8 IPA Server

Use the procedure below to create a rhel8 IPA and to test migrating IPA from rhel8 to rhel9.

  • ipa1 (rhel8)
HOSTNAME=ipa1.example.com
@noslin005
noslin005 / UpgradeFreeIPA.md
Last active March 13, 2026 06:08
Upgrade FreeIPA
https://access.redhat.com/labs/idmupgradehelper/

https://www.freeipa.org/page/V4/FreeIPA-on-FIPS

https://floblanc.wordpress.com/2023/08/23/interoperability-of-rhel-7-8-9-idm-server-and-rhel-7-8-9-idm-client/

https://oneuptime.com/blog/post/2026-03-04-migrate-identity-management-rhel-8-to-rhel-9/view

https://sambaxp.org/fileadmin/user_upload/sambaxp2023-Slides/Bokovoy_sXP23_FIPS_140_3.pdf
@noslin005
noslin005 / Fedora_Bootable_Raw_Disk.md
Created February 20, 2026 01:29
Create a Bootable Raw Disk - Fedora

Create a Bootable Raw Disk

Attach Virtual Disk

sudo kpartx -avs test.img

Create Partition

sudo parted /dev/loop0 mktable msdos
sudo parted /dev/loop0 mkpart primary ext4 1 100%

sudo parted /dev/loop0 set 1 boot on

@noslin005
noslin005 / remove_luks.md
Created February 18, 2026 03:06
Remove LUKS Encryption from a Encrypted Rocky Linux 9

Remove LUKS Encryption from a Encrypted Rocky Linux 9

DISCLAIMER: USE AT YOUR OWN RISK

This procedure converts a LUKS2 container to LUKS1 and then decrypts it in place using cryptsetup reencrypt --decrypt.

Warning

@noslin005
noslin005 / bootable-installer-disk.sh
Created September 30, 2025 20:55
Create a Bootable Installer Disk (An alternative to ISO)
#!/bin/bash
set -euo pipefail
# --- Settings ---
IMG="rocky_installer.img"
VMDK="rocky_installer.vmdk"
SIZE="20G"
LABEL="ROCKY_INSTALLER"
ISO="/VMs/isos/Rocky-9.5-x86_64-dvd.iso"
MNT_ISO="/mnt/iso"

Socat

Receiver

socat -d -d UDP-RECV:9000,ip-add-membership=239.0.0.1:0.0.0.0,interface=eth0,reuseaddr FILE:/dev/ttyS1,raw,echo=0
socat -d -d UDP-RECV:9000,ip-add-membership=239.0.0.1:0.0.0.0,interface=eth0,reuseaddr PTY,raw,echo=0,link=/tmp/virtual-tty
socat -d -d UDP-RECV:9000,ip-add-membership=239.0.0.1:0.0.0.0,reuseaddr SYSTEM:'tee /dev/ttyS1 > /tmp/mirror'