Skip to content

Instantly share code, notes, and snippets.

View florian-h05's full-sized avatar

Florian Hotze florian-h05

View GitHub Profile
@florian-h05
florian-h05 / dkms-module-signing.md
Created August 22, 2024 12:16 — forked from sbueringer/dkms-module-signing.md
Make DKMS sign kernel modules on installation, with full script support and somewhat distro independent

On systems with UEFI Secure Boot enabled, recent Linux kernels will only load signed modules, so it's about time DKMS grew the capability to sign modules it's building.

These scripts are extended and scriptified variants of https://computerlinguist.org/make-dkms-sign-kernel-modules-for-secure-boot-on-ubuntu-1604.html and https://askubuntu.com/questions/760671/could-not-load-vboxdrv-after-upgrade-to-ubuntu-16-04-and-i-want-to-keep-secur/768310#768310 and add some error checking, a passphrase around your signing key, and support for compressed modules.

dkms-sign-module is a wrapper for the more generic sign-modules which can also be used outside of DKMS.

Installation

  1. Create a directory under /root, say /root/module-signing, put the three scripts below in there and make them executable: chmod u+x one-time-setup sign-modules dkms-sign-module
@florian-h05
florian-h05 / ASUS_KEYBOARD_BACKLIGHT.md
Last active March 12, 2024 13:09
Enable keyboard backlight before shutdown (for boot menu) and on startup (for login screen)

Keyboard Backlight for boot menu & login screen

Enable keyboard backlight for boot menu & login screen on ASUS ROG Zephyrus G14 (should also work with other laptops with some adjustments). Tested with Fedora 39 on ASUS ROG Zephyrus G14 GA402RK.

Boot Menu

To enable the keyboard backlight for the boot menu, keyboard backlight needs to be turned on on shutdown. This can be accomplished by placing a executable into /usr/lib/systemd/system-shutdown/ (see https://www.freedesktop.org/software/systemd/man/latest/systemd-halt.service.html).

@florian-h05
florian-h05 / toggle-airplane.bash
Created July 18, 2023 16:07
Toggle airplane mode on Linux using rfkill.
#!/bin/bash
# Purpose: Toggle airplane mode.
# Usage: KDE Setting -> Shortcuts -> Add command -> Call this script "bash filename"
wifi="$(nmcli r wifi | awk 'FNR = 2 {print $1}')"
if [ "$wifi" == "enabled" ]
then
rfkill block all
else
rfkill unblock all
fi
@florian-h05
florian-h05 / fedora-setup-bash.bash
Last active December 11, 2024 16:58
Install & configure a fresh installation of Fedora Workstation for my personal requirements
#!/bin/bash
# Purpose: Install & configure a fresh installation of Fedora Workstation for my personal requirements.
# Author: Florian Hotze
# License: MIT License
# Prerequisites:
# Install Fedora KDE Plasma Spin on hard drive.
# Pre-run tasks:
# - Setup timeshift backups, see https://mutschler.dev/linux/fedora-btrfs-33/
@florian-h05
florian-h05 / graalvm-ce-install.md
Last active November 17, 2022 18:26
Script for installing GraalVM Community Edition on Linux

GraalVM Community Edition Installation on Linux

Get a download link from the GraalVM CE Release Site.

Run the graalvm-install.bash script as sudo/root and pass the download link as a parameter.

After the script has run, use update-java-alternatives to select the JDK.

@florian-h05
florian-h05 / docker-iptables-fix.md
Last active September 26, 2023 17:01 — forked from pedrolamas/docker-iptables-fix.sh
Script to fix Docker iptables on Synology NAS

Instructions

  • Open DSM on your Synology NAS
  • Save the above file to your Synology NAS
  • Open Control Panel and click on Task Scheduler
  • Click Create button -> Triggered Task -> User defined script
  • Give it a name, select "root" for User and "Boot-up" for Event, tick Enabled
  • Click Task Settings, paste "bash /volume1/path to script" on the User-defined script
  • Click OK button and you're done! The script will run after every reboot and should survive any updates of DSM!