diff --git a/BUILD.md b/BUILD.md index 32f5c94..ca95931 100644 --- a/BUILD.md +++ b/BUILD.md @@ -87,7 +87,7 @@ After reboot, few final steps may be made to improve further the final image, ma - Set a wallpaper - Edit `/boot/cmdline.txt` replacing the default content with ``` - root=UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX rw rootwait console=serial0,115200 console=tty1 fsck.repair=yes + root=UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX rw rootwait console=serial0,115200 console=tty1 fsck.repair=yes plymouth.ignore-serial-consoles video=HDMI-A-1:1920x1080@60D ``` - start Kstars without acknowledging any message, start ekos simulator, go to the guiding tab and download the most common indexes - enable the resize script to do its magic on the user's first boot - run `sudo systemctl enable resize_once` @@ -104,3 +104,20 @@ Using `pishrink` follow these steps: - `sudo ./pishrink.sh -za astroarch.img astroarch-X.X.X.img.gz` the gzipped image is ready to be distributed and can be flashed on other media + +## Building with an AstroArch script from an existing AstroArch version +## (according to this description https://wiki.archlinux.org/title/Install_Arch_Linux_from_existing_Linux) + +Copy the AA_build_fromAA.sh and astroarch_build_chroot.sh files from the GitHub site https://github.com/sc74/astroarch/tree/1.10/build-astroarch to your Home directory + +Make them executable with the command chown +x followed by the file name. Mount a drive or disk and simply run the command AA_build_fromAA.sh + +The script will simply ask you which device you want to install on and the password for astronaut + +At the end of the process, you will have a working installation on your device and an image to install on another device + +The scripts are easily modifiable to create your own AstroArch. The first script allows you to pass the files needed for the build + +The second builds the OS. You can add packages, services, and any other files to customize your setup + + diff --git a/README.md b/README.md index f5f3a56..dc76ac0 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,13 @@ this likely means that unfortunately your raspberry pi rev cannot boot the image Once you are logged in the first thing you should do is update the system, open the terminal and type `update-astroarch` command # Set timezone -Do not forget to set the right timezone! to do so run `sudo timedatectl set-timezone Foo/Bar` where Foo/Bar is something like `Europe/Rome` +Here a small video that will show you how to set the timezone without the terminal + +https://github.com/devDucks/astroarch/assets/4163222/a935b491-5b7a-444d-9f89-a01a279063de + +If you want to use the terminal list first the available timezone with `timedatecl list-timezones` and then set the right one with `tsudo timedatectl set-timezone Foo/Bar` where Foo/Bar is something like `Europe/Rome` + +Do not forget to set the right timezone! # Passwords To save you some time, here the default password you will need for AstroArch: @@ -97,6 +103,8 @@ The followings are some useful commands that you can run from the terminal so yo - `use-astro-bleeding-edge` => install bleeding edge packages for Kstars and INDI - `use-astro-stable` => install stable packages for Kstars and INDI +The AstroArch Tweak Tool utility allows you to easily run all these commands + # Connecting via browser (noVNC) By default `AstroArch` will start a hostpot called `AstroArch`, to connect to that WiFi network use the password `astronomy` @@ -233,9 +241,11 @@ ADDITIONAL CONSIDERATIONS (use these as guidelines): If you are having trouble getting the signal, you may need to protect your USB3 cables (they interfere with the GPS signal) if the device is not recognized (which is very unlikely on ArchLinux), we do not recommend using ttyXXX as it may point to other serial devices after a reboot +These commands are in the AstroArch Tweak Tool utility + # How to enable bluetooth By default there are no packages to enabling bluetooth, to install them and enabling bluetooth functionalities run the following command `bluetooth_on`, this command will install the BT packages and enable the bluetooth daemon to run automatically at boot. -If you want to disable bluetooth daemon autostart just run `bluetooth_off` and if you want to remove it run `bluetooth_remove` +If you want to disable bluetooth daemon autostart just run `bluetooth_off` and if you want to remove it run `bluetooth_remove`. These commands are in the AstroArch Tweak Tool utility # How to enable FTP Identical to Bluetooth, there is no default package to activate an FTP server. @@ -244,7 +254,9 @@ To install and activate it, run the following command `ftp_on`. This command wil To connect from a remote station, use an FTP client such as FileZilla or other. All you need to do is identify yourself with the astronaut user, his password and the IP address where the server is located. You will easily find the IP address of your LAN or WLAN with the ifconfig command in a console. Once connected, you can very quickly transfer your files in both directions. -If you want to disable the automatic start of the FTP server, simply run `ftp_off` and if you want to remove it, run `ftp_remove`. +If you want to disable the automatic start of the FTP server, simply run `ftp_off` and if you want to remove it, run `ftp_remove`. + +These commands are in the AstroArch Tweak Tool utility # Where to find more packages? If you want to install more packages you should look what is available here https://archlinuxarm.org/packages - if you find the package there you can easily install it running `sudo pacman -S PACKAGE_NAME`, diff --git a/astroarch_build.sh b/astroarch_build.sh index 1b91f2a..8f9177b 100644 --- a/astroarch_build.sh +++ b/astroarch_build.sh @@ -44,7 +44,7 @@ pacman -Syu base-devel pipewire-jack gnu-free-fonts wireplumber \ ksystemlog discover kwalletmanager kgpg qt5-serialbus \ qt5-serialport qt5ct udisks2-qt5 xorg-fonts-misc fuse2 \ fortune-mod cowsay pacman-contrib arandr neofetch \ - astromonitor kscreen sddm-kcm flatpak --noconfirm --ask 4 + astromonitor kscreen sddm-kcm flatpak ckbcomp astroarch-onboarding kdialog --noconfirm --ask 4 # Allow wheelers to sudo without password to install packages sed -i 's/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/g' /etc/sudoers @@ -99,6 +99,7 @@ ln -s /home/astronaut/.astroarch/systemd/novnc.service /usr/lib/systemd/system/n ln -s /home/astronaut/.astroarch/systemd/x0vncserver.service /etc/systemd/system/x0vncserver.service ln -s /home/astronaut/.astroarch/systemd/resize_once.service /etc/systemd/system/resize_once.service ln -s /home/astronaut/.astroarch/configs/.astroarch.version /home/astronaut/.astroarch.version +ln -s /home/astronaut/.astroarch/systemd/astroarch-onboarding.service /etc/systemd/system/astroarch-onboarding.service # Copy xorg config cp /home/astronaut/.astroarch/configs/xorg.conf /etc/X11/ @@ -153,17 +154,17 @@ su astronaut -c "cp /home/astronaut/.astroarch/configs/kscreenlockerrc /home/ast timedatectl set-timezone Europe/London # If we are on a raspberry let's adjust /boot/config.txt +sed -i 's/max_framebuffers=2/max_framebuffers=2\nframebuffer_depth=24/g' /boot/config.txt +sed -i 's/dtoverlay=vc4-kms-v3d/dtoverlay=vc4-kms-v3d,cma-512/g' /boot/config.txt echo dtparam=i2c_arm=on >> /boot/config.txt echo dtparam=audio=on >> /boot/config.txt echo disable_overscan=1 >> /boot/config.txt echo gpu_mem=256 >> /boot/config.txt -echo disable_splash=1 >> /boot/config.txt echo 3dtparam=krnbt=on >> /boot/config.txt -echo hdmi_drive=2 >> /boot/config.txt echo dtoverlay=i2c-rtc >> /boot/config.txt +echo kernel=kernel8.img >> /boot/config.txt +echo hdmi_enable_4kp60=1 >> /boot/config.tx echo i2c-dev > /etc/modules-load.d/raspberrypi.conf -sed -i 's/dtoverlay=vc4-kms-v3d/dtoverlay=vc4-fkms-v3d/g' /boot/config.txt -sed -i 's/max_framebuffers=2/max_framebuffers=2\nframebuffer_depth=24/g' /boot/config.txt # Pi5 only settings should go here echo [pi5] >> /boot/config.txt diff --git a/build-astroarch/AA_build_fromAA.sh b/build-astroarch/AA_build_fromAA.sh new file mode 100755 index 0000000..e21c5f3 --- /dev/null +++ b/build-astroarch/AA_build_fromAA.sh @@ -0,0 +1,106 @@ +#!/bin/bash +# Exit on the first error, if any + +set -e + +# Grab the OS architecture for further forked logic +ARCH=$(uname -m) + +#paru -S pishrink-git + +# Choose disk to write and prepare +count=0 +IFS=$'\n' +for device_info in `lsblk -d -n -o NAME,TYPE,SIZE`; do +count=$((count+1)) +device_name=$(echo $device_info | cut -d" " -f1) +dev[$count]=$device_name +printf '%s: %s\n' "$count" "$device_info" +done + +read -rp "Select disk (numbers 1-$count): " selection + +DISK="/dev/${dev[$selection]}" +PART1="$DISK"1"" +PART2="$DISK"2"" + +echo "Installing on $DISK" +echo "Are you sure ?" +read -p "Press enter to continue" +echo +echo "Erase disk $DISK" +read -p "Press enter to continue" +sudo -S dd if=/dev/zero of=$DISK bs=440 count=1 status=progress +echo +echo "Make partitions on $DISK" +#read -p "Press enter to continue" +( + echo p; + echo o; + echo n; + echo ; + echo ; + echo ; + echo +537M; + echo t; + echo 0c; + echo a; + echo n; + echo ; + echo ; + echo ; + echo ; + echo w; +) | sudo fdisk $DISK +echo +echo "Format partitions on $DISK" +#read -p "Press enter to continue" +sudo mkfs.vfat -n 'BOOT' $PART1 +echo y | sudo mkfs.ext4 $PART2 +echo "done" + + +# Create folder and mount +echo "Create folder root" +if [ ! -d ~/root ]; then + mkdir ~/root +fi +echo "Mount partitions in folder" +#read -p "Press enter to continue" +sudo mount $PART2 ~/root +if [ ! -d ~/root/boot ]; then + sudo mkdir ~/root/boot +fi +sudo mount $PART1 ~/root/boot +echo 'astro' | sudo -S echo '' +# Copy some files in chroot +echo $DISK > diskchroot +sudo cp ~/diskchroot ~/root +echo 'astro' | sudo -S echo '' +sudo mkdir -p ~/root/kstars/astronomy/ +sudo cp ~/.local/share/kstars/astrometry/* ~/root/kstars/astronomy/ +echo 'astro' | sudo -S echo '' +sudo cp astroarch_build_chroot.sh /home/astronaut/root +echo 'astro' | sudo -S echo '' +# Install base +echo "Install ArchLinux base" +#read -p "Press enter to continue" +# sudo pacstrap -K ~/root base base-devel linux-rpi linux-rpi-headers linux-firmware-whence linux-firmware linux-api-headers archlinuxarm-keyring +sudo pacstrap -K ~/root base linux-rpi linux-firmware base-devel linux-api-headers archlinuxarm-keyring +echo 'astro' | sudo -S echo '' +# Enter chroot and install AstroArch +echo "arch-chroot : install AstroArch" +#read -p "Press enter to continue" +sudo -S arch-chroot ~/root /astroarch_build_chroot.sh +echo 'astro' | sudo -S echo '' +# Umount disk and delete folder +echo "umount" $DISK +sudo umount -l $PART1 +sudo umount -l $PART2 +echo "delete folder root" +sudo rm -R ~/root +echo 'astro' | sudo -S echo '' +echo "create image astroarch" +sudo dd if=$DISK of=astroarch.img bs=8M status=progress +echo 'astro' | sudo -S echo '' +sudo pishrink.sh -za astroarch.img astroarch-X.X.X.img.gz diff --git a/build-astroarch/astroarch_build_chroot.sh b/build-astroarch/astroarch_build_chroot.sh new file mode 100755 index 0000000..875a509 --- /dev/null +++ b/build-astroarch/astroarch_build_chroot.sh @@ -0,0 +1,250 @@ +#!/bin/bash + +source /etc/profile + +# Exit on the first error, if any +set -e + +# Grab the OS architecture for further forked logic +ARCH=$(uname -m) + +DISK=$(cat 'diskchroot') +UUID_part1=$(blkid -o value -s UUID "$DISK"1"") +UUID_part2=$(blkid -o value -s UUID "$DISK"2"") +echo $DISK + +sed -i 's/root=\/dev\/mmcblk0p2/root=UUID='$UUID_part2'/' /boot/cmdline.txt +sed -i '/root/ s/$/ video=HDMI-A-1:1920x1080M@60D/' /boot/cmdline.txt + +# ROOT PASSWD +echo "root passwd" +echo "root:root" | chpasswd + +# FSTAB +cat << EOF >> /etc/fstab +# Static information about the filesystems. +# See fstab(5) for details. + +UUID=$UUID_part1 /boot vfat defaults,noexec,nodev,showexec 0 0 +UUID=$UUID_part2 / ext4 rw,relatime 0 1 +EOF + +# Parallelize pacman download to 5 and use pacman as progress bar +sed -i 's|ParallelDownloads = 5|ParallelDownloads=5|g' /etc/pacman.conf +sed -i '/ParallelDownloads=5/aILoveCandy' /etc/pacman.conf +sed -i '/ParallelDownloads=5/aDisableDownloadTimeout' /etc/pacman.conf + +# Add astroarch pacman repo to pacman.conf (it must go first) +sed -i 's|\[core\]|\[astromatto\]\nSigLevel = Optional TrustAll\nServer = http://astroarch.astromatto.com:9000/$arch\n\n\[core\]|' /etc/pacman.conf + +# config hostnames +echo "astroarch" > /etc/hostname +echo "127.0.0.1 localhost" >> /etc/hosts +echo "127.0.1.1 astroarch" >> /etc/hosts + + +# Bootstrap pacman-key +pacman-key --init && pacman-key --populate archlinuxarm + +# Allows installation without asking for the root password after waiting +#sed -i 's|# unlock_time = 600|unlock_time = 0|g' /etc/security/faillock.conf +#sed -i 's|# root_unlock_time = 900|root_unlock_time = 0|g' /etc/security/faillock.conf + +# Update all packages now +pacman -Syu --noconfirm + +# install packages +pacman -S wget git pipewire-jack gnu-free-fonts wireplumber \ + zsh plasma-desktop sddm networkmanager xf86-video-dummy \ + network-manager-applet networkmanager-qt chromium xorg konsole \ + gpsd breeze-icons hicolor-icon-theme knewstuff5 tigervnc \ + knotifyconfig5 kplotting5 qt6-datavis3d qt5-quickcontrols \ + qt5-websockets qtkeychain stellarsolver xf86-video-fbdev \ + xplanet plasma-nm dhcp dnsmasq kate plasma-systemmonitor \ + dolphin uboot-tools usbutils cloud-guest-utils samba paru \ + websockify novnc astrometry.net gsc kstars phd2 packagekit-qt6 \ + indi-3rdparty-libs indi-3rdparty-drivers rpi-imager \ + i2c-tools indiserver-ui astro_dmx openssl-1.1 firefox chrony \ + ksystemlog discover kwalletmanager kgpg dhcpcd spectacle \ + qt6-serialport qt6ct udisks2-qt5 xorg-fonts-misc fuse2 \ + fortune-mod cowsay pacman-contrib arandr neofetch nss-mdns \ + astromonitor kscreen sddm-kcm flatpak ark cups cups-pdf\ + arch-install-scripts argon2 astroarch-status-notifications atkmm bc cairomm dialog dnssec-anchors dosfstools \ + ecryptfs-utils geoclue glibmm gparted gtkmm3 imath iw kdenetwork-filesharing lbzip2 ldns libcamera libcamera-ipa \ + libdeflate libomxil-bellagio libsigc++ libsoup lrzip lzop nano net-tools netctl networkmanager-qt5 nilfs-utils \ + openexr openresolv pangomm partimage pbzip2 pigz pixz qt5-serialport \ + qt5ct raspberrypi-utils rpi5-eeprom screen sshfs vi wireless-regdb wireless_tools drbl dtc --noconfirm --ask 4 + +# Uncomment en_US UTF8 and generate locale files +sed -i -e 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' /etc/locale.gen +locale-gen + +# Set a standard TZ to avoid breaking plasma clock widget +timedatectl set-timezone Europe/London + +# Allow wheelers to sudo without password to install packages +sed -i 's/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/g' /etc/sudoers + +# create user astro with home, add it to wheel +useradd -G wheel -m astronaut +echo "astronaut:astro" | chpasswd + +# Add astronaut to uucp for serial device ownership +usermod -aG uucp,sys,network,power,audio,input,lp,storage,video,users astronaut +su astronaut -c "xdg-user-dirs-update" + +# Add sddm user to video group +usermod -aG video sddm + +# Pull the brain repo, this will be used for scripting out the final image +#su astronaut -c "git clone https://github.com/devDucks/astroarch.git /home/astronaut/.astroarch" +su astronaut -c "git clone -b 1.10 --single-branch https://github.com/sc74/astroarch.git /home/astronaut/.astroarch" + +# Allow x11 forwarding over SSH +sed -i 's/#AllowTcpForwarding yes/AllowTcpForwarding yes/g' /etc/ssh/sshd_config +sed -i 's/#X11DisplayOffset 10/X11DisplayOffset 10/g' /etc/ssh/sshd_config +sed -i 's/#X11UseLocalhost yes/X11UseLocalhost yes/g' /etc/ssh/sshd_config + +# Make all necessary folders +mkdir /etc/sddm.conf.d +#su astronaut -c "mkdir -p /home/astronaut/.config" +su astronaut -c "mkdir -p /home/astronaut/Pictures/wallpapers" +#su astronaut -c "mkdir -p /home/astronaut/Desktop" + +# install oh-my-zsh and set the default shell to zsh +chsh -s /usr/bin/zsh astronaut +rm /home/astronaut/.bash* +cd /home/astronaut +ZSH=/home/astronaut/.oh-my-zsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended +chown astronaut:astronaut .oh-my-zsh/ + +# Set local Hostname resolution +sed -i 's|hosts: mymachines |&mdns_minimal [NOTFOUND=return] |g' /etc/nsswitch.conf + +# Set the samba pass +ln -s /home/astronaut/.astroarch/configs/smb.conf /etc/samba/smb.conf +systemctl start smb +(echo astro; echo astro) | smbpasswd -s -a astronaut +systemctl stop smb + +# Link a zsh config for astronaut +su astronaut -c "ln -s /home/astronaut/.astroarch/build-astroarch/configs/.zshrc /home/astronaut/.zshrc" + +# Start NetworkManager and sleep to create the hotspot +systemctl start NetworkManager +sleep 5 + +# Remove eventually existing systemd configs we are going to substitute +rm -f /usr/lib/systemd/system/novnc.service + +# Disable systemd-timesyncd and enable chronyd +systemctl disable systemd-timesyncd +systemctl enable chronyd + +# Symlink now files +ln -s /home/astronaut/.astroarch/configs/kde_settings.conf /etc/sddm.conf.d/kde_settings.conf +ln -s /home/astronaut/.astroarch/systemd/novnc.service /usr/lib/systemd/system/novnc.service +ln -s /home/astronaut/.astroarch/systemd/x0vncserver.service /etc/systemd/system/x0vncserver.service +ln -s /home/astronaut/.astroarch/configs/.astroarch.version /home/astronaut/.astroarch.version + +# Copy config.txt in /boot +cp /home/astronaut/.astroarch/configs/config.txt /boot + +# Copy xorg config +cp /home/astronaut/.astroarch/configs/xorg.conf /etc/X11/ + +# Copy v3d X config +cp /home/astronaut/.astroarch/configs/99-v3d.conf /etc/X11/xorg.conf.d + +# Copy the polkit script to allow rebooting, shutting down with no errors +cp /home/astronaut/.astroarch/configs/99-polkit-power.rules /etc/polkit-1/rules.d/ + +# Copy the systemd unit to create AP / resize +cp /home/astronaut/.astroarch/systemd/create_ap.service /etc/systemd/system/ +cp /home/astronaut/.astroarch/systemd/resize_once.service /etc/systemd/system/ + +# Enable vncserver +systemctl enable x0vncserver + +# Copy the config for kwinrc +su astronaut -c "cp /home/astronaut/.astroarch/configs/kwinrc /home/astronaut/.config" + +# Enable now all services +systemctl enable systemd-resolved.service dhcpcd.service sshd.service systemd-networkd.service sddm.service novnc.service NetworkManager.service avahi-daemon.service nmb.service smb.service create_ap.service resize_once.service cups.service + +# Script for autostart settings plasma +mkdir -p /home/astronaut/.config/autostart/ +cp /home/astronaut/.astroarch/build-astroarch/desktop/plasmasystemsettings.sh.desktop /home/astronaut/.config/autostart/ + +# Script autostart update-astroarch +cp /home/astronaut/.astroarch/build-astroarch/desktop/update-astroarch.sh.desktop /home/astronaut/.config/autostart/ + +# Install astrometry files +mkdir -p /home/astronaut/.local/share/kstars/astrometry/ +mv /kstars/astronomy/* /home/astronaut/.local/share/kstars/astrometry/ + +# Clear script in autostart +cp /home/astronaut/.astroarch/build-astroarch/systemd/clear-install-astroarch.service /etc/systemd/system/ +cp /home/astronaut/.astroarch/build-astroarch/systemd/clear-install-astroarch.timer /etc/systemd/system/ +systemctl enable clear-install-astroarch.timer + +# Copy wallpapers +su astronaut -c "cp /home/astronaut/.astroarch/wallpapers/bubble.jpg /home/astronaut/Pictures/wallpapers" +su astronaut -c "cp /home/astronaut/.astroarch/wallpapers/south-milky.jpg /home/astronaut/Pictures/wallpapers" +su astronaut -c "cp /home/astronaut/.astroarch/wallpapers/pacman.jpg /home/astronaut/Pictures/wallpapers" + +# Copy desktop icons +su astronaut -c "ln -s /usr/share/applications/org.kde.konsole.desktop /home/astronaut/Desktop/Konsole" +su astronaut -c "ln -s /usr/share/applications/org.kde.kstars.desktop /home/astronaut/Desktop/Kstars" +su astronaut -c "ln -s /usr/share/applications/astrodmx_capture.desktop /home/astronaut/Desktop/AstroDMx_capture" +su astronaut -c "ln -s /usr/share/applications/phd2.desktop /home/astronaut/Desktop/phd2.desktop" +su astronaut -c "ln -s /usr/share/applications/xgps.desktop /home/astronaut/Desktop/xgps.desktop" +su astronaut -c "ln -s /usr/share/applications/indiserver-ui.desktop /home/astronaut/Desktop/indiserver-ui.desktop" + +# Remove actual novnc icons +rm -r /usr/share/webapps/novnc/app/images/icons/* + +# Copy custom novnc icons folder +cp -r /home/astronaut/.astroarch/assets/icons/* /usr/share/webapps/novnc/app/images/icons + +# Copy the screensaver config, by default it is off +su astronaut -c "cp /home/astronaut/.astroarch/configs/kscreenlockerrc /home/astronaut/.config/kscreenlockerrc" + +# Disable Kwallet by default +su astronaut -c "echo $'[Wallet]\nEnabled=false' > /home/astronaut/.config/kwalletrc" + +# Assigns files to user astronaut +chown -R astronaut:astronaut /home/astronaut + +######################################################################################## +# This section allows you to install some packages from a GitHub repo. If the packages are on your site with a repo, install the packages in the packages section. Then copy the services to /etc/systemd/system and enable them +# Onboarding +# Disable alpm for repo in disk +sed -i 's|DownloadUser = alpm|#DownloadUser = alpm|g' /etc/pacman.conf +# Repository sc74.github.io +su astronaut -c "git clone https://github.com/sc74/sc74.github.io.git /home/astronaut/.astroarch/sc74.github.io" +sed -i 's|\[astromatto\]|\[sc74\]\nSigLevel = Optional TrustAll\nServer = file:///home/astronaut/.astroarch/sc74.github.io/aarch64\n\n\[astromatto\]|' /etc/pacman.conf +yes | LC_ALL=en_US.UTF-8 pacman -Syu --noconfirm +# Install package astroarch-onboarding +yes | LC_ALL=en_US.UTF-8 pacman -S astroarch-onboarding --noconfirm --ask 4 +cp /home/astronaut/.astroarch/build-astroarch/systemd/astroarch-onboarding.service /etc/systemd/system/ +systemctl enable astroarch-onboarding.service + +# Install some packages +pacman -S rustdesk-bin indi-pylibcamera libcamera-rpi python-libcamera-rpi libcamera-ipa-rpi libcamera-docs-rpi libcamera-tools-rpi \ + gst-plugin-libcamera-rpi python-pycamera2 rpicam-apps --noconfirm --ask 4 +# Delete repo sc74 +sed -i -e '/\[sc74\]/,+2d' /etc/pacman.conf +# Enable alpm +sed -i 's|#DownloadUser = alpm|DownloadUser = alpm|g' /etc/pacman.conf +######################################################################################## + +# Restores faillock +sed -i 's|unlock_time = 0|# unlock_time = 600|g' /etc/security/faillock.conf + +# Take sudoers to the original state +sed -i 's/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/g' /etc/sudoers +sed -i 's/# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/g' /etc/sudoers + +echo "exit arch-chroot" +exit diff --git a/build-astroarch/configs/.zshrc b/build-astroarch/configs/.zshrc new file mode 100644 index 0000000..1ff3586 --- /dev/null +++ b/build-astroarch/configs/.zshrc @@ -0,0 +1,176 @@ +export PATH=/usr/share/GSC/bin:$HOME/bin:/usr/local/bin:$PATH +export ZSH="$HOME/.oh-my-zsh" +export LC_CTYPE=en_US.UTF-8 +export SYSTEMD_TIMEDATED_NTP_SERVICES=chronyd.service + +ZSH_THEME="af-magic" +ZSH_CUSTOM=$HOME/.astroarch + +EXTRA_ZSH=$HOME/extra.zsh + +zstyle ':omz:update' mode disabled + +ENABLE_CORRECTION="false" +HIST_STAMPS="yyyy-mm-dd" + +plugins=(git archlinux) + +# Find all plugins and append them to plugins +for dir in $HOME/.astroarch/plugins/**/*.plugin.zsh; do + split=(${(s:/:)dir}) + last=$split[-1] + name=(${(s:.:)last}) + plugins+=($name[1]) +done; + +source $ZSH/oh-my-zsh.sh + +EDITOR=nano +INDI_ROLLBACK_VERSION=2.0.9-1 +INDI_LIBS_ROLLBACK_VERSION=2.0.9-1 +INDI_DRIVERS_ROLLBACK_VERSION=2.0.9-1 +KSTARS_ROLLBACK_VERSION=3.7.2-1 + +# Alias section +alias update-astromonitor='wget -O - https://raw.githubusercontent.com/MattBlack85/astro_monitor/main/install.sh | sh' +alias astro-rollback-full='astro-rollback-indi && astro-rollback-kstars' + +# Run aa_motd.sh +bash /home/astronaut/.astroarch/scripts/aa_motd.sh + +function use-astro-bleeding-edge() +{ + echo 'astro' | sudo -S echo '' + sudo pacman -Sy && yes | LC_ALL=en_US.UTF-8 sudo pacman -S kstars-git libindi-git indi-3rdparty-drivers-git indi-3rdparty-libs-git +} + +function use-astro-stable() +{ + echo 'astro' | sudo -S echo '' + sudo pacman -Sy && yes | LC_ALL=en_US.UTF-8 sudo pacman -S kstars libindi indi-3rdparty-drivers indi-3rdparty-libs +} + + +function astro-rollback-indi() +{ + echo 'astro' | sudo -S echo '' + setopt localoptions rmstarsilent + mkdir -p ~/.rollback + cd ~/.rollback + wget -O indi-3rdparty-drivers-${INDI_DRIVERS_ROLLBACK_VERSION}-aarch64.pkg.tar.xz http://astromatto.com:9000/aarch64/indi-3rdparty-drivers-${INDI_DRIVERS_ROLLBACK_VERSION}-aarch64.pkg.tar.xz + wget -O libindi-${INDI_ROLLBACK_VERSION}-aarch64.pkg.tar.xz http://astromatto.com:9000/aarch64/libindi-${INDI_ROLLBACK_VERSION}-aarch64.pkg.tar.xz + wget -O indi-3rdparty-libs-${INDI_LIBS_ROLLBACK_VERSION}-aarch64.pkg.tar.xz http://astromatto.com:9000/aarch64/indi-3rdparty-libs-${INDI_LIBS_ROLLBACK_VERSION}-aarch64.pkg.tar.xz + sudo pacman -U libindi* indi* --noconfirm + cd - > /dev/null 2>&1 + rm -rf ~/.rollback/* +} + +function astro-rollback-kstars() +{ + echo 'astro' | sudo -S echo '' + setopt localoptions rmstarsilent + mkdir -p ~/.rollback + cd ~/.rollback + wget -O kstars-${KSTARS_ROLLBACK_VERSION}-aarch64.pkg.tar.xz http://astromatto.com:9000/aarch64/kstars-${KSTARS_ROLLBACK_VERSION}-aarch64.pkg.tar.xz + sudo pacman -U kstars* --noconfirm + cd - > /dev/null 2>&1 + rm -rf ~/.rollback/* +} + +function update-astroarch() +{ + echo 'astro' | sudo -S echo '' + + # Function to convert a version (eg: 1.9 or 1.9.1) to a number (eg: 10900 or 10901) + version_to_num() { + local version=$1 + local major minor patch + IFS='.' read -r major minor patch <<< "$version" + minor=${minor:-0} + patch=${patch:-0} + printf "%d%02d%02d" "$major" "$minor" "$patch" + } + + # Defining files and variables + UPDATE_HISTORY="/home/astronaut/.astroarch/.update_history" + if [ ! -f "$UPDATE_HISTORY" ]; then + touch "$UPDATE_HISTORY" + fi + + # Recovering the old version (although it will no longer be used for testing) + if [ -f "/home/astronaut/.astroarch/configs/.astroarch.version" ]; then + OLD_VER=$(cat /home/astronaut/.astroarch/configs/.astroarch.version) + else + OLD_VER="1.9.0" # Default value if the file is missing + fi + + # Update from Git repository + cd /home/$USER/.astroarch + git pull origin main + cd - > /dev/null 2>&1 + + # Reading the new version after updating + if [ -f "/home/astronaut/.astroarch/configs/.astroarch.version" ]; then + NEW_VER=$(cat /home/astronaut/.astroarch/configs/.astroarch.version) + else + echo "Error: Unable to read updated version of AstroArch" + exit 1 + fi + + # Converting versions into digital format + OLD_NUM=$(version_to_num "$OLD_VER") + NEW_NUM=$(version_to_num "$NEW_VER") + MIN_VERSION="1.9.0" + MIN_NUM=$(version_to_num "$MIN_VERSION") + + echo "Old version : $OLD_VER ($OLD_NUM)" + echo "New version : $NEW_VER ($NEW_NUM)" + echo "Minimum version required : $MIN_VERSION ($MIN_NUM)" + + # Update Scripts Walkthrough + for script in /home/astronaut/.astroarch/scripts/1.*.sh; do + SCRIPT_BASENAME=$(basename "$script") + # Recovering the version by removing only the .sh extension + SCRIPT_VER=$(basename "$script" .sh) + SCRIPT_NUM=$(version_to_num "$SCRIPT_VER") + + echo "Script Check : $SCRIPT_BASENAME (version $SCRIPT_VER, $SCRIPT_NUM, $MIN_NUM, $NEW_NUM)" + + # The script is only applied if: + # - if the script is not in history + # - The script version is strictly higher than the minimum version (1.9.0) + if ! grep -Fq "$SCRIPT_BASENAME" "$UPDATE_HISTORY"; then + if [[ $SCRIPT_NUM -gt $MIN_NUM ]]; then + echo "=== Applying the update $SCRIPT_BASENAME... ===" + zsh "$script" + echo "$SCRIPT_BASENAME" >> "$UPDATE_HISTORY" + if [[ $SCRIPT_NUM -gt $NEW_NUM ]]; then + echo $SCRIPT_VER > /home/astronaut/.astroarch/configs/.astroarch.version + echo "update version" + fi + else + echo "Already applied : $SCRIPT_BASENAME" + fi + else + echo "Ignored : $SCRIPT_BASENAME" + fi + done + + # Temporary fix for kde-portal duplicated conf + if [ -f /usr/share/xdg-desktop-portal/kde-portal.conf ]; then + sudo mv /usr/share/xdg-desktop-portal/kde-portal.conf /usr/share/xdg-desktop-portal/kde-portal.conf.old + fi; + + # Update the repo content + yes | LC_ALL=en_US.UTF-8 sudo pacman -Sy + + # Update always keyring first, than all of the other packages + yes | LC_ALL=en_US.UTF-8 sudo pacman -S archlinux-keyring --noconfirm + + # Now upgrade all system packages, but ask user to choose in case of conflicts/choices + yes | LC_ALL=en_US.UTF-8 sudo pacman -Syu +} + +if [ -f $EXTRA_ZSH ]; then + source $EXTRA_ZSH +fi diff --git a/build-astroarch/desktop/plasmasystemsettings.sh.desktop b/build-astroarch/desktop/plasmasystemsettings.sh.desktop new file mode 100644 index 0000000..ce12500 --- /dev/null +++ b/build-astroarch/desktop/plasmasystemsettings.sh.desktop @@ -0,0 +1,18 @@ +[Desktop Entry] +Comment= +Comment= +Exec=/home/astronaut/.astroarch/build-astroarch/scripts/plasmasystemsettings.sh +GenericName= +GenericName= +Icon=application-x-shellscript +MimeType= +Name=plasmasystemsettings.sh +Name=plasmasystemsettings.sh +Path= +StartupNotify=true +Terminal=false +TerminalOptions= +Type=Application +X-KDE-AutostartScript=true +X-KDE-SubstituteUID=false +X-KDE-Username= diff --git a/build-astroarch/desktop/update-astroarch.sh.desktop b/build-astroarch/desktop/update-astroarch.sh.desktop new file mode 100644 index 0000000..2fee822 --- /dev/null +++ b/build-astroarch/desktop/update-astroarch.sh.desktop @@ -0,0 +1,18 @@ +[Desktop Entry] +Comment= +Comment= +Exec=/home/astronaut/.astroarch/build-astroarch/scripts/update-astroarch.sh +GenericName= +GenericName= +Icon=application-x-shellscript +MimeType= +Name=update-astroarch.sh +Name=update-astroarch.sh +Path= +StartupNotify=true +Terminal=false +TerminalOptions= +Type=Application +X-KDE-AutostartScript=true +X-KDE-SubstituteUID=false +X-KDE-Username= diff --git a/build-astroarch/scripts/clear-install-astroarch.sh b/build-astroarch/scripts/clear-install-astroarch.sh new file mode 100755 index 0000000..f21cfbc --- /dev/null +++ b/build-astroarch/scripts/clear-install-astroarch.sh @@ -0,0 +1,16 @@ +#!/bin/bash + + +rm -R /kstars +rm /diskchroot +rm /astroarch_build_chroot.sh +rm /home/astronaut/.config/autostart/plasmasystemsettings.sh.desktop +rm /home/astronaut/.config/autostart/update-astroarch.sh.desktop +rm /home/astronaut/.zshrc +ln -s /home/astronaut/.astroarch/configs/.zshrc /home/astronaut/.zshrc +rm -R /home/astronaut/.astroarch/sc74.github.io +rm /home/astronaut/.config/autostart/AstroArch-onboarding.desktop + +systemctl disable clear-install-astroarch.timer +systemctl disable astroarch-onboarding.timer + diff --git a/build-astroarch/scripts/plasmasystemsettings.sh b/build-astroarch/scripts/plasmasystemsettings.sh new file mode 100755 index 0000000..d710ed4 --- /dev/null +++ b/build-astroarch/scripts/plasmasystemsettings.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +sleep 30 + +kwriteconfig6 --file "$HOME/.config/plasma-org.kde.plasma.desktop-appletsrc" --group 'Containments' --group '1' --key 'wallpaperplugin' "org.kde.slideshow" + +sleep 1 + +kwriteconfig6 --file "$HOME/.config/plasma-org.kde.plasma.desktop-appletsrc" --group 'Containments' --group '1' --group 'Wallpaper' --group 'org.kde.slideshow' --group 'General' --key 'SlidePaths' "/home/astronaut/Pictures/wallpapers/" + +sleep 1 + +lookandfeeltool -a org.kde.breezedark.desktop + +sleep 1 + +systemctl restart --user plasma-plasmashell diff --git a/build-astroarch/scripts/update-astroarch.sh b/build-astroarch/scripts/update-astroarch.sh new file mode 100755 index 0000000..8de091c --- /dev/null +++ b/build-astroarch/scripts/update-astroarch.sh @@ -0,0 +1,3 @@ +#!/usr/bin/bash + +konsole -e '/usr/bin/zsh -i -c update-astroarch' diff --git a/build-astroarch/systemd/clear-install-astroarch.service b/build-astroarch/systemd/clear-install-astroarch.service new file mode 100644 index 0000000..d25e591 --- /dev/null +++ b/build-astroarch/systemd/clear-install-astroarch.service @@ -0,0 +1,10 @@ +[Unit] +Description=Clear install astroarch + +[Service] +Type=oneshot +ExecStart=/bin/bash /home/astronaut/.astroarch/build-astroarch/scripts/clear-install-astroarch.sh +ExecStop=/bin/systemctl disable clear-install-astroarch.service + +[Install] +WantedBy=multi-user.target diff --git a/build-astroarch/systemd/clear-install-astroarch.timer b/build-astroarch/systemd/clear-install-astroarch.timer new file mode 100644 index 0000000..fd254b7 --- /dev/null +++ b/build-astroarch/systemd/clear-install-astroarch.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Timer clear install astroarch + +[Timer] +OnBootSec=2min +Unit=clear-install-astroarch.service + +[Install] +WantedBy=timers.target diff --git a/configs/.zshrc b/configs/.zshrc index 1e2664d..1ff3586 100644 --- a/configs/.zshrc +++ b/configs/.zshrc @@ -26,10 +26,10 @@ done; source $ZSH/oh-my-zsh.sh EDITOR=nano -INDI_ROLLBACK_VERSION=2.0.7-1 -INDI_LIBS_ROLLBACK_VERSION=2.0.7-1 -INDI_DRIVERS_ROLLBACK_VERSION=2.0.7-1 -KSTARS_ROLLBACK_VERSION=3.7.0-1 +INDI_ROLLBACK_VERSION=2.0.9-1 +INDI_LIBS_ROLLBACK_VERSION=2.0.9-1 +INDI_DRIVERS_ROLLBACK_VERSION=2.0.9-1 +KSTARS_ROLLBACK_VERSION=3.7.2-1 # Alias section alias update-astromonitor='wget -O - https://raw.githubusercontent.com/MattBlack85/astro_monitor/main/install.sh | sh' @@ -40,17 +40,20 @@ bash /home/astronaut/.astroarch/scripts/aa_motd.sh function use-astro-bleeding-edge() { + echo 'astro' | sudo -S echo '' sudo pacman -Sy && yes | LC_ALL=en_US.UTF-8 sudo pacman -S kstars-git libindi-git indi-3rdparty-drivers-git indi-3rdparty-libs-git } function use-astro-stable() { + echo 'astro' | sudo -S echo '' sudo pacman -Sy && yes | LC_ALL=en_US.UTF-8 sudo pacman -S kstars libindi indi-3rdparty-drivers indi-3rdparty-libs } function astro-rollback-indi() { + echo 'astro' | sudo -S echo '' setopt localoptions rmstarsilent mkdir -p ~/.rollback cd ~/.rollback @@ -64,6 +67,7 @@ function astro-rollback-indi() function astro-rollback-kstars() { + echo 'astro' | sudo -S echo '' setopt localoptions rmstarsilent mkdir -p ~/.rollback cd ~/.rollback @@ -75,18 +79,86 @@ function astro-rollback-kstars() function update-astroarch() { - # Store actual version - OLD_VER=$(cat /home/$USER/.astroarch.version) - - # Checkout latest changes from git + echo 'astro' | sudo -S echo '' + + # Function to convert a version (eg: 1.9 or 1.9.1) to a number (eg: 10900 or 10901) + version_to_num() { + local version=$1 + local major minor patch + IFS='.' read -r major minor patch <<< "$version" + minor=${minor:-0} + patch=${patch:-0} + printf "%d%02d%02d" "$major" "$minor" "$patch" + } + + # Defining files and variables + UPDATE_HISTORY="/home/astronaut/.astroarch/.update_history" + if [ ! -f "$UPDATE_HISTORY" ]; then + touch "$UPDATE_HISTORY" + fi + + # Recovering the old version (although it will no longer be used for testing) + if [ -f "/home/astronaut/.astroarch/configs/.astroarch.version" ]; then + OLD_VER=$(cat /home/astronaut/.astroarch/configs/.astroarch.version) + else + OLD_VER="1.9.0" # Default value if the file is missing + fi + + # Update from Git repository cd /home/$USER/.astroarch git pull origin main cd - > /dev/null 2>&1 - NEW_VER=$(cat /home/$USER/.astroarch/configs/.astroarch.version) - - if [ $OLD_VER != $NEW_VER ]; then - zsh /home/$USER/.astroarch/scripts/$NEW_VER.sh + # Reading the new version after updating + if [ -f "/home/astronaut/.astroarch/configs/.astroarch.version" ]; then + NEW_VER=$(cat /home/astronaut/.astroarch/configs/.astroarch.version) + else + echo "Error: Unable to read updated version of AstroArch" + exit 1 + fi + + # Converting versions into digital format + OLD_NUM=$(version_to_num "$OLD_VER") + NEW_NUM=$(version_to_num "$NEW_VER") + MIN_VERSION="1.9.0" + MIN_NUM=$(version_to_num "$MIN_VERSION") + + echo "Old version : $OLD_VER ($OLD_NUM)" + echo "New version : $NEW_VER ($NEW_NUM)" + echo "Minimum version required : $MIN_VERSION ($MIN_NUM)" + + # Update Scripts Walkthrough + for script in /home/astronaut/.astroarch/scripts/1.*.sh; do + SCRIPT_BASENAME=$(basename "$script") + # Recovering the version by removing only the .sh extension + SCRIPT_VER=$(basename "$script" .sh) + SCRIPT_NUM=$(version_to_num "$SCRIPT_VER") + + echo "Script Check : $SCRIPT_BASENAME (version $SCRIPT_VER, $SCRIPT_NUM, $MIN_NUM, $NEW_NUM)" + + # The script is only applied if: + # - if the script is not in history + # - The script version is strictly higher than the minimum version (1.9.0) + if ! grep -Fq "$SCRIPT_BASENAME" "$UPDATE_HISTORY"; then + if [[ $SCRIPT_NUM -gt $MIN_NUM ]]; then + echo "=== Applying the update $SCRIPT_BASENAME... ===" + zsh "$script" + echo "$SCRIPT_BASENAME" >> "$UPDATE_HISTORY" + if [[ $SCRIPT_NUM -gt $NEW_NUM ]]; then + echo $SCRIPT_VER > /home/astronaut/.astroarch/configs/.astroarch.version + echo "update version" + fi + else + echo "Already applied : $SCRIPT_BASENAME" + fi + else + echo "Ignored : $SCRIPT_BASENAME" + fi + done + + # Temporary fix for kde-portal duplicated conf + if [ -f /usr/share/xdg-desktop-portal/kde-portal.conf ]; then + sudo mv /usr/share/xdg-desktop-portal/kde-portal.conf /usr/share/xdg-desktop-portal/kde-portal.conf.old fi; # Update the repo content diff --git a/configs/99-v3d.conf b/configs/99-v3d.conf index 6e58d21..f23cd13 100644 --- a/configs/99-v3d.conf +++ b/configs/99-v3d.conf @@ -3,5 +3,4 @@ Section "OutputClass" MatchDriver "vc4" Driver "modesetting" Option "PrimaryGPU" "true" - Option "AccelMethod" "none" EndSection diff --git a/configs/cmdline.txt b/configs/cmdline.txt new file mode 100755 index 0000000..10532c0 --- /dev/null +++ b/configs/cmdline.txt @@ -0,0 +1 @@ +root=UUID=c2cea082-7f3e-43e2-b6a1-0c8540d350cc rw rootwait console=serial0,115200 console=tty1 fsck.repair=yes video=HDMI-A-1:1920x1080M@60D diff --git a/configs/config.txt b/configs/config.txt index f40f701..83b25e6 100644 --- a/configs/config.txt +++ b/configs/config.txt @@ -1,68 +1,58 @@ -# uncomment if you get no picture on HDMI for a default "safe" mode -#hdmi_safe=1 +# For more options and information see: +# http://rptl.io/configtxt -# uncomment this if your display has a black border of unused pixels visible -# and your display can output without overscan -disable_overscan=1 +initramfs initramfs-linux.img followkernel -# uncomment the following to adjust overscan. Use positive numbers if console -# goes off screen, and negative if there is too much border -#overscan_left=16 -#overscan_right=16 -#overscan_top=16 -#overscan_bottom=16 +# Uncomment some or all of these to enable the optional hardware interfaces +#dtparam=i2c_arm=on +#dtparam=i2s=on +#dtparam=spi=on -# uncomment to force a console size. By default it will be display's size minus -# overscan. -#framebuffer_width=1280 -#framebuffer_height=720 +# Additional overlays and parameters are documented +# /boot/firmware/overlays/README -# uncomment if hdmi display is not detected and composite is being output -hdmi_force_hotplug=1 -hdmi_group:0=2 -hdmi_mode:0=69 +# Automatically load overlays for detected cameras +camera_auto_detect=1 -# 4k Resolution -# Comment above and uncomment the follow to get 4k resolution -#hdmi_group=1 -#hdmi_mode=95 +# Automatically load overlays for detected DSI displays +display_auto_detect=1 -# uncomment to force a HDMI mode rather than DVI. This can make audio work in -# DMT (computer monitor) modes -#hdmi_drive=2 +# Enable DRM VC4 V3D driver +dtoverlay=vc4-kms-v3d,cma-512 +max_framebuffers=2 +framebuffer_depth=24 -# uncomment to increase signal to HDMI, if you have interference, blanking, or -# no display -#config_hdmi_boost=4 +# Uncomment if hdmi display is not detected and composite is being output +#hdmi_force_hotplug=1 -# uncomment for composite PAL -#sdtv_mode=2 +# Uncomment if you want to disable wifi or bluetooth respectively +#dtoverlay=disable-wifi +#dtoverlay=disable-bt -#uncomment to overclock the arm. 700 MHz is the default. -#arm_freq=800 +# Uncomment this to enable infrared communication. +#dtoverlay=gpio-ir,gpio_pin=17 +#dtoverlay=gpio-ir-tx,gpio_pin=18 -# Uncomment some or all of these to enable the optional hardware interfaces -dtparam=i2c_arm=on -#dtparam=i2s=on -dtparam=spi=on +# Run as fast as firmware / board allows +arm_boost=1 -# Additional overlays and parameters are documented /boot/overlays/README +[cm4] +# Enable host mode on the 2711 built-in XHCI USB controller. +# This line should be removed if the legacy DWC2 controller is required +# (e.g. for USB device mode) or if USB support is not required. +otg_mode=1 -# Enable audio (loads snd_bcm2835) +[all] +dtparam=i2c_arm=on dtparam=audio=on -# Hardware clock -dtoverlay=i2c-rtc,ds3231 - -[pi4] -# Enable DRM VC4 V3D driver on top of the dispmanx display stack -dtoverlay=vc4-fkms-v3d -max_framebuffers=2 -#hdmi_enable_4kp60=1 -hdmi_enable_4k=1 +disable_overscan=1 gpu_mem=256 -max_framebuffer_width=3840 -max_framebuffer_height=2160 +#disable_splash=1 +3dtparam=krnbt=on +#hdmi_drive=2 +dtoverlay=i2c-rtc +kernel=kernel8.img +hdmi_enable_4kp60=1 -[all] -#dtoverlay=vc4-fkms-v3d -enable_uart=1 +[pi5] +dtparam=rtc_bbat_vchg=3000000 diff --git a/configs/kwinrc b/configs/kwinrc index c01d0da..3750cd6 100644 --- a/configs/kwinrc +++ b/configs/kwinrc @@ -2,5 +2,4 @@ update_info=kwin.upd:replace-scalein-with-scale,kwin.upd:port-minimizeanimation-effect-to-js,kwin.upd:port-scale-effect-to-js,kwin.upd:port-dimscreen-effect-to-js,kwin.upd:auto-bordersize,kwin.upd:animation-speed,kwin.upd:desktop-grid-click-behavior,kwin.upd:no-swap-encourage,kwin.upd:make-translucency-effect-disabled-by-default,kwin.upd:remove-flip-switch-effect,kwin.upd:remove-cover-switch-effect,kwin.upd:remove-cubeslide-effect,kwin.upd:remove-xrender-backend,kwin.upd:enable-scale-effect-by-default [Compositing] -Enabled=false OpenGLIsUnsafe=false diff --git a/configs/xorg.conf b/configs/xorg.conf index 628489e..417be45 100644 --- a/configs/xorg.conf +++ b/configs/xorg.conf @@ -1,57 +1,61 @@ -Section "ServerLayout" - Identifier "Main Layout" - Screen 0 "Screen 1" - Screen 1 "Screen 0" +Section "Module" + Load "dri2" + Load "glamoregl" +EndSection + +Section "DRI" + Mode 0666 EndSection Section "Monitor" Identifier "Monitor0" HorizSync 28.0-80.0 VertRefresh 48.0-75.0 - Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync - Option "PreferredMode" "1920x1080_60" + Modeline "1920x1080" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync + Option "PreferredMode" "1920x1080" EndSection Section "Device" - Identifier "Dummycard0" - Driver "dummy" - VideoRam 192000 - Option "ConstantDPI" "true" - Option "NoDDC" "true" - Option "IgnoreEDID" "true" + Identifier "hdmi-a-1" + Driver "modesetting" + Option "AccelMethod" "glamor" EndSection Section "Screen" DefaultDepth 24 Identifier "Screen0" - Device "Dummycard0" + Device "hdmi-a-1" Monitor "Monitor0" SubSection "Display" Depth 24 - Modes "1920x1080_60.00" - EndSubSection + Modes "1920x1080" + EndSubSection EndSection - + Section "Monitor" Identifier "Monitor1" HorizSync 28.0-80.0 VertRefresh 48.0-75.0 - Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync - Option "PreferredMode" "1920x1080_60" + Modeline "1920x1080" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync + Option "PreferredMode" "1920x1080" EndSection Section "Device" - Identifier "hdmi-a-1" - Driver "modesetting" + Identifier "Dummycard0" + Driver "dummy" + VideoRam 192000 + Option "ConstantDPI" "true" + Option "NoDDC" "true" + Option "IgnoreEDID" "true" EndSection Section "Screen" DefaultDepth 24 Identifier "Screen1" - Device "hdmi-a-1" + Device "Dummycard0" Monitor "Monitor1" SubSection "Display" Depth 24 - Modes "1920x1080_60.00" - EndSubSection + Modes "1920x1080" + EndSubSection EndSection diff --git a/desktop/AstroArch-Tweak-Tool b/desktop/AstroArch-Tweak-Tool new file mode 100755 index 0000000..455280d --- /dev/null +++ b/desktop/AstroArch-Tweak-Tool @@ -0,0 +1,20 @@ +[Desktop Entry] +Categories=System +Comment[fr_CH]=Tools for AstroArch +Comment=Tools for AstroArch +Encoding=UTF-8 +Exec=/home/astronaut/.astroarch/scripts/astroarch-tweak-tool.zsh +GenericName[fr_CH]=AstroArch Tweak Tool +GenericName=AstroArch Tweak Tool +Icon=/home/astronaut/.astroarch/assets/icons/novnc-192x192.png +MimeType= +Name[fr_CH]=AstroArch Tweak Tool +Name=AstroArch Tweak Tool +Path= +StartupNotify=true +Terminal=true +TerminalOptions= +Type=Application +Version=1.0 +X-KDE-SubstituteUID=false +X-KDE-Username= diff --git a/plugins/bluetooth/bluetooth.plugin.zsh b/plugins/bluetooth/bluetooth.plugin.zsh index 7f2dd09..26aed51 100644 --- a/plugins/bluetooth/bluetooth.plugin.zsh +++ b/plugins/bluetooth/bluetooth.plugin.zsh @@ -1,10 +1,11 @@ function _check_bluez_installed() { - check=$(pacman -Q | grep 'bluez|bluez-utils|bluez-hid2hci|bluedevil') - if [[ $check -eq 0 ]]; then + check=$(pacman -Q | grep -E -c 'bluez|bluez-utils|bluez-hid2hci|bluedevil') + if [[ $check -lt 6 ]]; then echo "Bluetooth packages not installed, installing them now..." + echo 'astro' | sudo -S echo '' yes | LC_ALL=en_US.UTF-8 sudo pacman -S bluez bluez-utils bluez-hid2hci bluedevil - sudo sed -i 's/#DiscoverableTimeout=0/DiscoverableTimeout=0/g' /etc/bluetooth/main.conf + echo 'astro' | sudo sed -i 's/#DiscoverableTimeout=0/DiscoverableTimeout=0/g' /etc/bluetooth/main.conf sudo sed -i 's/#AlwaysPairable=true/AlwaysPairable=true/g' /etc/bluetooth/main.conf sudo sed -i 's/#PairableTimeout=0/PairableTimeout=0/g' /etc/bluetooth/main.conf sudo sed -i 's/#AutoEnable=true/AutoEnable=true/g' /etc/bluetooth/main.conf @@ -15,17 +16,21 @@ function _check_bluez_installed() function bluetooth_on() { _check_bluez_installed + echo 'astro' | sudo -S echo '' sudo systemctl enable bluetooth.service --now - echo "Bluetooth turned ON and enabled to autostart at every boot" + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'BLUETOOTH ON' 'Bluetooth turned ON and enabled to autostart at every boot' } function bluetooth_off() { + echo 'astro' | sudo -S echo '' sudo systemctl disable bluetooth.service --now - echo "Bluetooth disabled, remember to re-enable it if you want it to start automatically at boot" + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'BLUETOOTH OFF' 'Bluetooth disabled, remember to re-enable it if you want it to start automatically at boot' } function bluetooth_remove() { + echo 'astro' | sudo -S echo '' yes | LC_ALL=en_US.UTF-8 sudo pacman -Rcs bluez bluez-utils bluez-hid2hci bluedevil + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'BLUETOOTH' "Bluetooth packets removed" } diff --git a/plugins/ftp/ftp.plugin.zsh b/plugins/ftp/ftp.plugin.zsh index bc0c143..22a5b30 100644 --- a/plugins/ftp/ftp.plugin.zsh +++ b/plugins/ftp/ftp.plugin.zsh @@ -4,6 +4,7 @@ function _check_vsftpd_installed() echo "FTP is already installed" else echo "FTP packages not installed, installing them now..." + echo 'astro' | sudo -S echo '' yes | LC_ALL=en_US.UTF-8 sudo pacman -S vsftpd sudo sed -i 's/#write_enable=YES/write_enable=YES/g' /etc/vsftpd.conf sudo sed -i 's/#local_enable=YES/local_enable=YES/g' /etc/vsftpd.conf @@ -28,20 +29,23 @@ function _check_vsftpd_installed() function ftp_on() { _check_vsftpd_installed + echo 'astro' | sudo -S echo '' sudo systemctl enable vsftpd.service --now - echo "FTP server turned ON and enabled to autostart at every boot" + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'FTP ON' 'FTP server turned ON and enabled to autostart at every boot' } function ftp_off() { + echo 'astro' | sudo -S echo '' sudo systemctl disable vsftpd.service --now - echo "FTP server disabled, remember to re-enable it if you want it to start automatically at boot" + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'FTP OFF' 'FTP server disabled, remember to re-enable it if you want it to start automatically at boot' } function ftp_remove() { + echo 'astro' | sudo -S echo '' sudo systemctl disable vsftpd.service --now yes | LC_ALL=en_US.UTF-8 sudo pacman -Rcs vsftpd sudo rm /etc/vsftpd.chroot_list - echo "FTP server remove" + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'FTP' "FTP server remove" } diff --git a/plugins/gps/gps.plugin.zsh b/plugins/gps/gps.plugin.zsh index d010ee9..ff67426 100644 --- a/plugins/gps/gps.plugin.zsh +++ b/plugins/gps/gps.plugin.zsh @@ -12,6 +12,7 @@ function _check_gpsd_installed() function gps_ublox_on() { _check_gpsd_installed + echo 'astro' | sudo -S echo '' sudo systemctl enable gpsd.service --now sudo sh -c "echo 'refclock SHM 0 offset 0.5 delay 0.2 refid NMEA' >> /etc/chrony.conf" sudo sh -c "echo 'driftfile /var/lib/chrony/drift' >> /etc/chrony.conf" @@ -22,12 +23,13 @@ function gps_ublox_on() sudo sh -c 'echo "GPSD_OPTIONS=\""-n\" >> /etc/default/gpsd' sudo sh -c 'echo "DEVICES=\""/dev/ttyACM0\" >> /etc/default/gpsd' sudo sh -c 'echo "USBAUTO=\""false\" >> /etc/default/gpsd' - echo "GPS server turned ON and enabled to autostart at every boot" + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'GPS USB UBLOX ON' 'GPS server turned ON and enabled to autostart at every boot' } function gps_on() { _check_gpsd_installed + echo 'astro' | sudo -S echo '' sudo sh -c "echo 'refclock SHM 0 offset 0.5 delay 0.2 refid NMEA' >> /etc/chrony.conf" sudo sh -c "echo 'driftfile /var/lib/chrony/drift' >> /etc/chrony.conf" sudo rm /etc/default/gpsd @@ -38,11 +40,19 @@ function gps_on() sudo sh -c 'echo "DEVICES=\""/dev/gps0\" >> /etc/default/gpsd' sudo sh -c 'echo "USBAUTO=\""true\" >> /etc/default/gpsd' sudo systemctl enable gpsd.service --now - echo "GPS server turned ON and enabled to autostart at every boot" + if [[ "$gps" == "GPS UART ON" ]] ; then + echo $gps + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 $gps 'GPS server turned ON and enabled to autostart at every boot' + else + echo "standart" + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'GPS ON' 'GPS server turned ON and enabled to autostart at every boot' + fi } function gps_uart_on() { + echo 'astro' | sudo -S echo '' + gps="GPS UART ON" sudo sh -c 'echo "dtparam=spi=on" >> /boot/config.txt' sudo sh -c 'echo "enable_uart=1" >> /boot/config.txt' gps_on @@ -50,8 +60,8 @@ function gps_uart_on() function gps_off() { - sudo systemctl disable gpsd.service --now - echo "GPS server disabled, remember to re-enable it if you want it to start automatically at boot" + echo 'astro' | sudo -S systemctl disable gpsd.service --now + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'GPS OFF ' 'GPS server disabled, remember to re-enable it if you want it to start automatically at boot' sudo sh -c 'sed -i "s~dtparam=spi=on~~g" /boot/config.txt' sudo sh -c 'sed -i "s~enable_uart=1~~g" /boot/config.txt' } diff --git a/scripts-sc74/1.10-sc74.sh b/scripts-sc74/1.10-sc74.sh new file mode 100755 index 0000000..f7811db --- /dev/null +++ b/scripts-sc74/1.10-sc74.sh @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +# DisableDownloadTimeout in pacman.conf +if [ $(grep -c DisableDownloadTimeout /etc/pacman.conf) -eq 0 ]; then + sudo sed -i '/ParallelDownloads=5/aDisableDownloadTimeout' /etc/pacman.conf +fi + +# Checkout latest changes from git + cd /home/$USER/.astroarch + git pull origin main + cd - > /dev/null 2>&1 + +# clone git repo sc74 +mkdir -p /home/astronaut/.astroarch/sc74 +cd /home/astronaut/.astroarch/sc74 +git clone -b 1.10 --single-branch https://github.com/sc74/astroarch.git /home/astronaut/.astroarch/sc74 + +# Update .zshrc +cp -rf /home/astronaut/.astroarch/sc74/configs/.zshrc /home/astronaut/.astroarch/configs + +echo 'astro' | sudo -S echo '' + + # Function to convert a version (eg: 1.9 or 1.9.1) to a number (eg: 10900 or 10901) + version_to_num() { + local version=$1 + local major minor patch + IFS='.' read -r major minor patch <<< "$version" + minor=${minor:-0} + patch=${patch:-0} + printf "%d%02d%02d" "$major" "$minor" "$patch" + } + + # Defining files and variables + UPDATE_HISTORY="/home/astronaut/.astroarch/.update_history" + if [ ! -f "$UPDATE_HISTORY" ]; then + touch "$UPDATE_HISTORY" + fi + + # Recovering the old version (although it will no longer be used for testing) + if [ -f "/home/astronaut/.astroarch/configs/.astroarch.version" ]; then + OLD_VER=$(cat /home/astronaut/.astroarch/configs/.astroarch.version) + else + OLD_VER="1.9.0" # Default value if the file is missing + fi + + # Update from Git repository + cd /home/$USER/.astroarch + git pull origin main + cd - > /dev/null 2>&1 + + # Reading the new version after updating + if [ -f "/home/astronaut/.astroarch/configs/.astroarch.version" ]; then + NEW_VER=$(cat /home/astronaut/.astroarch/configs/.astroarch.version) + else + echo "Error: Unable to read updated version of AstroArch" + exit 1 + fi + + # Converting versions into digital format + OLD_NUM=$(version_to_num "$OLD_VER") + NEW_NUM=$(version_to_num "$NEW_VER") + MIN_VERSION="1.9.0" + MIN_NUM=$(version_to_num "$MIN_VERSION") + + echo "Old version : $OLD_VER ($OLD_NUM)" + echo "New version : $NEW_VER ($NEW_NUM)" + echo "Minimum version required : $MIN_VERSION ($MIN_NUM)" + + # Update Scripts Walkthrough + for script in /home/astronaut/.astroarch/scripts/1.*.sh; do + SCRIPT_BASENAME=$(basename "$script") + # Recovering the version by removing only the .sh extension + SCRIPT_VER=$(basename "$script" .sh) + SCRIPT_NUM=$(version_to_num "$SCRIPT_VER") + + echo "Script Check : $SCRIPT_BASENAME (version $SCRIPT_VER, $SCRIPT_NUM, $MIN_NUM, $NEW_NUM)" + + # The script is only applied if: + # - if the script is not in history + # - The script version is strictly higher than the minimum version (1.9.0) + if ! grep -Fq "$SCRIPT_BASENAME" "$UPDATE_HISTORY"; then + if [[ $SCRIPT_NUM -gt $MIN_NUM ]]; then + echo "=== Applying the update $SCRIPT_BASENAME... ===" + zsh "$script" + echo "$SCRIPT_BASENAME" >> "$UPDATE_HISTORY" + if [[ $SCRIPT_NUM -gt $NEW_NUM ]]; then + echo $SCRIPT_VER > /home/astronaut/.astroarch/configs/.astroarch.version + echo "update version" + fi + else + echo "Already applied : $SCRIPT_BASENAME" + fi + else + echo "Ignored : $SCRIPT_BASENAME" + fi + done + + # Temporary fix for kde-portal duplicated conf + if [ -f /usr/share/xdg-desktop-portal/kde-portal.conf ]; then + sudo mv /usr/share/xdg-desktop-portal/kde-portal.conf /usr/share/xdg-desktop-portal/kde-portal.conf.old + fi; + + # Update the repo content + yes | LC_ALL=en_US.UTF-8 sudo pacman -Sy + + # Update always keyring first, than all of the other packages + yes | LC_ALL=en_US.UTF-8 sudo pacman -S archlinux-keyring --noconfirm + + # Now upgrade all system packages, but ask user to choose in case of conflicts/choices + yes | LC_ALL=en_US.UTF-8 sudo pacman -Syu + +# Update files for the driver vc4-kms-v3d #106 +sudo cp /home/astronaut/.astroarch/sc74/configs/cmdline.txt /boot +sudo cp /home/astronaut/.astroarch/sc74/configs/config.txt /boot +sudo cp /home/astronaut/.astroarch/sc74/configs/xorg.conf /etc/X11/ +sudo cp /home/astronaut/.astroarch/sc74/configs/99-v3d.conf /etc/X11/xorg.conf.d +sudo cp /home/astronaut/.astroarch/sc74/configs/kwinrc /home/astronaut/.config + +# Delete repo sc74 +sudo rm -Rf /home/astronaut/.astroarch/sc74 + +# Add some packages +yes | LC_ALL=en_US.UTF-8 sudo pacman -S spectacle nano + +# Printer +yes | LC_ALL=en_US.UTF-8 sudo pacman -S cups cups-pdf +sudo systemctl enable cups.service + +# Set local Hostname resolution +yes | LC_ALL=en_US.UTF-8 sudo pacman -S nss-mdns +sudo sed -i 's|hosts: mymachines |&mdns_minimal [NOTFOUND=return] |g' /etc/nsswitch.conf + +######################################################################################## +# This section allows you to install some packages from a GitHub repo. If the packages are on your site with a repo, install the packages in the packages section. Then copy the services to /etc/systemd/system and enable them + +# Repository sc74.github.io +cd /home/astronaut/.astroarch +git clone https://github.com/sc74/sc74.github.io.git +sudo sed -i 's|\[astromatto\]|\[sc74\]\nSigLevel = Optional TrustAll\nServer = file:///home/astronaut/.astroarch/sc74.github.io/aarch64\n\n\[astromatto\]|' /etc/pacman.conf +yes | LC_ALL=en_US.UTF-8 sudo pacman -Syu +# Install package astroarch-onboarding +yes | LC_ALL=en_US.UTF-8 sudo pacman -S astroarch-onboarding +sudo cp /home/astronaut/.astroarch/build-astroarch/systemd/astroarch-onboarding.service /etc/systemd/system/ +sudo systemctl enable astroarch-onboarding.service + +# Install some packages +yes | LC_ALL=en_US.UTF-8 sudo pacman -S rustdesk-bin indi-pylibcamera libcamera-rpi python-libcamera-rpi libcamera-ipa-rpi libcamera-docs-rpi libcamera-tools-rpi gst-plugin-libcamera-rpi python-pycamera2 rpicam-apps + +# Delete repo sc74 +sudo sed -i -e '/\[sc74\]/,+2d' /etc/pacman.conf + + +# delete repo sc74.github.io +sudo rm -Rf /home/astronaut/.astroarch/sc74.github.io + +######################################################################################## + +echo "Reboot system now" +read -p "Press enter to continue" +reboot diff --git a/scripts/1.9.3.sh b/scripts/1.9.3.sh new file mode 100644 index 0000000..891b6bf --- /dev/null +++ b/scripts/1.9.3.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# First run 1.9.2.sh to be sure that old changes will be applied +bash /home/astronaut/.astroarch/scripts/1.9.2.sh + +check_asn=$(pacman -Q | grep -c astroarch-status-notifications) + +if [ $check_asn -eq 0 ]; then + echo "====================" + echo "AA status notifications not found... Installing" + sudo pacman -Sy astroarch-status-notifications --noconfirm + echo "AA status notifications installed" + echo "====================" +fi diff --git a/scripts/astroarch-tweak-tool.zsh b/scripts/astroarch-tweak-tool.zsh new file mode 100755 index 0000000..abd2336 --- /dev/null +++ b/scripts/astroarch-tweak-tool.zsh @@ -0,0 +1,102 @@ +#!/bin/zsh +result=$(kdialog --menu "Select action" 1 "Update-astroarch" 2 "Set GPS" 3 "Set Bluetooth" 4 "Set FTP" 5 "Rollback Kstars/Indi" 6 "Install Kstars/Indi stable/bleeding-edge" --title "AstroArch Tweak Tool") +source ~/.zshrc +case $result in + 1) + update-astroarch + if [ $? -eq 0 ] ; then + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Update AstroArch' 'Update completed' + else + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Update AstroArch' 'Update returns an error' + fi + ;; + 2) + gps=$(kdialog --menu "Select action" 1 "Activate default GPS" 2 "Activate Usb Ublox GPS" 3 "Activate UART GPS" 4 "Stop GPS" --title "AstroArch GPS") + case $gps in + 1) + gps_on + ;; + 2) + gps_ublox_on + ;; + 3) + gps_uart_on + ;; + 4) + gps_off + ;; + esac + ;; + 3) + bluetooth=$(kdialog --combobox "Select action for Bluetooth" "ON" "OFF" --title "AstroArch bluetooth") + case $bluetooth in + ON) + bluetooth_on + ;; + OFF) + bluetooth_off + ;; + esac + ;; + 4) + ftp=$(kdialog --combobox "Select action for FTP" "ON" "OFF" --title "AstroArch FTP") + case $ftp in + ON) + ftp_on + ;; + OFF) + ftp_off + ;; + esac + ;; + 5) + rollback=$(kdialog --combobox "Select action for rollback" "Full-Kstars-Indi" "Indi" "Kstars" --title "AstroArch Rollback") + case $rollback in + Full-Kstars-Indi) + astro-rollback-full + if [ $? -eq 0 ] ; then + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Rollback full' 'Completed' + else + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Rollback full' 'Returns an error' + fi + ;; + Indi) + astro-rallback-indi + if [ $? -eq 0 ] ; then + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Rollback indi' 'Completed' + else + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Rollback indi' 'Returns an error' + fi + ;; + Kstars) + astro-rollback-kstars + if [ $? -eq 0 ] ; then + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Rollback kstars' 'Completed' + else + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Rollback kstars' 'Returns an error' + fi + ;; + esac + ;; + 6) + install_kstars=$(kdialog --combobox " Select the Kstars installation version" "Bleeding-edge" "Stable" --title "AstroArch Install Kstars") + case $install_kstars in + Bleeding-edg) + use-astro-bleeding-edge + if [ $? -eq 0 ] ; then + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Installation Kstars bleeding-edge' 'Completed' + else + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Installation Kstars bleeding-edge' 'Returns an error' + fi + ;; + Stable) + use-astro-stable + if [ $? -eq 0 ] ; then + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Installation Kstars' 'Completed' + else + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Installation Kstars' 'Returns an error' + fi + ;; + esac + ;; +esac diff --git a/systemd/x0vncserver.service b/systemd/x0vncserver.service index 4b0c199..d5d368b 100644 --- a/systemd/x0vncserver.service +++ b/systemd/x0vncserver.service @@ -1,6 +1,7 @@ [Unit] Description=Remote desktop service (VNC) for :0 display Requires=display-manager.service +#After=network-online.target After=display-manager.service [Service]