Skip to content

Instantly share code, notes, and snippets.

@BorysVrublevskyi
Last active May 14, 2024 18:26
Show Gist options
  • Save BorysVrublevskyi/1ffe36c94d262277dcd557f6ff3bfd98 to your computer and use it in GitHub Desktop.
Save BorysVrublevskyi/1ffe36c94d262277dcd557f6ff3bfd98 to your computer and use it in GitHub Desktop.
ClearLinux Workstation with KDE

ClearLinux. Install OS and Apps

This is a guide how to setup fast and stable workstation based on ClearLinux with KDE enwironment

Before you begin

Read System requirements, Check Processor Compatibility, get familiar with swupd package manager.

Install Clear OS Server, add KDE Plasma and flatpak

Download ClearLinux, make bootable USB drive with Rufus, boot from it and follow the instructions.

sudo swupd bundle-add desktop-kde flatpak
sudo reboot

Add Apps

Fell free to use Clear Linux Store

sudo swupd bundle-add -y firefox zsh nfs-utils ark okular keepassxc clr-network-troubleshooter network-basic
# sudo swupd bundle-add desktop-kde-apps # this will add all of the KDE default apps

Flatpak

Better to install flatpak and add it's repo to have more apps avaliable from Flathub

# If you didn't this before
sudo swupd bundle-add flatpak # After flatpak fresh install logoff and login again !!!
# Add flatpak repo !
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Install VLC Flatpak

To have all codecs support use VLC Flatpak

flatpak install flathub org.videolan.VLC

Add printers support

sudo swupd bundle-add devpkg-gutenprint

Install ffmpeg

sudo swupd 3rd-party add greginator https://clear.greginator.xyz/
sudo swupd 3rd-party bundle-add ffmpeg
# echo “export LD_LIBRARY_PATH=/opt/3rd-party/bundles/greginator/usr/lib64:/opt/3rd-party/bundles/greginator/usr/lib32” >> ${HOME}/.config/firefox.conf

ClearLinux Tricks

Powertop

sudo swupd bundle-add powertop
sudo powertop -c
sudo powertop --auto-tune
sudo systemctl edit --force --full powertop.service
# ... Insert text from block below
sudo systemctl enable --now powertop

powertop.service:

[Unit]
Description=PowerTOP autotuner
[Service]
Type=oneshot
ExecStart=/usr/sbin/powertop --auto-tune
[Install]
WantedBy=multi-user.target

Disable sleep on lid close

sudo nano /usr/lib/systemd/logind.conf.d/80-lidswitch.conf
[Login]
#HandleLidSwitch=suspend
HandleLidSwitch=ignore

sudo systemctl restart systemd-logind
#/etc/systemd/logind.conf

Disable WIFI Power Safe

sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
[connection]
# Values are 0 (use default), 1 (ignore/don't touch), 2 (disable) or 3 (enable).
wifi.powersave = 2

Enable SFTP

nano /etc/ssh/sshd_config
Subsystem sftp internal-sftp
systemctl restart sshd.service

Docker

swupd bundle-add containers-basic
systemctl enable --now docker

# add Dockly
sudo swupd bundle-add nodejs-basic
npm install -g npm
npm install -g dockly

Diagnose system

sudo swupd diagnose

Repair system

The following command repairs issues, removes unknown items

sudo swupd repair --picky

Factory reset (not tested)

This may broke your system!

# Delete user's configs
sudo rm -rf ~/.config # then relogin
# Hard reset
sudo rm -rf ~/.config /opt /var && sudo swupd repair --picky && sudo reboot
sudo rm -rf /home/* /opt/* /var/* /usr/local/* && sudo swupd repair --picky && sudo reboot

Deleting /etc/* will leave you without able to login! Remember: /etc/passwd, /etc/group and /etc/shadow ?

TODO

Lenovo Power Management

# somehow add acpi support: /proc/acpi/call
wget https://github.com/BorysVrublevskyi/LenovoPowerManagementLinux/raw/master/battery_management.sh
chmod u+x battery_management.sh
./battery_management.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment