Attempt to fix resize

This commit is contained in:
2025-04-25 20:30:21 -07:00
parent 8e2305eb5c
commit f9327e82ae
20 changed files with 23 additions and 17 deletions

View File

@@ -0,0 +1 @@
command-not-found

View File

@@ -0,0 +1,41 @@
#!/bin/bash -e
# polkit fixes
install -m 644 files/polkit-admin.conf "${ROOTFS_DIR}/etc/polkit-1/localauthority.conf.d/51-admin.conf"
# Include custom vendor file for gnome-inital-setup
mkdir -p "${ROOTFS_DIR}/usr/share/gnome-initial-setup/"
install -m 644 files/vendor.conf "${ROOTFS_DIR}/usr/share/gnome-initial-setup/"
# Configure default GDM3 Session to Xorg
mkdir -p "${ROOTFS_DIR}/var/lib/gdm"
on_chroot << EOF
sed -i 's/#WaylandEnable=false/WaylandEnable=false/' /etc/gdm3/daemon.conf
touch /var/lib/gdm/run-initial-setup
EOF
mkdir -p "${ROOTFS_DIR}/etc/dconf/db/local.d"
mkdir -p "${ROOTFS_DIR}/etc/dconf/profile"
install -m 644 files/dconf-profile "${ROOTFS_DIR}/etc/dconf/profile/user"
# Set default gnome-extensions
install -m 644 files/gnome-extensions "${ROOTFS_DIR}/etc/dconf/db/local.d/00-extensions"
# Set default Wallpaper
mkdir -p "${ROOTFS_DIR}/usr/local/share/backgrounds"
install -m 644 files/loveimage.png "${ROOTFS_DIR}/usr/local/share/backgrounds/loveimage.png"
# Set default gnome settings
install -m 644 files/gnome-default-settings "${ROOTFS_DIR}/etc/dconf/db/local.d/00-default-settings"
# Run the dconf update as the first user
on_chroot << EOF
SUDO_USER="${FIRST_USER_NAME}" dconf update
EOF
# Remove setup user (only if it's not a system account)
on_chroot << EOF
if [ "${FIRST_USER_ISSYSTEM}" = "false" ]; then
deluser --remove-home --remove-all-files ${FIRST_USER_NAME}
fi
EOF

View File

@@ -0,0 +1,11 @@
#!/bin/bash -e
# Enable xcompmgr
on_chroot << EOF
raspi-config nonint do_xcompmgr 0
EOF
# Pi-Apps (this is a bash script that installs pi-apps when the user runs it, then gets overwritten by the actual pi-apps)
install -m 755 files/pi-apps "${ROOTFS_DIR}/usr/bin/pi-apps"
install -m 755 files/pi-apps.desktop "${ROOTFS_DIR}/usr/share/applications/pi-apps.desktop"
install -m 644 files/pi-apps-logo.png "${ROOTFS_DIR}/usr/share/icons/hicolor/256x256/apps/pi-apps.png"

View File

@@ -0,0 +1,2 @@
user-db:user
system-db:local

View File

@@ -0,0 +1,10 @@
[org/gnome/desktop/interface]
gtk-theme='Adwaita-dark'
color-scheme='prefer-dark'
[org/gnome/desktop/background]
picture-uri='file:///usr/local/share/backgrounds/loveimage.png'
picture-uri-dark='file:///usr/local/share/backgrounds/loveimage.png'
picture-options='spanned'
primary-color='000000'
secondary-color='FFFFFF'

View File

@@ -0,0 +1,2 @@
[org/gnome/shell]
enabled-extensions=['dash-to-panel@jderose9.github.com', 'ding@rastersoft.com', 'noannoyance@daase.net', 'ubuntu-appindicators@ubuntu.com', 'user-themes@gnome-shell-extensions.gcampax.github.com', 'no-overview@fthx']

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

View File

@@ -0,0 +1,194 @@
#!/bin/bash
# Check if ~/pi-apps or /usr/local/bin/pi-apps exists
if [ -d ~/pi-apps ] || [ -f /usr/local/bin/pi-apps ]; then
# Run the users pi-apps instead of installing it
/usr/local/bin/pi-apps
exit 0
fi
function error {
echo -e "\e[91m$1\e[39m"
exit 1
}
cd "$HOME"
#ensure non-root
if [[ "$(id -u)" == 0 ]]; then
error "Pi-Apps is not designed to be installed as root! Please try again as a regular user."
fi
#ensure debian
command -v apt >/dev/null || error "apt: command not found. Most likely this system is not running Debian."
#Ensure running arm processor
if uname -m | grep -qi 'x86\|i686\|i386' ;then
error "Pi-Apps is not supported on non-ARM CPU architectures. We encourage you to use your distro's app store, like Gnome Software or Discover Software Center."
fi
sudo apt update || error "The command 'sudo apt update' failed. Before Pi-Apps will work, you must fix your apt package-management system."
#install dependencies
dependencies='yad curl wget aria2 lsb-release software-properties-common apt-utils apt-transport-https gnupg imagemagick bc librsvg2-bin locales shellcheck git wmctrl xdotool x11-utils rsync unzip debsums libgtk3-perl bzip2'
if ! dpkg -s $dependencies &>/dev/null ;then
sudo apt install $dependencies -y -f --no-install-recommends || error "Pi-Apps dependencies failed to install and so the Pi-Apps install has been aborted. Before Pi-Apps can be installed you must solve any errors above."
fi
#remove annoying "YAD icon browser" launcher
sudo rm -f /usr/share/applications/yad-icon-browser.desktop
#download pi-apps if folder missing
DIRECTORY="$(readlink -f "$(dirname "$0")")"
if [ -z "$DIRECTORY" ] || [ "$DIRECTORY" == "$HOME" ] || [ "$DIRECTORY" == bash ] || [ ! -f "${DIRECTORY}/api" ] || [ ! -f "${DIRECTORY}/gui" ];then
DIRECTORY="$HOME/pi-apps"
fi
downloaded=0 #track if pi-apps was downloaded this time
#Re-download pi-apps folder in all cases if pi-apps already exists
#users expect to use the install script to "restore" a working pi-apps install in incase their local version is somehow not working or corrupted
if [ -d "$DIRECTORY" ];then
rm -rf ~/pi-apps-forced-update
echo "Reinstalling Pi-Apps..."
downloaded=1
output="$(git clone --depth 1 https://github.com/Botspot/pi-apps ~/pi-apps-forced-update 2>&1)"
if [ $? != 0 ] || [ ! -d "$DIRECTORY" ];then
error "Pi-Apps download failed!\ngit clone output was: $output"
fi
cp -af "${DIRECTORY}/data" ~/pi-apps-forced-update
cp -af "${DIRECTORY}/apps" ~/pi-apps-forced-update
rm -rf "$DIRECTORY"
mv -f ~/pi-apps-forced-update "$DIRECTORY"
#if pi-apps folder does not exist, download it
elif [ ! -d "$DIRECTORY" ];then
echo "Downloading Pi-Apps..."
downloaded=1
output="$(git clone --depth 1 https://github.com/Botspot/pi-apps "$DIRECTORY" 2>&1)"
if [ $? != 0 ] || [ ! -d "$DIRECTORY" ];then
error "Pi-Apps download failed!\ngit clone output was: $output"
fi
#click new installation analytics link
"${DIRECTORY}/api" shlink_link script install
fi
#Past this point, DIRECTORY variable populated with valid pi-apps directory
#if ChromeOS, install lxterminal
if command -v garcon-terminal-handler >/dev/null ;then
echo "In order to install apps on ChromeOS, a working terminal emulator is required.
Installing lxterminal in 10 seconds... (press Ctrl+C to cancel)"
sleep 10
sudo apt install -yf lxterminal || error "Failed to install lxterminal on ChromeOS!"
fi
#menu button
if [ ! -f ~/.local/share/applications/pi-apps.desktop ];then
echo "Creating menu button..."
fi
mkdir -p ~/.local/share/applications
if [ -f /etc/xdg/menus/lxde-pi-applications.menu ];then #If on PiOS, place launcher in Accessories as it has always been there and is more intuitive there
echo "[Desktop Entry]
Name=Pi-Apps
Comment=Raspberry Pi App Store for open source projects
Exec=${DIRECTORY}/gui
Icon=${DIRECTORY}/icons/logo.png
Terminal=false
StartupWMClass=Pi-Apps
Type=Application
Categories=Utility
StartupNotify=true" > ~/.local/share/applications/pi-apps.desktop
else #if not on PiOS, place launcher in Preferences to match the wider decision of putting app installers there (see PR #2388)
echo "[Desktop Entry]
Name=Pi-Apps
Comment=Raspberry Pi App Store for open source projects
Exec=${DIRECTORY}/gui
Icon=${DIRECTORY}/icons/logo.png
Terminal=false
StartupWMClass=Pi-Apps
Type=Application
Categories=Utility;System;PackageManager;
StartupNotify=true" > ~/.local/share/applications/pi-apps.desktop
fi
chmod 755 ~/.local/share/applications/pi-apps.desktop
gio set ~/.local/share/applications/pi-apps.desktop "metadata::trusted" yes
#copy menu button to Desktop
mkdir -p ~/Desktop
cp -f ~/.local/share/applications/pi-apps.desktop ~/Desktop/
chmod 755 ~/Desktop/pi-apps.desktop
gio set ~/Desktop/pi-apps.desktop "metadata::trusted" yes
#copy icon to local icons directory (necessary on some wayland DEs like on PiOS Wayfire)
mkdir -p ~/.local/share/icons
cp -f ${DIRECTORY}/icons/logo.png ~/.local/share/icons/pi-apps.png
cp -f ${DIRECTORY}/icons/settings.png ~/.local/share/icons/pi-apps-settings.png
#settings menu button
if [ ! -f ~/.local/share/applications/pi-apps-settings.desktop ];then
echo "Creating Settings menu button..."
fi
echo "[Desktop Entry]
Name=Pi-Apps Settings
Comment=Configure Pi-Apps or create an App
Exec=${DIRECTORY}/settings
Icon=${DIRECTORY}/icons/settings.png
Terminal=false
StartupWMClass=Pi-Apps-Settings
Type=Application
Categories=Settings;
StartupNotify=true" > ~/.local/share/applications/pi-apps-settings.desktop
if [ ! -f ~/.config/autostart/pi-apps-updater.desktop ];then
echo "Creating autostarted updater..."
fi
mkdir -p ~/.config/autostart
echo "[Desktop Entry]
Name=Pi-Apps Updater
Exec=${DIRECTORY}/updater onboot
Icon=${DIRECTORY}/icons/logo.png
Terminal=false
StartupWMClass=Pi-Apps
Type=Application
X-GNOME-Autostart-enabled=true
Hidden=false
NoDisplay=false" > ~/.config/autostart/pi-apps-updater.desktop
mkdir -p "${DIRECTORY}/data/status" "${DIRECTORY}/data/update-status" \
"${DIRECTORY}/data/preload" "${DIRECTORY}/data/settings" \
"${DIRECTORY}/data/status" "${DIRECTORY}/data/update-status" \
"${DIRECTORY}/data/categories"
#pi-apps terminal command
if [ ! -f /usr/local/bin/pi-apps ] || ! cat /usr/local/bin/pi-apps | grep -q "${DIRECTORY}/gui" ;then
echo "#!/bin/bash
${DIRECTORY}/gui"' "$@"' | sudo tee /usr/local/bin/pi-apps >/dev/null
sudo chmod +x /usr/local/bin/pi-apps
fi
#check if system is broken
errors="$("${DIRECTORY}/api" is_supported_system)" || error "$errors"
#preload app list
if [ ! -f "$DIRECTORY/data/preload/LIST-" ];then
echo "Preloading app list..."
fi
"${DIRECTORY}/preload" yad &>/dev/null
#Run runonce entries
"${DIRECTORY}/etc/runonce-entries" &>/dev/null
#Determine message of the day. If announcements file missing or over a day old, download it.
if [ ! -f "${DIRECTORY}/data/announcements" ] || [ ! -z "$(find "${DIRECTORY}/data/announcements" -mtime +1 -print)" ]; then
wget https://raw.githubusercontent.com/Botspot/pi-apps-announcements/main/message -qO "${DIRECTORY}/data/announcements"
fi
if [ $downloaded == 1 ];then
echo "Installation complete. Pi-Apps can be launched from the start menu or by running the command 'pi-apps'."
echo "Further explanation for how to use Pi-Apps can be found on our getting started webpage: https://pi-apps.io/wiki/getting-started/running-pi-apps/"
else
echo -e "Please note that Pi-Apps has NOT been freshly downloaded, because $DIRECTORY already exists."
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

View File

@@ -0,0 +1,10 @@
[Desktop Entry]
Name=Pi-Apps
Comment=Raspberry Pi App Store for open source projects
Exec=/usr/bin/pi-apps
Icon=/usr/share/icons/hicolor/256x256/apps/pi-apps.png
Terminal=false
StartupWMClass=Pi-Apps
Type=Application
Categories=Utility;System;PackageManager;
StartupNotify=true

View File

@@ -0,0 +1 @@
AdminIdentities=unix-group:sudo;unix-group:admin

View File

@@ -0,0 +1,5 @@
[pages]
# Pages to show when a user already exists
existing_user_only=language;keyboard;timezone;goa;
# Only show the following pages in a 'first boot' situation
new_user_only=welcome;language;keyboard;timezone;account;network;privacy;goa;