diff --git a/.gitignore b/.gitignore index 492b1efd..a665706b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,6 @@ debian/vanilla-first-setup debian/.debhelper */__pycache__ *.pyc -/localbuild \ No newline at end of file +/localbuild +.buildconfig +install/ \ No newline at end of file diff --git a/debian/changelog b/debian/changelog index d2ee3798..4fab74b4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,16 @@ +vanilla-first-setup (2.0.3) unstable; urgency=critical + + * Change log font + + -- Mateus Melchiades Mon, 24 Jul 2023 18:42:00 -0300 + vanilla-first-setup (2.0.2) unstable; urgency=critical - * Delete default user on finish - * Fix hiding desktop icon + * Complete Orchid port + * Replace eog with Loupe + * Add Epiplany as default browser - -- Mateus Melchiades Mon, 25 Jul 2023 19:54:00 -0300 + -- Mateus Melchiades Mon, 24 Jul 2023 18:34:00 -0300 vanilla-first-setup (2.0.1) unstable; urgency=critical diff --git a/recipe.json b/recipe.json index d395f524..8f8f9ef8 100644 --- a/recipe.json +++ b/recipe.json @@ -120,20 +120,17 @@ { "name" : "Characters", "icon" : "org.gnome.Characters", - "flatpak" : true, - "snap" : true + "flatpak" : true }, { "name" : "Cheese", "icon" : "org.gnome.Cheese", - "flatpak" : true, - "snap" : true + "flatpak" : true }, { "name" : "Clocks", "icon" : "org.gnome.clocks", - "flatpak" : true, - "snap" : true + "flatpak" : true }, { "name" : "Connections", @@ -143,8 +140,7 @@ { "name" : "Contacts", "icon" : "org.gnome.Contacts", - "flatpak" : true, - "snap" : true + "flatpak" : true }, { "name" : "Disk Usage Analyzer", @@ -154,8 +150,7 @@ { "name" : "Document Viewer", "icon" : "org.gnome.Evince", - "flatpak" : true, - "snap" : true + "flatpak" : true }, { "name" : "Fonts", @@ -164,15 +159,13 @@ }, { "name" : "Image Viewer", - "icon" : "org.gnome.eog", - "flatpak" : true, - "snap" : true + "icon" : "org.gnome.Loupe", + "flatpak" : true }, { "name" : "Logs", "icon" : "org.gnome.Logs", - "flatpak" : true, - "snap" : true + "flatpak" : true }, { "name" : "Maps", @@ -187,8 +180,12 @@ { "name" : "Weather", "icon" : "org.gnome.Weather", - "flatpak" : true, - "snap" : true + "flatpak" : true + }, + { + "name" : "Web", + "icon" : "org.gnome.Epiphany", + "flatpak" : true } ] }, @@ -201,8 +198,7 @@ { "name" : "LibreOffice", "icon" : "org.libreoffice.LibreOffice", - "flatpak": true, - "snap" : true + "flatpak": true } ] }, @@ -230,14 +226,12 @@ { "name" : "Boxes", "icon" : "org.gnome.Boxes", - "flatpak" : true, - "snap" : true + "flatpak" : true }, { "name" : "Déjà Dup Backups", "icon" : "org.gnome.DejaDup", - "flatpak" : true, - "snap" : true + "flatpak" : true }, { "name" : "Flatseal", @@ -257,8 +251,7 @@ { "name" : "Shortwave", "icon" : "de.haeckerfelix.Shortwave", - "flatpak" : true, - "snap" : true + "flatpak" : true }, { "name" : "Sound Recorder", @@ -277,17 +270,17 @@ { "if" : "Characters", "type" : "command", - "commands" : ["!nextBoot flatpak install -y org.gnome.Characters || snap install gnome-characters"] + "commands" : ["!nextBoot flatpak install -y org.gnome.Characters"] }, { "if" : "Cheese", "type" : "command", - "commands" : ["!nextBoot flatpak install -y org.gnome.Cheese || snap install cheese"] + "commands" : ["!nextBoot flatpak install -y org.gnome.Cheese"] }, { "if" : "Clocks", "type" : "command", - "commands" : ["!nextBoot flatpak install -y org.gnome.clocks || snap install gnome-clocks"] + "commands" : ["!nextBoot flatpak install -y org.gnome.clocks"] }, { "if" : "Connections", @@ -297,7 +290,7 @@ { "if" : "Contacts", "type" : "command", - "commands" : ["!nextBoot flatpak install -y org.gnome.Contacts || snap install gnome-contacts"] + "commands" : ["!nextBoot flatpak install -y org.gnome.Contacts"] }, { "if" : "Disk Usage Analyzer", @@ -307,7 +300,7 @@ { "if" : "Document Viewer", "type" : "command", - "commands" : ["!nextBoot flatpak install -y org.gnome.Evince || snap install evince"] + "commands" : ["!nextBoot flatpak install -y org.gnome.Evince"] }, { "if" : "Fonts", @@ -317,12 +310,12 @@ { "if" : "Image Viewer", "type" : "command", - "commands" : ["!nextBoot flatpak install -y org.gnome.eog || snap install eog"] + "commands" : ["!nextBoot flatpak install -y org.gnome.Loupe"] }, { "if" : "Logs", "type" : "command", - "commands" : ["!nextBoot flatpak install -y org.gnome.Logs || snap install gnome-logs"] + "commands" : ["!nextBoot flatpak install -y org.gnome.Logs"] }, { "if" : "Maps", @@ -337,12 +330,17 @@ { "if" : "Weather", "type" : "command", - "commands" : ["!nextBoot flatpak install -y org.gnome.Weather || snap install gnome-weather"] + "commands" : ["!nextBoot flatpak install -y org.gnome.Weather"] + }, + { + "if" : "Web", + "type" : "command", + "commands" : ["!nextBoot flatpak install -y org.gnome.Epiphany"] }, { "if" : "LibreOffice", "type" : "command", - "commands" : ["!nextBoot flatpak install -y org.libreoffice.LibreOffice || snap install libreoffice"] + "commands" : ["!nextBoot flatpak install -y org.libreoffice.LibreOffice"] }, { "if" : "Bottles", @@ -362,12 +360,12 @@ { "if" : "Boxes", "type" : "command", - "commands" : ["!nextBoot flatpak install -y org.gnome.Boxes || snap install gnome-boxes"] + "commands" : ["!nextBoot flatpak install -y org.gnome.Boxes"] }, { "if" : "Déjà Dup Backups", "type" : "command", - "commands" : ["!nextBoot flatpak install -y org.gnome.DejaDup || snap install deja-dup"] + "commands" : ["!nextBoot flatpak install -y org.gnome.DejaDup"] }, { "if" : "Flatseal", @@ -387,7 +385,7 @@ { "if" : "Shortwave", "type" : "command", - "commands" : ["!nextBoot flatpak install -y de.haeckerfelix.Shortwave || snap install shortwave"] + "commands" : ["!nextBoot flatpak install -y de.haeckerfelix.Shortwave"] }, { "if" : "Sound Recorder", @@ -420,36 +418,6 @@ } ] }, - "nvidia": { - "template": "yes-no", - "is-advanced": true, - "preset": false, - "display-conditions": [ - "lspci | grep -i '.* nvidia .*'" - ], - "icon": "video-display-symbolic", - "title": "NVIDIA® Drivers", - "description": "Choose whether to install proprietary NVIDIA drivers for better compatibility and performance.", - "buttons": { - "yes": "Yes, install", - "no": "Skip", - "info": { - "type": "text", - "title": "About Proprietary Drivers", - "text": "A proprietary driver has private code that neither Vanilla OS nor Debian developers can review.\n\nSecurity and other updates are dependent on the driver vendor." - } - }, - "final": [ - { - "if": "nvidia", - "type": "command", - "commands": [ - "abroot pkg add linux-headers-$(uname -r) nvidia-prime", - "ikaros auto-install" - ] - } - ] - }, "vm": { "template": "yes-no", "is-advanced": true, @@ -497,7 +465,7 @@ { "if": "codecs", "type": "command", - "commands": ["abroot pkg add libavcodec-extra gstreamer1.0-fluendo-mp3 gstreamer1.0-libav gstreamer1.0-plugins-ugly gstreamer1.0-vaapi libavcodec-extra ttf-mscorefonts-installer unrar"] + "commands": ["abroot pkg add libavcodec-extra gstreamer1.0-libav gstreamer1.0-plugins-ugly gstreamer1.0-vaapi libavcodec-extra ttf-mscorefonts-installer unrar"] } ] } diff --git a/vanilla_first_setup/assets/bundle-app-icons/org.gnome.Epiphany.png b/vanilla_first_setup/assets/bundle-app-icons/org.gnome.Epiphany.png new file mode 100644 index 00000000..65f2b837 Binary files /dev/null and b/vanilla_first_setup/assets/bundle-app-icons/org.gnome.Epiphany.png differ diff --git a/vanilla_first_setup/assets/bundle-app-icons/org.gnome.Loupe.png b/vanilla_first_setup/assets/bundle-app-icons/org.gnome.Loupe.png new file mode 100644 index 00000000..f4d109d7 Binary files /dev/null and b/vanilla_first_setup/assets/bundle-app-icons/org.gnome.Loupe.png differ diff --git a/vanilla_first_setup/assets/bundle-app-icons/org.gnome.eog.png b/vanilla_first_setup/assets/bundle-app-icons/org.gnome.eog.png deleted file mode 100644 index fc70bdf3..00000000 Binary files a/vanilla_first_setup/assets/bundle-app-icons/org.gnome.eog.png and /dev/null differ diff --git a/vanilla_first_setup/defaults/hostname.py b/vanilla_first_setup/defaults/hostname.py index 71c2b55f..b7d53db3 100644 --- a/vanilla_first_setup/defaults/hostname.py +++ b/vanilla_first_setup/defaults/hostname.py @@ -52,11 +52,11 @@ def __on_btn_next_clicked(self, widget): def get_finals(self): return { "vars": { - "create": True + "setHostname": True }, "funcs": [ { - "if": "create", + "if": "setHostname", "type": "command", "commands": [ "hostnamectl set-hostname " + self.hostname @@ -73,7 +73,7 @@ def __on_hostname_entry_changed(self, *args): self.hostname_entry.remove_css_class('error') self.__verify_continue() return - + self.__window.toast("Hostname cannot contain special characters. Please choose another hostname.") self.hostname_entry.add_css_class('error') self.hostname = "" diff --git a/vanilla_first_setup/defaults/theme.py b/vanilla_first_setup/defaults/theme.py index 38f91607..f34a6851 100644 --- a/vanilla_first_setup/defaults/theme.py +++ b/vanilla_first_setup/defaults/theme.py @@ -37,7 +37,7 @@ def __init__(self, window, distro_info, key, step, **kwargs): self.btn_next.connect("clicked", self.__window.next) self.btn_default.connect('toggled', self.__set_theme, "light") self.btn_dark.connect('toggled', self.__set_theme, "dark") - + @property def step_id(self): return self.__key diff --git a/vanilla_first_setup/defaults/user.py b/vanilla_first_setup/defaults/user.py index 8c78b150..9fbfd977 100644 --- a/vanilla_first_setup/defaults/user.py +++ b/vanilla_first_setup/defaults/user.py @@ -72,7 +72,8 @@ def get_finals(self): "type": "command", "commands": [ f"adduser --quiet --disabled-password --shell /bin/bash --gecos \"{self.fullname}\" {self.username}", - f"echo \"{self.username}:{self.password_entry.get_text()}\" | chpasswd" + f"echo \"{self.username}:{self.password_entry.get_text()}\" | chpasswd", + f"usermod -a -G sudo,lpadmin {self.username}" ] } ] diff --git a/vanilla_first_setup/meson.build b/vanilla_first_setup/meson.build index bd021776..a1d9c003 100644 --- a/vanilla_first_setup/meson.build +++ b/vanilla_first_setup/meson.build @@ -23,7 +23,8 @@ configure_file( install_mode: 'rwxr-xr-x', configuration: conf, install: true, - install_dir: get_option('bindir') + install_dir: get_option('bindir'), + install_mode: 'rwxr-xr-x' ) configure_file( diff --git a/vanilla_first_setup/utils/processor.py b/vanilla_first_setup/utils/processor.py index 3086af15..ff5325d9 100644 --- a/vanilla_first_setup/utils/processor.py +++ b/vanilla_first_setup/utils/processor.py @@ -18,7 +18,6 @@ import shutil import logging import tempfile -import subprocess logger = logging.getLogger("FirstSetup::Processor") @@ -115,6 +114,9 @@ def get_setup_commands(log_path, pre_run, post_run, commands): f.write(f"{out_run}\n") f.write("fi") + # commit changes + f.write(f"{abroot_bin} pkg apply\n") + # create the done file f.write("if [ $? -eq 0 ]; then\n") f.write(f"touch {done_file}\n") @@ -127,8 +129,6 @@ def get_setup_commands(log_path, pre_run, post_run, commands): os.chmod(f.name, 0o755) cmd = ["pkexec", "sh", f.name] - if abroot_bin := shutil.which("abroot"): - cmd = ["pkexec", abroot_bin, "exec", "-f", "-s", "sh", f.name] return cmd @staticmethod diff --git a/vanilla_first_setup/vanilla-first-setup.gresource.xml b/vanilla_first_setup/vanilla-first-setup.gresource.xml index a63fcbb3..d57d0fa5 100644 --- a/vanilla_first_setup/vanilla-first-setup.gresource.xml +++ b/vanilla_first_setup/vanilla-first-setup.gresource.xml @@ -39,10 +39,11 @@ assets/bundle-app-icons/org.gnome.clocks.png assets/bundle-app-icons/org.gnome.Connections.png assets/bundle-app-icons/org.gnome.Contacts.png - assets/bundle-app-icons/org.gnome.eog.png + assets/bundle-app-icons/org.gnome.Epiphany.png assets/bundle-app-icons/org.gnome.Evince.png assets/bundle-app-icons/org.gnome.font-viewer.png assets/bundle-app-icons/org.gnome.Logs.png + assets/bundle-app-icons/org.gnome.Loupe.png assets/bundle-app-icons/org.gnome.Maps.png assets/bundle-app-icons/org.gnome.SoundRecorder.png assets/bundle-app-icons/org.gnome.TextEditor.png @@ -53,3 +54,4 @@ assets/bundle-app-icons/org.gnome.DejaDup.png + diff --git a/vanilla_first_setup/views/progress.py b/vanilla_first_setup/views/progress.py index 17656c6f..be65e040 100644 --- a/vanilla_first_setup/views/progress.py +++ b/vanilla_first_setup/views/progress.py @@ -41,7 +41,7 @@ def __init__(self, window, tour: dict, **kwargs): self.__success_fn = None self.__terminal = Vte.Terminal() self.__font = Pango.FontDescription() - self.__font.set_family("Ubuntu Mono") + self.__font.set_family("Monospace") self.__font.set_size(13 * Pango.SCALE) self.__font.set_weight(Pango.Weight.NORMAL) self.__font.set_stretch(Pango.Stretch.NORMAL)