Compare commits

..

19 Commits

Author SHA1 Message Date
Storm Dragon 9158c094d3 Explicitly set PermitRootLogin no in the ssh configuration for convert to server. I'm pretty sure this is the default behavior in Arch, but for something this important it's better to sepcify. 2026-04-16 15:25:24 -04:00
Storm Dragon 74f2dcb808 Hopefully hide some of the checks for packages to remove that show errors to make the conversion to server a little less noisy. 2026-04-16 15:17:59 -04:00
Storm Dragon d8db10b05f A few updates to convert-to-server. 2025-12-22 14:28:42 -05:00
Storm Dragon b2ca223d9a Insure installing gui doesn't break fenrir. 2025-12-20 16:23:22 -05:00
Storm Dragon addeec3360 Attempt to keep the screen driver creation from failing. 2025-12-20 06:48:18 -05:00
Storm Dragon 742e8d1ed3 Updated I38 dependencies. 2025-12-20 06:01:20 -05:00
Storm Dragon 0660a50071 Attempt to fix a null byte warning when getting pi version. 2025-12-20 05:57:35 -05:00
Storm Dragon c187b8d32c Initial support for updating eeprom. 2025-12-20 05:31:16 -05:00
Storm Dragon 241e3f4e39 Updated convert to server option. 2025-09-03 11:34:05 -04:00
Storm Dragon 17cb26ff04 Update xlibre-server to xlibre-xserver. 2025-08-23 15:35:54 -04:00
Storm Dragon 9008788a7d Work around existing file nodm in /et/pam.d until next image release. 2025-08-20 13:57:55 -04:00
Storm Dragon cc91998a06 Insure any x depends pulled in during image creation before install gui. 2025-08-19 20:51:45 -04:00
Storm Dragon 3e48abf598 Fixed typo in functions.sh. 2025-08-16 20:27:40 -04:00
Storm Dragon 7fc6dd25e4 Update stormux repository url. It should now use the easier to manage repository. 2025-08-16 17:14:59 -04:00
Storm Dragon 985d8bc7b9 Fixed ping. 2025-07-18 15:04:32 -04:00
Storm Dragon 856c794637 Fixed ping. 2025-07-18 15:03:57 -04:00
Storm Dragon 1257eb31ab Battling with repository still. 2025-07-17 18:35:10 -04:00
Storm Dragon adfc259d0f Fixes to the aarch64 stormux repository. 2025-07-17 18:17:08 -04:00
Storm Dragon 4c8de812ba Fixes to the aarch64 stormux repository. 2025-07-17 18:16:48 -04:00
6 changed files with 193 additions and 94 deletions
+30 -16
View File
@@ -17,49 +17,63 @@ dialog --backtitle "Configure Stormux" \
--yesno "This will make catastrophic changes to your system. If you are not sure you want to do this, select no by pressing the letter n on your keyboard. Afterwards, you will only be able to login with an ssh key and there will be no screen reader.\nNote, configure-stormux will no longer be available." -1 -1 --stdout || exit 0
dialog --backtitle "Configure Stormux" \
--msgbox "Now let's upload your ssh key. It is a good idea to go ahead and connect via ssh now, in case something goes wrong you will have a chance to fix it manually. This will be used to login to your server, so whatever you do, don't lose it. If you have not yet created an ssh key, you can do so with the ssh-keygen command. Magic-wormhole will be used to upload the key. if you are doing this from a Windows based ssh session, you can install magic-wormhole with scoop: https://github.com/ScoopInstaller/Scoop" -1 -1 --stdout
--msgbox "Now let's upload your ssh key. It is a good idea to go ahead and connect via ssh now, in case something goes wrong you will have a chance to fix it manually. This will be used to login to your server, so whatever you do, don't lose it. If you have not yet created an ssh key, you can do so with the ssh-keygen command. Magic-wormhole can be used to upload the key. If you are doing this from a Windows based ssh session, you can install magic-wormhole with scoop: https://github.com/ScoopInstaller/Scoop" -1 -1 --stdout
mkdir -p ~/.ssh
if [[ -e ~/.ssh/known_hosts ]]; then
chmod 700 ~/.ssh
if ! [[ -s ~/.ssh/authorized_keys ]]; then
dialog --backtitle "Configure Stormux" \
--msgbox "Key found in ~/.ssh/known_hosts. If you are sure this is the correct key, press enter, otherwise press control+c to close this application and fix your key." -1 -1 --stdout
fi
if ! [[ -e ~/.ssh/authorized_keys ]]; then
dialog --backtitle "Configure Stormux" \
--msgbox "No public ssh key found. Please upload your ssh key to ~/.ssh/known_hosts before continuing.\nIf you do not have a key, you can create it with ssh-keygen.\nYou can use wormhole ssh invite or ssh-copy-id to upload the key." -1 -1 --stdout
--msgbox "No public ssh key found. Please upload your public key to ~/.ssh/authorized_keys before continuing.\nIf you do not have a key, you can create it with ssh-keygen.\nYou can use wormhole ssh invite or ssh-copy-id to upload the key." -1 -1 --stdout
exit 1
fi
sudo sed -i 's/^#PasswordAuthentication yes$/PasswordAuthentication no/' /etc/ssh/sshd_config
chmod 600 ~/.ssh/authorized_keys
sshPort="22"
sshPortInput="$(dialog --backtitle "Configure Stormux" \
--inputbox "Enter a custom SSH port (1-65535) or leave blank to keep 22." -1 -1 --stdout || true)"
if [[ -n "$sshPortInput" && "$sshPortInput" =~ ^[0-9]+$ ]]; then
if [[ "$sshPortInput" -ge 1 && "$sshPortInput" -le 65535 ]]; then
sshPort="$sshPortInput"
fi
fi
sudo mkdir -p /etc/ssh/sshd_config.d
sudo tee /etc/ssh/sshd_config.d/99-stormux-server.conf > /dev/null << EOF
Port ${sshPort}
PermitRootLogin no
PasswordAuthentication no
KbdInteractiveAuthentication no
EOF
for i in \
for packageName in \
alsa-firmware \
alsa-utils \
bluez \
bluez-utils \
brltty \
cloud-utils \
espeak-ng \
fenrir \
fenrir-git \
growpartfs \
go \
nodm-dgw \
gstreamer \
gst-plugins-base \
gst-plugins-good \
ii \
pipewire \
pipewire-alsa \
pipewire-jack \
pipewire-pulse \
poppler \
python-pyudev \
python-daemonize \
python-evdev \
python-dbus \
python-pyte \
python-pyenchant \
python-pyperclip \
rhvoice-voice-bdl \
screen \
socat \
sox \
speech-dispatcher \
wireplumber \
xdg-user-dirs \
xdg-utils ; do
yay -Runcds --noconfirm $i
yay -Runcds --noconfirm "$packageName" @> /dev/null
done
rm -rfv ~/.config
+77
View File
@@ -0,0 +1,77 @@
#!/usr/bin/env bash
# EEPROM Update for Raspberry Pi 4/400/5/500
# Checks for and applies firmware updates to the Pi's EEPROM
# sudoFlags is defined in the main configure-stormux.sh script
# shellcheck disable=SC2154
updateEeprom() {
# Detect Pi version from device tree
local piModel
piModel=$(LC_ALL=C tr -d '\000' < /sys/firmware/devicetree/base/model 2>/dev/null)
# Determine which EEPROM package is needed
local eepromPackage=""
if [[ "$piModel" == *"Raspberry Pi 5"* ]] || [[ "$piModel" == *"Raspberry Pi 500"* ]]; then
eepromPackage="rpi5-eeprom"
elif [[ "$piModel" == *"Raspberry Pi 4"* ]] || [[ "$piModel" == *"Raspberry Pi 400"* ]]; then
eepromPackage="rpi4-eeprom"
else
# Default to rpi4-eeprom for unknown models
eepromPackage="rpi4-eeprom"
fi
# Install EEPROM package if not present
if ! pacman -Q "$eepromPackage" &> /dev/null; then
infobox "Installing ${eepromPackage}..."
if ! install_package "$eepromPackage"; then
msgbox "Failed to install ${eepromPackage}. Please check your internet connection and try again."
return 1
fi
fi
# Check for EEPROM updates
infobox "Checking for EEPROM updates..."
local checkOutput
local checkResult
checkOutput=$(sudo "${sudoFlags[@]}" rpi-eeprom-update 2>&1)
checkResult=$?
case $checkResult in
0)
# Up to date
msgbox "EEPROM is up to date.\n\n${checkOutput}"
;;
1)
# Update available
if [[ "$(yesno "An EEPROM update is available.\n\n${checkOutput}\n\nWould you like to apply this update?")" == "Yes" ]]; then
infobox "Applying EEPROM update..."
if sudo "${sudoFlags[@]}" rpi-eeprom-update -a; then
msgbox "EEPROM update applied successfully. A reboot is required to complete the update."
restart
else
msgbox "Failed to apply EEPROM update. Please try again or check the log file for details."
return 1
fi
fi
;;
2)
# Failed
msgbox "EEPROM update check failed.\n\n${checkOutput}"
return 1
;;
3)
# EEPROM frozen
msgbox "EEPROM is currently frozen and cannot be updated.\n\n${checkOutput}\n\nThis may require a reboot to resolve."
return 1
;;
*)
# Unknown error
msgbox "Unexpected error checking EEPROM status (exit code: ${checkResult}).\n\n${checkOutput}"
return 1
;;
esac
}
# Execute the update function when sourced
updateEeprom
+25 -58
View File
@@ -1,3 +1,5 @@
#!/usr/bin/env bash
install_package() {
# If for some reason we have to change AUR helpers, this function should make it easy to update everything all at once.
# make sure system is up to date
@@ -29,47 +31,52 @@ attention() {
add_stormux_repo() {
# Check if StormUX repository is already configured
if grep -q "aarch64.stormux.org" /etc/pacman.conf; then
if grep -q "\[stormux\]" /etc/pacman.conf; then
msgbox "StormUX repository is already configured."
return 0
fi
infobox "Adding StormUX repository and importing signing key..."
# Import the repository signing key
if ! curl -s https://aarch64.stormux.org/stormux-repo.pub | sudo "${sudoFlags[@]}" pacman-key --add -; then
if ! curl -s https://packages.stormux.org/stormux_repo.pub | sudo "${sudoFlags[@]}" pacman-key --add -; then
msgbox "Failed to download StormUX repository key."
return 1
fi
# Locally sign the key
if ! sudo "${sudoFlags[@]}" pacman-key --lsign-key storm_dragon@stormux.org; then
if ! sudo "${sudoFlags[@]}" pacman-key --lsign-key 52ADA49000F1FF0456F8AEEFB4CDE1CD56EF8E82; then
msgbox "Failed to sign StormUX repository key."
return 1
fi
# Add repository to pacman.conf before any AUR-related sections
# Create a temporary file with the repository configuration
local temp_conf=$(mktemp)
# Add repository to pacman.conf before [core] to give it highest priority
local temp_conf
temp_conf=$(mktemp)
local added_repo=false
while IFS= read -r line; do
# Add StormUX repo before any AUR or custom repo sections
if [[ "$line" =~ ^\[.*\]$ ]] && [[ ! "$line" =~ ^\[(core|extra|multilib|testing|multilib-testing)\]$ ]] && [[ "$added_repo" == false ]]; then
echo "[stormux]" >> "$temp_conf"
echo "SigLevel = Required" >> "$temp_conf"
echo "Server = https://aarch64.stormux.org/" >> "$temp_conf"
echo "" >> "$temp_conf"
# Add StormUX repo before [core] section
if [[ "$line" == "[core]" ]] && [[ "$added_repo" == false ]]; then
{
echo "[stormux]"
echo "SigLevel = Required DatabaseOptional"
echo "Server = https://packages.stormux.org/\$arch"
echo ""
} >> "$temp_conf"
added_repo=true
fi
echo "$line" >> "$temp_conf"
done < /etc/pacman.conf
# If we didn't add it yet (no custom repos found), add it at the end
# If we didn't find [core] section, add it at the end
if [[ "$added_repo" == false ]]; then
echo "" >> "$temp_conf"
echo "[stormux]" >> "$temp_conf"
echo "SigLevel = Required" >> "$temp_conf"
echo "Server = https://aarch64.stormux.org/" >> "$temp_conf"
{
echo ""
echo "[stormux]"
echo "SigLevel = Required DatabaseOptional"
echo "Server = https://packages.stormux.org/\$arch"
} >> "$temp_conf"
fi
# Replace the original pacman.conf
@@ -87,47 +94,7 @@ add_stormux_repo() {
return 1
fi
msgbox "StormUX repository added successfully!"
return 0
}
install_xlibre() {
# Make sure system is up to date
yay --sudoflags "${sudoFlags[@]}" --sudoloop --noconfirm -Syu
# Check if we have internet connectivity
if ! ping -c 1 aarch64.stormux.org &>/dev/null; then
msgbox "No internet connection detected. X11Libre installation requires internet access."
return 1
fi
# Add StormUX repository with proper key management
if ! add_stormux_repo; then
msgbox "Failed to add StormUX repository. Installation aborted."
return 1
fi
# Remove conflicting packages
infobox "Removing conflicting Xorg packages..."
sudo "${sudoFlags[@]}" pacman -R --noconfirm xorg-server xf86-input-libinput xf86-video-fbdev 2>/dev/null || true
# Install X11Libre packages from StormUX repository
infobox "Installing X11Libre server and drivers..."
if ! sudo "${sudoFlags[@]}" pacman -S --noconfirm xlibre-server-common-git xlibre-server-devel-git; then
msgbox "Failed to install X11Libre server components."
return 1
fi
if ! sudo "${sudoFlags[@]}" pacman -Sdd --noconfirm xlibre-server-git; then
msgbox "Failed to install X11Libre server main package."
return 1
fi
# Install input and video drivers from StormUX repository
if ! sudo "${sudoFlags[@]}" pacman -S --noconfirm stormux/xf86-input-libinput-xlibre stormux/xf86-video-dummy-with-vt stormux/xf86-video-fbdev; then
msgbox "Failed to install X11Libre input and video drivers."
return 1
fi
infobox "X11Libre installation completed successfully!"
return 0
}
+10 -12
View File
@@ -1,10 +1,15 @@
#!/bin/bash
#!/usr/bin/env bash
# Remove existing nodm from /etc/pam.d so package installation goes smoothly
if [[ -e /etc/pam.d/nodm ]]; then
sudo rm -f /etc/pam.d/nodm
fi
packages="$1"
packages="${packages//lxqt/lxqt lxterminal oxygen-icons ratpoison network-manager-applet}"
packages="${packages//mate/mate mate-extra network-manager-applet}"
packages="${packages//i3/clipster discount jq i3-wm libnotify lxterminal xfce4-notifyd pamixer playerctl python-i3ipc python-wxpython sox transfersh yad}"
packages="${packages//i3/clipster discount jq i3-wm libnotify lxterminal xfce4-notifyd pamixer playerctl python-i3ipc python-wxpython sox xdotool yad}"
packages+=" libmd libbsd"
# Proper command for launching the desktop session.
@@ -16,15 +21,8 @@ esac
./.includes/toggle-screen.sh -n
# Install X11Libre
if ! install_xlibre; then
msgbox "X11Libre installation failed. Installation aborted."
return 1
fi
# X11Libre installed successfully, install remaining packages
# Note: nodm-dgw is now available from StormUX repository (added by install_xlibre)
install_package ${packages} firefox nodm-dgw orca speech-dispatcher xclip xorg-xinit
# Install X11Libre and GUI packages
install_package ${packages} brave-bin nodm-dgw orca speech-dispatcher xclip xlibre-xserver xlibre-input-libinput xlibre-video-fbdev xlibre-video-dummy-with-vt
# GUI bluetooth manager
if [[ "${architecture}" == "aarch64" ]]; then
@@ -69,7 +67,7 @@ if [[ "$1" == "i3" ]]; then
gitDir="$(mktemp -d)"
echo "Loading I38, please wait..."
git clone -q https://git.stormux.org/storm/I38 "$gitDir"
cd "$gitDir"
cd "$gitDir" || return
# Play a sound to let the user know the next part is interactive.
attention
./i38.sh -x
+41 -6
View File
@@ -2,17 +2,42 @@
# Change between dummy and fbdev driver for X session.
sudoFlags=()
if [[ -n "${SUDO_ASKPASS:-}" ]]; then
sudoFlags=("-A")
fi
xorgConfDir="/etc/X11/xorg.conf.d"
xorgConfFile="${xorgConfDir}/10-screendriver.conf"
ensure_xorg_conf_dir() {
if ! sudo "${sudoFlags[@]}" mkdir -p "${xorgConfDir}"; then
msgbox "Failed to create ${xorgConfDir}."
return 1
fi
}
active_screen() {
cat << EOF | sudo "${sudoFlags[@]}" tee /etc/X11/xorg.conf.d/10-screendriver.conf &> /dev/null
if ! ensure_xorg_conf_dir; then
return 1
fi
if ! sudo "${sudoFlags[@]}" tee "${xorgConfFile}" > /dev/null << 'EOF'
Section "Device"
Identifier "FBdev"
Driver "fbdev"
EndSection
EOF
then
msgbox "Failed to write ${xorgConfFile}."
return 1
fi
}
headless() {
cat << EOF | sudo "${sudoFlags[@]}" tee /etc/X11/xorg.conf.d/10-screendriver.conf &> /dev/null
if ! ensure_xorg_conf_dir; then
return 1
fi
if ! sudo "${sudoFlags[@]}" tee "${xorgConfFile}" > /dev/null << 'EOF'
Section "Monitor"
Identifier "dummy_monitor"
HorizSync 28.0-80.0
@@ -42,6 +67,10 @@ Section "ServerLayout"
Screen 0 "dummy_screen"
EndSection
EOF
then
msgbox "Failed to write ${xorgConfFile}."
return 1
fi
}
@@ -49,11 +78,17 @@ source ./.includes/functions.sh
source ./.includes/ui.sh
answer=$(yesno "Do you have a physical screen attached?")
if [[ "${answer}" == "Yes" ]]; then
active_screen
msgbox "Settings for physical screen applied."
if active_screen; then
msgbox "Settings for physical screen applied."
else
exit 1
fi
else
headless
msgbox "Settings for no screen applied."
if headless; then
msgbox "Settings for no screen applied."
else
exit 1
fi
fi
if [[ "$1" != "-n" ]]; then
+10 -2
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Configure Stormux
# A script to configure the system for new users.
#
@@ -73,7 +73,7 @@ fi
while [[ "$choice" != "Exit" ]]; do
case "$choice" in
"Change username")
./.includes/chuser.sh $(inputbox "Please enter the new username, letters, dashes, and underscores only.")
./.includes/chuser.sh "$(inputbox "Please enter the new username, letters, dashes, and underscores only.")"
restart
;;
"Configure Fenrir")
@@ -121,6 +121,12 @@ while [[ "$choice" != "Exit" ]]; do
"Convert to Server")
source .includes/convert-to-server.sh
;;
"Configure StormUX Repository")
add_stormux_repo
;;
"Update EEPROM")
source .includes/eeprom.sh
;;
esac
options=(
"Change username"
@@ -144,7 +150,9 @@ while [[ "$choice" != "Exit" ]]; do
options+=("Set timezone"
"Get help on IRC"
"Update configure-stormux"
"Update EEPROM"
"Convert to Server"
"Configure StormUX Repository"
)
choice="$(menulist "${options[@]}")" || break
done