From 77d05a502182707cb2d38396debfbb4a772a50ef Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Mon, 23 May 2022 10:00:01 +0200 Subject: [PATCH] add GNOME desktop --- etc/archboot/defaults | 3 ++ usr/bin/archboot-update-installer.sh | 9 +++- usr/lib/archboot/kde.sh | 61 +++++----------------------- 3 files changed, 22 insertions(+), 51 deletions(-) diff --git a/etc/archboot/defaults b/etc/archboot/defaults index 2dedb02c8..5b6db25f5 100644 --- a/etc/archboot/defaults +++ b/etc/archboot/defaults @@ -20,6 +20,9 @@ _XFCE_PACKAGES="xfce4 breeze-icons gvfs gvfs-smb thunar-archive-plugin file-roll ### KDE defaults # KDE/Plasma packages _KDE_PACKAGES="plasma-desktop konsole kscreen kate dolphin powerdevil ark gwenview" +### GNOME defaults +# GNOME packages +_GNOME_PACKAGES="gnome-shell gnome-terminal gnome-control-center nautilus gvfs-smb gthumb" ### zram setup _ZRAM_ALGORITHM="zstd" # default size for all operations diff --git a/usr/bin/archboot-update-installer.sh b/usr/bin/archboot-update-installer.sh index 6503a0d6d..839fc36d1 100755 --- a/usr/bin/archboot-update-installer.sh +++ b/usr/bin/archboot-update-installer.sh @@ -16,6 +16,7 @@ while [ $# -gt 0 ]; do -latest-install|--latest-install) _L_INSTALL_COMPLETE="1";; -latest-image|--latest-image) _G_RELEASE="1" ;; -launch-xfce|--launch-xfce) _L_XFCE="1" ;; + -launch-gnome|--launch-gnome) _L_GNOME="1";; -launch-kde|--launch-kde) _L_KDE="1" ;; -custom-xorg|--custom-xorg) _CUSTOM_X="1" ;; -h|--h|?) usage ;; @@ -103,7 +104,7 @@ if [[ "${_CUSTOM_X}" == "1" ]]; then fi # KDE/PLASMA or XFCE launch -if [[ "${_L_XFCE}" == "1" || "${_L_KDE}" == "1" ]]; then +if [[ "${_L_XFCE}" == "1" || "${_L_KDE}" == "1" || "${_L_GNOME}" == "1"]]; then if ! [[ -d /usr.zram ]]; then echo -e "\033[1mStep 1/5:\033[0m Move /usr to /usr.zram ..." _zram_usr "${_ZRAM_SIZE}" @@ -116,6 +117,9 @@ if [[ "${_L_XFCE}" == "1" || "${_L_KDE}" == "1" ]]; then if [[ "${_L_XFCE}" == "1" ]]; then _install_xfce fi + if [[ "${_L_GNOME}" == "1" ]]; then + _install_gnome + fi if [[ "${_L_KDE}" == "1" ]]; then _install_kde fi @@ -126,6 +130,9 @@ if [[ "${_L_XFCE}" == "1" || "${_L_KDE}" == "1" ]]; then if [[ "${_L_XFCE}" == "1" ]]; then _start_xfce fi + if [[ "${_L_GNOME}" == "1" ]]; then + _start_gnome + fi if [[ "${_L_KDE}" == "1" ]]; then _start_kde fi diff --git a/usr/lib/archboot/kde.sh b/usr/lib/archboot/kde.sh index 403b5d6d8..259d3f49b 100644 --- a/usr/lib/archboot/kde.sh +++ b/usr/lib/archboot/kde.sh @@ -1,17 +1,17 @@ #!/bin/bash # created by Tobias Powalowski -_install_kde() { +_install_gnome() { if ! [[ -e /usr/bin/startplasma-x11 ]]; then - echo -e "\033[1mStep 3/5:\033[0m Installing KDE desktop now ..." + echo -e "\033[1mStep 3/5:\033[0m Installing GNOME desktop now ..." echo " This will need some time ..." - _prepare_x "${_KDE_PACKAGES}" >/dev/tty7 2>&1 + _prepare_x "${_GNOME_PACKAGES}" >/dev/tty7 2>&1 echo -e "\033[1mStep 4/5:\033[0m Configuring KDE desktop ..." - _configure_kde >/dev/tty7 2>&1 + _configure_gnome >/dev/tty7 2>&1 fi } -_start_kde() { +_start_gnome() { echo -e "Launching KDE now, logging is done on \033[1m/dev/tty8\033[0m ..." echo "export DESKTOP_SESSION=plasma" > /root/.xinitrc echo "startplasma-x11" >> /root/.xinitrc @@ -19,59 +19,20 @@ _start_kde() { echo -e "To relaunch KDE desktop use: \033[92mstartx\033[0m" } -_configure_kde() { +_configure_gnome() { echo "Configuring KDE ..." - sed -i -e 's#applications:.*#applications:systemsettings.desktop,applications:org.kde.konsole.desktop,preferred://filemanager,preferred://browser,applications:gparted.desktop,applications:archboot.desktop#g' /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml + #sed -i -e 's#applications:.*#applications:systemsettings.desktop,applications:org.kde.konsole.desktop,preferred://filemanager,preferred://browser,applications:gparted.desktop,applications:archboot.desktop#g' /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml echo "Replacing wallpaper ..." - for i in /usr/share/wallpapers/Next/contents/images/*; do - cp /usr/share/archboot/grub/archboot-background.png $i - done - echo "Replacing menu structure ..." - cat << EOF >/etc/xdg/menus/applications.menu - - - - Applications - kde-main.directory - - - - - - - - More - - - - - Applications - - - Settingsmenu - kf5-settingsmenu.directory - - Settings - - - - - archboot.desktop - chromium.desktop - org.kde.dolphin.desktop - gparted.desktop - org.kde.konsole.desktop - - -EOF + #for i in /usr/share/wallpapers/Next/contents/images/*; do + # cp /usr/share/archboot/grub/archboot-background.png $i + #done echo "Autostarting setup ..." cat << EOF > /etc/xdg/autostart/archboot.desktop [Desktop Entry] Type=Application Name=Archboot Setup GenericName=Installer -Exec=konsole -p colors=Linux -e /usr/bin/setup +Exec=gnome-terminal /usr/bin/setup Icon=system-software-install EOF }