Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Orchid #192

Merged
merged 11 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ debian/vanilla-first-setup
debian/.debhelper
*/__pycache__
*.pyc
/localbuild
/localbuild
.buildconfig
install/
13 changes: 10 additions & 3 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
vanilla-first-setup (2.0.3) unstable; urgency=critical

* Change log font

-- Mateus Melchiades <matbme@duck.com> 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 <matbme@duck.com> Mon, 25 Jul 2023 19:54:00 -0300
-- Mateus Melchiades <matbme@duck.com> Mon, 24 Jul 2023 18:34:00 -0300

vanilla-first-setup (2.0.1) unstable; urgency=critical

Expand Down
104 changes: 36 additions & 68 deletions recipe.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -143,8 +140,7 @@
{
"name" : "Contacts",
"icon" : "org.gnome.Contacts",
"flatpak" : true,
"snap" : true
"flatpak" : true
},
{
"name" : "Disk Usage Analyzer",
Expand All @@ -154,8 +150,7 @@
{
"name" : "Document Viewer",
"icon" : "org.gnome.Evince",
"flatpak" : true,
"snap" : true
"flatpak" : true
},
{
"name" : "Fonts",
Expand All @@ -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",
Expand All @@ -187,8 +180,12 @@
{
"name" : "Weather",
"icon" : "org.gnome.Weather",
"flatpak" : true,
"snap" : true
"flatpak" : true
},
{
"name" : "Web",
"icon" : "org.gnome.Epiphany",
"flatpak" : true
}
]
},
Expand All @@ -201,8 +198,7 @@
{
"name" : "LibreOffice",
"icon" : "org.libreoffice.LibreOffice",
"flatpak": true,
"snap" : true
"flatpak": true
}
]
},
Expand Down Expand Up @@ -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",
Expand All @@ -257,8 +251,7 @@
{
"name" : "Shortwave",
"icon" : "de.haeckerfelix.Shortwave",
"flatpak" : true,
"snap" : true
"flatpak" : true
},
{
"name" : "Sound Recorder",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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"]
}
]
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
6 changes: 3 additions & 3 deletions vanilla_first_setup/defaults/hostname.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = ""
Expand Down
2 changes: 1 addition & 1 deletion vanilla_first_setup/defaults/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion vanilla_first_setup/defaults/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
]
}
]
Expand Down
3 changes: 2 additions & 1 deletion vanilla_first_setup/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions vanilla_first_setup/utils/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import shutil
import logging
import tempfile
import subprocess


logger = logging.getLogger("FirstSetup::Processor")
Expand Down Expand Up @@ -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")
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion vanilla_first_setup/vanilla-first-setup.gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@
<file>assets/bundle-app-icons/org.gnome.clocks.png</file>
<file>assets/bundle-app-icons/org.gnome.Connections.png</file>
<file>assets/bundle-app-icons/org.gnome.Contacts.png</file>
<file>assets/bundle-app-icons/org.gnome.eog.png</file>
<file>assets/bundle-app-icons/org.gnome.Epiphany.png</file>
<file>assets/bundle-app-icons/org.gnome.Evince.png</file>
<file>assets/bundle-app-icons/org.gnome.font-viewer.png</file>
<file>assets/bundle-app-icons/org.gnome.Logs.png</file>
<file>assets/bundle-app-icons/org.gnome.Loupe.png</file>
<file>assets/bundle-app-icons/org.gnome.Maps.png</file>
<file>assets/bundle-app-icons/org.gnome.SoundRecorder.png</file>
<file>assets/bundle-app-icons/org.gnome.TextEditor.png</file>
Expand All @@ -53,3 +54,4 @@
<file>assets/bundle-app-icons/org.gnome.DejaDup.png</file>
</gresource>
</gresources>

2 changes: 1 addition & 1 deletion vanilla_first_setup/views/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down