From 67ae55d0f1705265e405401cc5973f70246c695b Mon Sep 17 00:00:00 2001 From: Hal Emmerich Date: Tue, 26 May 2020 18:54:00 -0500 Subject: [PATCH] Modify gnome install to be less opinionated -removed branch readme -don't remove need for passwords -move gnome specific packages to their own line -don't carry script for fixing gnome trackpad, we should find a way to do so at install time --- branch-readme.md | 66 ------------------- .../Niceties/adjust-gnome-touchpad.sh | 25 ------- .../Niceties/declutter-gnome-shell.sh | 40 ----------- .../Niceties/disable-passwords.pkla | 4 -- .../Niceties/sudoers.nopasswd | 30 --------- .../Niceties/sudoers.original | 27 -------- .../Niceties/type-less-passwords.sh | 30 --------- scripts/InstallScripts/InstallPackages.sh | 18 ++--- scripts/buildFilesystem.sh | 10 +-- 9 files changed, 15 insertions(+), 235 deletions(-) delete mode 100644 branch-readme.md delete mode 100644 resources/InstallResources/Niceties/adjust-gnome-touchpad.sh delete mode 100644 resources/InstallResources/Niceties/declutter-gnome-shell.sh delete mode 100644 resources/InstallResources/Niceties/disable-passwords.pkla delete mode 100644 resources/InstallResources/Niceties/sudoers.nopasswd delete mode 100644 resources/InstallResources/Niceties/sudoers.original delete mode 100644 resources/InstallResources/Niceties/type-less-passwords.sh diff --git a/branch-readme.md b/branch-readme.md deleted file mode 100644 index dd1c05c..0000000 --- a/branch-readme.md +++ /dev/null @@ -1,66 +0,0 @@ -Branch Readme - -Revived Gnome 3 Support - - -Now with disclosure! - -Phase One: Post necessary commits to branch. Complete! -Phase Two: Edit and post readme. Complete! -Phase Three: Post a build built from publicly accessible repos. [Completed!](https://github.com/gdallasdye/PrawnOS/releases) - -Summary: - -This PR includes the minimal changes to @SolidHal’s current InstallPackages.sh and BuildFilesystem.sh scripts. Also included are optional niceties and select extensions. Now rebased with @austin987’s contributions! - -The author has spent many months testing the Wayland Gnome desktop environment. Recent posts regarding mesa packages in the Panfrost Support issue have been incorporated into the build and install scripts, and tested for the previous two weeks . - -FUNFACT: This readme was written about two weeks ago. Even the above paragraph? Especially the above paragraph. Even now, more than ever, the above paragraph. Have fun with that math. The initial proof of concept was going to be posted when things broke. - -Firstly, kernel building broke. This may have something to do with cmake breaking when building either the ath9k toolset or driver. After getting setup on a workstation’s virtual machine (which wouldn’t need panfrost) cmake was fixed. Cmake may have broken because my native dev environment was using unstable mesa and panfrost. This may affect developers building on their laptops. The author does not expect it influence end users much or at all. Testing and public commenting are welcome and expected. - -Another issue popped up then. - -Secondly, offline install needed to be fixed. This is caused by libc6-dev causing a conflict with libgcc8-dev. Log files will be posted later in a gist post, and then a formal issue with fix and before and after log files will be posted later when the author is well rested. The immediate fix to this issue it to place the line “chroot $outmnt apt-get purge -y --auto-remove libc6-dev” before the “chroot $outmnt apt-get install -y -t testing -d xsecurelock” line in buildFilesystem.sh. Then the other packages can download successfully whilst ‘time sudo make image’ing. - -The author took a while to realize that this also affected upstream and not just his private branches. Feel free to test, validate, and confirm, against yours, upstream’s, or the author’s branches. This issue should be reproducible independent of whose branch you build against post mosys integration. - -Thirdly, the author has added his name to the copyright headers. This is not meant to take credit for @SolidHal’s et al’s hard work, but to take accountability and blame for any failures that may arise. This branch is the author’s work on top of upstream’s. These changes represent low hanging fruit that anyone else could have done. For that reason, the author does feels that copyright attribution is NOT REQUIRED for either personal or public repos. Translation: cherrypick, quote, and accredit at your leisure. - -These changes have been posted to a personal repo, in a branch called gnome-contrib. Source has been posted, followed by this readme, and finally prebuilt image containing these changes. - -Specific Changes: - -BuildFilesystem.sh: -For now or indefinitely, in, we download both stable and unstable mesa packages so we have the dependencies to install stable Gnome 3 in an offline install. This is adapted from @rk-zero and @firstbass posts in the Panfrost Support issue. The libgdm1 package is omitted to prevent conflicts with libc6 and gcc8. - -InstallPackages.sh: -Here we add the gnome section. We install the unstable mesa packages before the users desktop environment. For now, we also remove the libgdm1 package from the mesa install section. This was to avoid conflicts with gdm3 3.34 dependencies being in place then installing Gnome from stable. - -Care was taken to move the lightdm, gdm3, mousepad, and vlc packages to their respective desktop environments. - -Includes a section that removes xterm vim and emacs (personal preference). And an ‘and if gnome’ section is placed, but dummied out for now, after the user creation section. It was intended to run the nicety scripts adjust-gnome-touchpad.sh and declutter-gnome-shell.sh. For now, it will remind the user that they have installed Gnome and advise them to review and run the scripts as they see fit. - -Added Extensions: - -Includes curated gnome extensions: Remove Drop Down Arrows, Hide Frequent View, Appfolders Management Extension, and Window Corner Preview. These reflect the author’s preferences and are provided as a courtesy. - -Appfolders Management Extension adds a right click menu in the Gnome app grid. - -Window Corner Preview is highly performant, a great extension to use while watching a live stream and reading my favorite message board at the same time. Also counts as many hours of stress testing. - -Added Niceties: - -Includes a folder called Niceties. These are optional, quality of life scripts that mostly affect the Gnome Desktop. Most of these scripts are intended to be run after logging into the Gnome Desktop for the first time. This is because, presumably, the users gsettings database hasn’t been initialized. Includes adjust-gnome-touchpad.sh, declutter-gnome-shell.sh and type-less-passwords.sh. The latter may be appreciated by our friends on Veyron Minnie. - -Adjust Gnome Touchpad changes two gsettings to more sane defaults. Natural scrolling is flipped to normal (for the author) and Tap to Click is enabled. - -Type Less Passwords changes the sudoers file and adds a policykit file so that administrative commands may be run by anyone with physical access, without a password. This does not affect entering passwords when booting, and logging in locally or remotely. May also be paired with auto-login functionality. - -Declutter Gnome Shell has functions that removes the X-GNOME appfolders, make new appfolders, name them, and populate them. This prettifies the app grid by workaround-ing issues that can also been seen in a Debian Live Session on a popular legacy architecture. - -Thanks: - -From PrawnOS, @SolidHal and every else who has contributed. - -From issue #99 (panfrost support): @alyssarosenzweig, @rk-zero and @firstbass. Also big thanks go out to @alyssarosenzweig and her employer, for their financial interests in panfrost and wayland, two things I like a lot. Also Gnome, and no v-sync tearing is also nice. diff --git a/resources/InstallResources/Niceties/adjust-gnome-touchpad.sh b/resources/InstallResources/Niceties/adjust-gnome-touchpad.sh deleted file mode 100644 index c86d662..0000000 --- a/resources/InstallResources/Niceties/adjust-gnome-touchpad.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -e - -#Adjust Gnome Touchpad settings - - -# This file is part of PrawnOS (http://www.prawnos.com) -# Copyright (c) 2020 G. Dallas Dye - -# PrawnOS is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 -# as published by the Free Software Foundation. - -# PrawnOS is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with PrawnOS. If not, see . - - -#Natural scrolling is un-natural -gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false -#Tap to click is natural -gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true diff --git a/resources/InstallResources/Niceties/declutter-gnome-shell.sh b/resources/InstallResources/Niceties/declutter-gnome-shell.sh deleted file mode 100644 index 5c31efe..0000000 --- a/resources/InstallResources/Niceties/declutter-gnome-shell.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -e - -#Declutter the Gnome Shell - - -# This file is part of PrawnOS (http://www.prawnos.com) -# Copyright (c) 2020 G. Dallas Dye - -# PrawnOS is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 -# as published by the Free Software Foundation. - -# PrawnOS is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with PrawnOS. If not, see . - -#Unset and Reset folders. This removes the suse.yast folder too. -gsettings set org.gnome.desktop.app-folders folder-children "[]" -gsettings set org.gnome.desktop.app-folders folder-children "['Utilities', 'Sundry', 'Office']" - -#Set the name of the folders. Rename or translate as desired. -#Even if package gnome-menus is installed, only X-GNOME-Utilities gets translated to it's friendly name. -gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Utilities/ name 'Utilities' -gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Sundry/ name 'Sundry' -gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Office/ name 'Office' - -#Prepopulate the appfolders. The names of apt installed packaged can be found by running "ls /usr/share/applications" -#Utilities contains rarely used programs and programs that are typically started by double clicking a file. -#Sundry contains administrative programs and preferences. Basically, set and forget, one and done programs. -#Office contains shortcuts to both the Debian and Flathub repo versions of Libreoffice. -#This is to prevent icon spam later when installed. -gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Utilities/ apps "['org.gnome.baobab.desktop', 'deja-dup-preferences.desktop', 'eog.desktop', 'evince.desktop', 'org.gnome.FileRoller.desktop', 'gnome-calculator.desktop', 'gnome-dictionary.desktop', 'org.gnome.Characters.desktop', 'org.gnome.DiskUtility.desktop', 'org.gnome.font-viewer.desktop', 'org.gnome.Terminal.desktop', 'org.gnome.Screenshot.desktop', 'gnome-system-log.desktop', 'gnome-system-monitor.desktop', 'gnome-tweak-tool.desktop', 'gucharmap.desktop', 'seahorse.desktop', 'vinagre.desktop', 'yelp.desktop', 'org.gnome.Evince.desktop']" -gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Sundry/ apps "['alacarte.desktop', 'authconfig.desktop', 'ca.desrt.dconf-editor.desktop', 'fedora-release-notes.desktop', 'firewall-config.desktop', 'flash-player-properties.desktop', 'gconf-editor.desktop', 'gnome-abrt.desktop', 'gnome-power-statistics.desktop', 'ibus-setup-anthy.desktop', 'ibus-setup.desktop', 'ibus-setup-hangul.desktop', 'ibus-setup-libbopomofo.desktop', 'ibus-setup-libpinyin.desktop', 'ibus-setup-m17n.desktop', 'ibus-setup-typing-booster.desktop', 'im-chooser.desktop', 'itweb-settings.desktop', 'jhbuild.desktop', 'javaws.desktop', 'java-1.7.0-openjdk-jconsole.desktop', 'java-1.7.0-openjdk-policytool.desktop', 'log4j-chainsaw.desktop', 'log4j-logfactor5.desktop', 'nm-connection-editor.desktop', 'orca.desktop', 'setroubleshoot.desktop', 'system-config-date.desktop', 'system-config-firewall.desktop', 'system-config-keyboard.desktop', 'system-config-language.desktop', 'system-config-printer.desktop', 'system-config-users.desktop', 'vino-preferences.desktop', 'gnome-control-center.desktop', 'org.gnome.Software.desktop', 'software-properties-gnome.desktop', 'synaptic.desktop', 'org.gnome.tweaks.desktop']" -gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Office/ apps "['libreoffice-startcenter.desktop', 'libreoffice-base.desktop', 'libreoffice-calc.desktop', 'libreoffice-draw.desktop', 'libreoffice-impress.desktop', 'libreoffice-writer.desktop', 'org.libreoffice.LibreOffice.desktop', 'org.libreoffice.LibreOffice.base.desktop', 'org.libreoffice.LibreOffice.calc.desktop', 'org.libreoffice.LibreOffice.draw.desktop', 'org.libreoffice.LibreOffice.impress.desktop', 'org.libreoffice.LibreOffice.math.desktop', 'org.libreoffice.LibreOffice.writer.desktop']" - -echo "Your Gnome App Grid has been rearranged." diff --git a/resources/InstallResources/Niceties/disable-passwords.pkla b/resources/InstallResources/Niceties/disable-passwords.pkla deleted file mode 100644 index 3aee443..0000000 --- a/resources/InstallResources/Niceties/disable-passwords.pkla +++ /dev/null @@ -1,4 +0,0 @@ -[Do anything you want] -Identity=unix-group:sudo -Action=* -ResultActive=yes diff --git a/resources/InstallResources/Niceties/sudoers.nopasswd b/resources/InstallResources/Niceties/sudoers.nopasswd deleted file mode 100644 index a68c17e..0000000 --- a/resources/InstallResources/Niceties/sudoers.nopasswd +++ /dev/null @@ -1,30 +0,0 @@ -# -# This file MUST be edited with the 'visudo' command as root. -# -# Please consider adding local content in /etc/sudoers.d/ instead of -# directly modifying this file. -# -# See the man page for details on how to write a sudoers file. -# -Defaults env_reset -Defaults mail_badpass -Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - -# Host alias specification - -# User alias specification - -# Cmnd alias specification - -# User privilege specification -root ALL=(ALL:ALL) ALL - -# Allow members of group sudo to execute any command -#%sudo ALL=(ALL:ALL) ALL - -# Allow members of group sudo to execute any command, without enter password -%sudo ALL=(ALL:ALL) NOPASSWD:ALL - -# See sudoers(5) for more information on "#include" directives: - -#includedir /etc/sudoers.d diff --git a/resources/InstallResources/Niceties/sudoers.original b/resources/InstallResources/Niceties/sudoers.original deleted file mode 100644 index d4cc632..0000000 --- a/resources/InstallResources/Niceties/sudoers.original +++ /dev/null @@ -1,27 +0,0 @@ -# -# This file MUST be edited with the 'visudo' command as root. -# -# Please consider adding local content in /etc/sudoers.d/ instead of -# directly modifying this file. -# -# See the man page for details on how to write a sudoers file. -# -Defaults env_reset -Defaults mail_badpass -Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - -# Host alias specification - -# User alias specification - -# Cmnd alias specification - -# User privilege specification -root ALL=(ALL:ALL) ALL - -# Allow members of group sudo to execute any command -%sudo ALL=(ALL:ALL) ALL - -# See sudoers(5) for more information on "#include" directives: - -#includedir /etc/sudoers.d diff --git a/resources/InstallResources/Niceties/type-less-passwords.sh b/resources/InstallResources/Niceties/type-less-passwords.sh deleted file mode 100644 index be9bb05..0000000 --- a/resources/InstallResources/Niceties/type-less-passwords.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -e - -#Type less passwords - - -# This file is part of PrawnOS (http://www.prawnos.com) -# Copyright (c) 2020 G. Dallas Dye - -# PrawnOS is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 -# as published by the Free Software Foundation. - -# PrawnOS is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with PrawnOS. If not, see . - -#Use with caution. This script does not disable your login password. -#Use this if you're concerned about your password being watched or listened to. -#Or pair with autologin and hand off to family for panfrost testing :) - -#First backup the sudoers, then replace it with a known good example -sudo cp /etc/sudoers /etc/sudoers.original -sudo cp sudoers.nopasswd /etc/sudoers - -#Now disable password prompts in a graphical session -sudo cp disable-passwords.pkla /var/lib/polkit-1/localauthority/50-local.d/disable-passwords.pkla diff --git a/scripts/InstallScripts/InstallPackages.sh b/scripts/InstallScripts/InstallPackages.sh index 8873f1c..e7658d0 100755 --- a/scripts/InstallScripts/InstallPackages.sh +++ b/scripts/InstallScripts/InstallPackages.sh @@ -66,18 +66,18 @@ echo "module/bluetooth/parameters/disable_ertm = 1" > /etc/sysfs.conf if [ "$DE" = "gnome" ] then - #Let's remove xterm vim and emacs, since they clutter up the shell - apt remove -y xterm vim emacs-common - apt purge -y xterm vim emacs-common - - #Skip this section for now. If the end user wants to, they can repurpose the lines below to preinstall extensions. - #Copy your favorite extensions to /InstallResources/extensions/ and uncomment the two below: - #mkdir -p /etc/skel/.local/share/gnome-shell/extensions/ - #cp -rf $DIR/extensions/* /etc/skel/.local/share/gnome-shell/extensions/ - #install firefox-esr default settings cp $DIR/firefox-esr/prawn-settings.js /usr/lib/firefox-esr/defaults/pref/ cp $DIR/firefox-esr/prawn.cfg /usr/lib/firefox-esr/ + + #TODO: a config file way to do the following would be nice, so that we can install the configs now instead + # of having to run the following commands after login + #Natural scrolling is un-natural + # gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false + #Tap to click is natural + # gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true + + fi if [ "$DE" = "xfce" ] diff --git a/scripts/buildFilesystem.sh b/scripts/buildFilesystem.sh index 749dba0..a002bd9 100755 --- a/scripts/buildFilesystem.sh +++ b/scripts/buildFilesystem.sh @@ -234,10 +234,12 @@ chroot $outmnt apt install -y -t unstable build-essential chroot $outmnt apt-get install -y -t unstable -d xsecurelock #Download the packages to be installed by Install.sh: -chroot $outmnt apt-get install -y -d xorg acpi-support lightdm tasksel dpkg librsvg2-common xorg xserver-xorg-input-libinput alsa-utils anacron avahi-daemon eject iw libnss-mdns xdg-utils lxqt crda xfce4 dbus-user-session system-config-printer tango-icon-theme xfce4-power-manager xfce4-terminal xfce4-goodies mousepad vlc libutempter0 xterm numix-gtk-theme dconf-cli dconf-editor plank network-manager-gnome network-manager-openvpn network-manager-openvpn-gnome dtrx emacs accountsservice sudo pavucontrol-qt papirus-icon-theme sysfsutils bluetooth gdm3 gnome-session dbus-user-session gnome-shell-extensions nautilus nautilus-admin file-roller gnome-software gnome-software-plugin-flatpak gedit gnome-system-monitor gnome-clocks evince gnome-logs gnome-disk-utility gnome-terminal epiphany-browser fonts-cantarell gnome-tweaks seahorse materia-gtk-theme eog -#Let's try to fix offline install by including stable versions of these packages too: -chroot $outmnt apt-get install -y -d libegl-mesa0 libegl1-mesa libgl1-mesa-dri libglapi-mesa libglu1-mesa libglx-mesa0 -#Let's download recent mesa packages from unstable +chroot $outmnt apt-get install -y -d xorg acpi-support lightdm tasksel dpkg librsvg2-common xorg xserver-xorg-input-libinput alsa-utils anacron avahi-daemon eject iw libnss-mdns xdg-utils lxqt crda xfce4 dbus-user-session system-config-printer tango-icon-theme xfce4-power-manager xfce4-terminal xfce4-goodies mousepad vlc libutempter0 xterm numix-gtk-theme dconf-cli dconf-editor plank network-manager-gnome network-manager-openvpn network-manager-openvpn-gnome dtrx emacs accountsservice sudo pavucontrol-qt papirus-icon-theme sysfsutils bluetooth + +#Download the gnome packages +chroot $outmnt apt-get install -y -d gdm3 gnome-session dbus-user-session gnome-shell-extensions nautilus nautilus-admin file-roller gnome-software gnome-software-plugin-flatpak gedit gnome-system-monitor gnome-clocks evince gnome-logs gnome-disk-utility gnome-terminal epiphany-browser fonts-cantarell gnome-tweaks seahorse materia-gtk-theme eog + +#download recent mesa packages from unstable chroot $outmnt apt-get install -y -t unstable -d libegl-mesa0 libegl1-mesa libgl1-mesa-dri libglapi-mesa libglu1-mesa libglx-mesa0 chroot $outmnt apt-get install -d -y firefox-esr