Skip to content

Commit 21c53bd

Browse files
authored
Merge pull request #9 from LaswitchTech/dev
General: Version bumped to v1.0.7
2 parents 11c2149 + b45c060 commit 21c53bd

3 files changed

Lines changed: 121 additions & 6 deletions

File tree

README.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,46 @@ thinOS is a lightweight, cross-platform desktop operating system designed for ef
1818
- **Robust Security**: thinOS includes built-in security features to protect user data and maintain system integrity.
1919

2020
## Installation
21-
To install thinOS, login to your current operating system and run the following command in your terminal:
21+
To install thinOS, login to your current operating system (Debian based distributions supported only) and run the following command in your terminal:
2222

2323
```bash
2424
curl -fsSL https://raw.githubusercontent.com/LaswitchTech/thinOS/stable/setup.sh | bash
2525
```
2626

27+
### On Debian
28+
Install sudo and curl if not already installed:
29+
30+
```bash
31+
su -
32+
apt update
33+
apt install sudo curl -y
34+
usermod -aG sudo your_username
35+
exit
36+
```
37+
38+
Then run the installation command above.
39+
40+
41+
### AMD GPU Acceleration
42+
To enable AMD GPU acceleration, install the following packages before running the installation script:
43+
44+
```bash
45+
sudo apt install firmware-amd-graphics -y
46+
```
47+
48+
### NVIDIA GPU Acceleration
49+
To enable NVIDIA GPU acceleration, install the following packages before running the installation script:
50+
51+
```bash
52+
sudo apt install nvidia-detect -y
53+
nvidia-detect
54+
sudo apt install nvidia-driver -y # or the recommended driver from nvidia-detect
55+
```
56+
57+
### Tested On
58+
- Debian 12 (Bookworm)
59+
- Raspberry Pi OS (Bookworm) (64-bit) Lite
60+
2761
## License
2862
This software is distributed under the [GPLv3](LICENSE) license.
2963

@@ -37,5 +71,12 @@ Contributions to thinOS are welcome! If you have ideas for new features or have
3771
- **Fork the Repository**: Create a fork of the repository on GitHub.
3872
- **Create a New Branch**: For new features or bug fixes, create a new branch in your fork.
3973
- **Submit a Pull Request**: Once your changes are ready, submit a pull request to the main repository.
74+
75+
## To Do
76+
- **Remote Assitance**: Implement a remote assistance feature for user support.
77+
- **Provisioning System**: Develop a provisioning system for easier deployment and management.
78+
- **Splash Screen**: Add a customizable splash screen during boot.
79+
- **Screen Manager**: Integrate a screen manager for better multi-monitor support.
80+
4081
## Wait, where is the documentation?
4182
Review the [Documentation](https://laswitchtech.com/en/blog/projects/thinos/index).

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.0.6
1+
v1.0.7

setup.sh

Lines changed: 78 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ else
6666
exit 1
6767
fi
6868

69+
# Ensure Debian has contrib, non-free, and non-free-firmware enabled (required for nvidia-driver)
70+
if [ "$DISTRO" == "debian" ]; then
71+
log_step "1a" "Ensuring contrib, non-free, and non-free-firmware are enabled in sources.list..."
72+
73+
if [ -f /etc/apt/sources.list ]; then
74+
sudo sed -i 's/^\s*deb\s\+\(.*\)\s\+main\s*$/deb \1 main contrib non-free non-free-firmware/' /etc/apt/sources.list
75+
fi
76+
77+
# Update once the new components are present
78+
sudo apt-get update
79+
fi
80+
6981
# Install necessary packages based on the distribution
7082
log_step 2 "Installing a Minimal Desktop Environment, Git, Firefox, ImageMagick, and feh..."
7183
if [ "$DISTRO" == "raspbian" ] || [ "$DISTRO" == "debian" ]; then
@@ -82,7 +94,6 @@ if [ "$DISTRO" == "raspbian" ] || [ "$DISTRO" == "debian" ]; then
8294
sudo apt-get install -y exfatprogs || true
8395
sudo apt-get install -y ntfs-3g || true
8496
sudo apt-get install -y exfat-fuse || true
85-
sudo apt-get install -y exfatprogs || true
8697
sudo apt-get install -y firefox-esr || true
8798
sudo apt-get install -y alsa-utils || true
8899
sudo apt-get install -y pulseaudio pavucontrol || true
@@ -100,6 +111,14 @@ if [ "$DISTRO" == "raspbian" ] || [ "$DISTRO" == "debian" ]; then
100111
sudo apt-get install -y python3 || true
101112
sudo apt-get install -y python3-pyqt5 || true
102113
sudo apt-get install -y python3-pyqt5* || true
114+
# if [ "$DISTRO" == "debian" ]; then
115+
# sudo apt-get install -y nvidia-driver || true
116+
# sudo apt-get install -y nvidia-tesla-470-driver || true
117+
# sudo apt-get install -y glx-alternative-nvidia || true
118+
# sudo apt-get install -y firmware-misc-nonfree || true
119+
# sudo apt-get install -y firmware-amd-graphics || true
120+
# sudo apt-get install -y xserver-xorg-video-nouveau || true
121+
# fi
103122
else
104123
echo "Unsupported distribution: $DISTRO"
105124
exit 1
@@ -136,6 +155,21 @@ sudo chmod +x /usr/local/bin/thinos-devmon || true
136155
# Add user to plugdev group
137156
sudo usermod -aG plugdev "$USER" || true
138157

158+
#
159+
# # Remove udisks2 entirely to prevent it from auto-mounting optical media to /media/cdrom0
160+
# sudo apt-get purge -y udisks2 2>/dev/null || true
161+
# sudo apt-get autoremove -y 2>/dev/null || true
162+
163+
# Disable udisks2 automount (we use devmon/udevil instead to mount as the session user)
164+
sudo systemctl disable --now udisks2.service udisks2.socket 2>/dev/null || true
165+
sudo systemctl mask udisks2.service udisks2.socket 2>/dev/null || true
166+
167+
#
168+
# If a previous devmon system service exists, disable it (devmon should run in the user session)
169+
sudo systemctl disable --now devmon.service 2>/dev/null || true
170+
171+
echo "NOTE: If optical discs still mount to /media/cdrom0 after reboot, check /etc/fstab for /dev/sr0 entries and remove them so devmon/udevil can handle sr0."
172+
139173
# Install or update the PyRDPConnect repository in /usr/share
140174
log_step 4 "Installing or updating the PyRDPConnect repository in /usr/share..."
141175
if [ -d "/usr/share/PyRDPConnect" ] && [ ! -f "/usr/share/PyRDPConnect/.gitmodules" ]; then
@@ -161,6 +195,10 @@ if [ -d $HOME/.config/openbox ]; then
161195
rm -r $HOME/.config/openbox
162196
fi
163197
ln -sfn /usr/share/thinOS/src/openbox $HOME/.config/openbox
198+
199+
# NOTE: devmon (auto-mount) should be started from the Openbox autostart file in the thinOS repo.
200+
# Ensure /usr/share/thinOS/src/openbox/autostart (or autostart.sh) contains:
201+
# ( sleep 2 && /usr/local/bin/thinos-devmon ) &
164202
ln -sfn /usr/share/thinOS/src/.xinitrc $HOME/.xinitrc
165203
ln -sfn /usr/share/thinOS/src/.xinitrc $HOME/.xsession
166204
mkdir -p $HOME/.themes
@@ -203,6 +241,22 @@ if [ -f "$FILE" ]; then
203241
sudo sed -i 's/$/ splash quiet plymouth.ignore-serial-consoles/' "$FILE"
204242
fi
205243
fi
244+
if [ "$DISTRO" == "debian" ]; then
245+
log_step "10a" "Enabling splash and quiet mode via GRUB on Debian..."
246+
247+
# Only touch GRUB_CMDLINE_LINUX_DEFAULT line
248+
if grep -q '^GRUB_CMDLINE_LINUX_DEFAULT=' /etc/default/grub; then
249+
# Ensure 'quiet' is present
250+
sudo sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT="\([^"]*\)"/GRUB_CMDLINE_LINUX_DEFAULT="\1 quiet"/' /etc/default/grub
251+
252+
# Ensure 'splash' is present
253+
sudo sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT="\([^"]*\)"/GRUB_CMDLINE_LINUX_DEFAULT="\1 splash plymouth.ignore-serial-consoles net.ifnames=0 biosdevname=0"/' /etc/default/grub
254+
else
255+
echo 'GRUB_CMDLINE_LINUX_DEFAULT="quiet splash plymouth.ignore-serial-consoles"' | sudo tee -a /etc/default/grub
256+
fi
257+
258+
sudo update-grub
259+
fi
206260

207261
# Copy and set custom Plymouth theme
208262
log_step 11 "Setting the custom Plymouth theme..."
@@ -316,11 +370,31 @@ EOL"
316370
fi
317371
fi
318372

319-
# Install necessary packages based on the distribution
320-
log_step 2 "Installing a ..."
373+
# Configure systemd-resolved and NetworkManager DNS integration
374+
log_step "14c" "Configuring systemd-resolved and NetworkManager DNS integration..."
321375
if [ "$DISTRO" == "raspbian" ] || [ "$DISTRO" == "debian" ]; then
322-
sudo apt-get install -y openvpn-systemd-resolved || true
376+
# Ensure required packages are installed
377+
sudo apt-get install -y systemd-resolved network-manager openvpn-systemd-resolved || true
378+
379+
# Enable and start services
323380
sudo systemctl enable --now systemd-resolved || true
381+
sudo systemctl enable --now NetworkManager || true
382+
383+
# Make /etc/resolv.conf use the systemd-resolved stub resolver
384+
if [ -e /etc/resolv.conf ] || [ -L /etc/resolv.conf ]; then
385+
sudo rm -f /etc/resolv.conf
386+
fi
387+
sudo ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
388+
389+
# Tell NetworkManager to hand DNS to systemd-resolved
390+
sudo mkdir -p /etc/NetworkManager/conf.d
391+
sudo bash -c 'cat > /etc/NetworkManager/conf.d/10-dns-systemd-resolved.conf' << "EOF"
392+
[main]
393+
dns=systemd-resolved
394+
EOF
395+
396+
# Restart NetworkManager to apply DNS settings
397+
sudo systemctl restart NetworkManager || true
324398
else
325399
echo "Unsupported distribution: $DISTRO"
326400
exit 1

0 commit comments

Comments
 (0)