From dc063fda7c752eb87ceacddf5a996d57d2922f84 Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Wed, 27 Nov 2024 20:45:44 +0300 Subject: [PATCH] make sure created user id is 1000 and fix network --- .github/release-nest-v3 | 2 +- debian/changelog | 20 +------------------- debian/control | 2 +- src/first_setup/internet_carousel/mod.rs | 16 +++++++++------- src/first_setup/user_carousel/mod.rs | 2 +- 5 files changed, 13 insertions(+), 29 deletions(-) diff --git a/.github/release-nest-v3 b/.github/release-nest-v3 index 56a6051..7813681 100644 --- a/.github/release-nest-v3 +++ b/.github/release-nest-v3 @@ -1 +1 @@ -1 \ No newline at end of file +5 \ No newline at end of file diff --git a/debian/changelog b/debian/changelog index de19753..12090bc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,22 +1,4 @@ -pika-first-setup (1.0.2-101pika5) pika; urgency=low - - * Update host ip - - -- Ward Nakchbandi Thu, 20 Sep 2022 22:01:00 +0000 - -pika-first-setup (1.0.2-101pika4) pika; urgency=low - - * Update host ip - - -- Ward Nakchbandi Thu, 20 Sep 2022 22:01:00 +0000 - -pika-first-setup (1.0.2-101pika3) pika; urgency=low - - * Update host ip - - -- Ward Nakchbandi Thu, 20 Sep 2022 22:01:00 +0000 - -pika-first-setup (1.0.1-101pika3) pika; urgency=low +pika-first-setup (1.0.1-101pika4) pika; urgency=low * Just rebuild for OS4 diff --git a/debian/control b/debian/control index aa97a26..d3da2a6 100644 --- a/debian/control +++ b/debian/control @@ -14,5 +14,5 @@ Rules-Requires-Root: no Package: pika-first-setup-gtk4 Architecture: any -Depends: ${shlibs:Depends} +Depends: ${shlibs:Depends}, nm-connection-editor Description: A frontend in GTK 4 and Libadwaita for initial user setup in pika. diff --git a/src/first_setup/internet_carousel/mod.rs b/src/first_setup/internet_carousel/mod.rs index 0a6a1aa..a244ce3 100644 --- a/src/first_setup/internet_carousel/mod.rs +++ b/src/first_setup/internet_carousel/mod.rs @@ -166,16 +166,18 @@ pub fn internet_carousel( })); first_setup_internet_button.connect_clicked(move |_| { - let env_xdg_session_desktop = env::var("XDG_SESSION_DESKTOP").unwrap(); + let env_xdg_session_desktop = env::var("XDG_SESSION_DESKTOP").unwrap().to_lowercase(); if env_xdg_session_desktop.contains("gnome") || env_xdg_session_desktop.contains("ubuntu") { - Command::new("gnome-control-center") + let _ = Command::new("gnome-control-center") .arg("network") - .spawn() - .expect("gnome-control-center failed to start"); + .spawn(); + } else if env_xdg_session_desktop.contains("plasma") || env_xdg_session_desktop.contains("kde") { + let _ = Command::new("systemsettings") + .arg("kcm_networkmanagement") + .spawn(); } else { - Command::new("nm-connection-editor") - .spawn() - .expect("nm-connection-editor failed to start"); + let _ = Command::new("nm-connection-editor") + .spawn(); } }); diff --git a/src/first_setup/user_carousel/mod.rs b/src/first_setup/user_carousel/mod.rs index cb146b3..534f0d8 100644 --- a/src/first_setup/user_carousel/mod.rs +++ b/src/first_setup/user_carousel/mod.rs @@ -19,7 +19,7 @@ USERNAME="$0" PASSWORD="$1" FULLNAME="$2" HOSTNAME="$3" -adduser --quiet --disabled-password --shell /bin/bash --gecos "${FULLNAME}" "${USERNAME}" +adduser --uid 1000 --gid 1000 --quiet --disabled-password --shell /bin/bash --gecos "${FULLNAME}" "${USERNAME}" echo "${USERNAME}":"${PASSWORD}" | chpasswd usermod -a -G sudo "${USERNAME}" mkdir -p /home/"${USERNAME}"