Compare commits
23 Commits
861f6299e9
...
main
Author | SHA1 | Date | |
---|---|---|---|
42f5b0d350 | |||
a4a35edca3 | |||
2f7ac41254 | |||
d67b14b792 | |||
c8a93c7f11 | |||
5809069e11 | |||
8b3204518f | |||
6e9f1e2975 | |||
b2a1199642 | |||
|
fbe160515e | ||
|
c198be3b3d | ||
|
bd32ea22fe | ||
|
8628593f05 | ||
6f07cdaeec | |||
be3bf0d9f7 | |||
b598f608ae | |||
d7c6f13f48 | |||
a8e1715559 | |||
87c1dd0f75 | |||
d48a46d2a1 | |||
87d1c04a0e | |||
e8ae7ccbc6 | |||
d005fc6fa4 |
Binary file not shown.
Before Width: | Height: | Size: 35 KiB |
BIN
Assets/preview-2024-07-06.png
Normal file
BIN
Assets/preview-2024-07-06.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
BIN
KonsaveTMPLT.knsv
Normal file
BIN
KonsaveTMPLT.knsv
Normal file
Binary file not shown.
@@ -1,172 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# paru -S plasma-wayland-session --noconfirm
|
||||
|
||||
|
||||
#status = $yad --form --field check1:chk --field check2:chk --field check3:chk --field check4:chk --field ph:chk
|
||||
|
||||
yadResults=$(yad --form --columns=3 --field Debloat:chk --field paru:chk --field htop:chk --field nomachine:chk --field librewolf-bin:chk --field pacseek-bin:chk --field docker:chk --field ph:chk --field ph:chk --field ph:chk --column=2 --field Config:LBL --field Grub-Timeout:chk --field Konsave:chk --field Flexo:chk --field Enable-SSH:chk --field ph:chk --field ph:chk --field ph:chk --field ph:chk --field ph:chk --field nop:chk --field:H --field:H --field:H --field:H --field:H --field:H --field:H --field nop:chk)
|
||||
#DRIVEPART="`echo $PARTS | cut -d "|" -f 2`"
|
||||
echo $yadResults
|
||||
|
||||
|
||||
|
||||
IFS='|' # space is set as delimiter
|
||||
read -ra SECTIONS <<< "$yadResults" # str is read into an array as tokens separated by IFS
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# echo "first section"
|
||||
# echo "${SECTIONS[0]}"
|
||||
# echo "second:"
|
||||
# echo "${SECTIONS[1]}"
|
||||
# echo "loop"
|
||||
|
||||
|
||||
index=0
|
||||
for i in "${SECTIONS[@]}"; do # access each element of array
|
||||
#echo "$index"
|
||||
#echo "$i"
|
||||
|
||||
|
||||
|
||||
if [[ $index -eq 0 ]]
|
||||
then # DEBLOAT
|
||||
if [[ $i == *"TRUE"* ]]; then
|
||||
echo "Uninstalling EOS Extras"
|
||||
sudo pacman -R firewalld eos-update-notifier welcome eos-quickstart --noconfirm
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [[ $index -eq 1 ]]
|
||||
then
|
||||
if [[ $i == *"TRUE"* ]]; then
|
||||
echo "Installing paru"
|
||||
sudo pacman -S paru --noconfirm
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $index -eq 2 ]]
|
||||
then
|
||||
if [[ $i == *"TRUE"* ]]; then
|
||||
echo "Installing htop"
|
||||
paru -S htop --noconfirm
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $index -eq 3 ]]
|
||||
then
|
||||
if [[ $i == *"TRUE"* ]]; then
|
||||
echo "Installing NoMachine"
|
||||
paru -S nomachine --noconfirm
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $index -eq 4 ]]
|
||||
then
|
||||
if [[ $i == *"TRUE"* ]]; then
|
||||
echo "Installing LibreWolf"
|
||||
paru -S librewolf-bin --noconfirm
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $index -eq 5 ]]
|
||||
then
|
||||
if [[ $i == *"TRUE"* ]]; then
|
||||
echo "installing pacseek"
|
||||
paru -S pacseek-bin --noconfirm
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [[ $index -eq 6 ]]
|
||||
then
|
||||
if [[ $i == *"TRUE"* ]]; then
|
||||
echo "Installing and enabling Docker"
|
||||
paru -S docker --noconfirm && sudo systemctl enable docker.service && sudo systemctl enable containerd.service
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [[ $index -eq 11 ]]
|
||||
then
|
||||
if [[ $i == *"TRUE"* ]]; then
|
||||
echo "Changing GRUB timeout"
|
||||
sudo nano /etc/default/grub
|
||||
sudo grub-mkconfig -o /boot/grub/grub.cfg
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [[ $index -eq 12 ]]
|
||||
then
|
||||
if [[ $i == *"TRUE"* ]]; then
|
||||
echo "Installing Konsave and Importing Profile"
|
||||
paru -S konsave --noconfirm
|
||||
cd /home/terminal/Downloads/
|
||||
smbget smb://smb/Toolbox/Installs/Linux/KonsaveTMPLT.knsv -a
|
||||
|
||||
#konsave -i $PWD/KonsaveTMPLT.knsv -f
|
||||
|
||||
konsave -i /home/terminal/Downloads/KonsaveTMPLT.knsv -f
|
||||
konsave -a KonsaveTMPLT
|
||||
# reboot
|
||||
fi
|
||||
fi
|
||||
if [[ $index -eq 13 ]]
|
||||
then
|
||||
if [[ $i == *"TRUE"* ]]; then
|
||||
echo "Adding Flexo to mirrorlist"
|
||||
echo 'Server = http://206.210.43.222:7878/$repo/os/$arch' | sudo tee -a /etc/pacman.d/mirrorlist
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [[ $index -eq 14 ]]
|
||||
then
|
||||
if [[ $i == *"TRUE"* ]]; then
|
||||
echo "Enabling SSH Access"
|
||||
sudo systemctl enable sshd.service && sudo systemctl start sshd.service
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [[ $index -eq 15 ]]
|
||||
then
|
||||
if [[ $i == *"TRUE"* ]]; then
|
||||
echo "TEMPLATE"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
((index++)) # Add 1 to count
|
||||
done
|
||||
|
||||
|
||||
|
||||
#items=`yad --list --separator='' --height=600 --multiple --column="Items" item1 item2 item3`
|
||||
|
||||
|
||||
#echo $items
|
||||
|
||||
# for item in $SECTIONS; do
|
||||
# echo "$item"
|
||||
# done
|
||||
|
||||
|
||||
|
||||
#yad --title="Desktop entry editor" --text="Simple desktop entry editor" \
|
||||
#--form --field="Type:CB" --field="Name" --field="Generic name" \
|
||||
#--field="Comment" --field="Command:FL" --field="Icon" \
|
||||
#--field="In termianl:CHK" --field="Startup notify:CHK" \
|
||||
#"Application!URI" "Name" "Generic name" "This is the comment" \
|
||||
#"/usr/bin/yad" "yad" FALSE TRUE
|
||||
|
||||
|
269
Linux_Toolbox.sh
Executable file
269
Linux_Toolbox.sh
Executable file
@@ -0,0 +1,269 @@
|
||||
#!/bin/bash
|
||||
|
||||
# paru -S plasma-wayland-session --noconfirm
|
||||
|
||||
Argument=$1
|
||||
|
||||
# Update all keyrings, and packages without asking for confirmations for anything (Choose default option each time), and then clear out the local pacman package cache afterwards
|
||||
if [[ $Argument == *"update"* ]]; then
|
||||
paru -Sy archlinux-keyring chaotic-keyring endeavouros-keyring --noconfirm --needed; paru -Syu --noconfirm; echo clearing out $(sudo ls /var/cache/pacman/pkg/ | wc -l) packages in cache; ( echo "y"; echo "y" ) | paru -Scc; echo "Update Complete!"
|
||||
|
||||
# https://stackoverflow.com/questions/226703/how-do-i-prompt-for-yes-no-cancel-input-in-a-linux-shell-script
|
||||
read -p "Do you wish to restart now? Y/N" yn
|
||||
case $yn in
|
||||
[Yy]* ) sudo reboot ;;
|
||||
[Nn]* ) exit;;
|
||||
esac
|
||||
exit
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
yadResults=$(yad \
|
||||
--title="Linux Toolbox" \
|
||||
--form --columns=3 \
|
||||
--field Installations:LBL \
|
||||
--field Debloat:chk \
|
||||
--field paru:chk \
|
||||
--field htop:chk \
|
||||
--field 'Mesh Agent':chk \
|
||||
--field librewolf:chk \
|
||||
--field brave:chk \
|
||||
--field pacseek:chk \
|
||||
--field docker:chk \
|
||||
--field '-':chk \
|
||||
--field 'Install pkgs from List':chk \
|
||||
--field 'Export pkgs to List':chk \
|
||||
--field '-':chk \
|
||||
--field Configuration:LBL \
|
||||
--field 'Change Hostname':chk \
|
||||
--field "sudo Timeout:chk" \
|
||||
--field "Grub Timeout:chk" \
|
||||
--field Konsave:chk \
|
||||
--field "Add Flexo Mirror:chk" \
|
||||
--field 'Disable Connectivity Check':chk \
|
||||
--field "Updater to Desktop:chk" \
|
||||
--field "Enable SSH:chk" \
|
||||
--field "Custom .bashrc:chk" \
|
||||
--field "Boot to CLI:chk" \
|
||||
--field "Reboot:chk" \
|
||||
--field '-':LBL \
|
||||
--field '-':LBL \
|
||||
--field '-':LBL \
|
||||
--field '-':LBL \
|
||||
--field '-':LBL \
|
||||
--field '-':LBL \
|
||||
--field '-':LBL \
|
||||
--field '-':LBL \
|
||||
--field '-':LBL \
|
||||
--field '-':LBL \
|
||||
--field '-':LBL \
|
||||
--field '-':LBL )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#DRIVEPART="`echo $PARTS | cut -d "|" -f 2`"
|
||||
# Print values of ALL of the above fields statuses
|
||||
# echo $yadResults
|
||||
|
||||
|
||||
|
||||
|
||||
IFS='|' # space is set as delimiter
|
||||
read -ra SECTIONS <<< "$yadResults" # str is read into an array as tokens separated by IFS
|
||||
|
||||
|
||||
# echo "first section"
|
||||
# echo "${SECTIONS[0]}"
|
||||
# echo "second:"
|
||||
# echo "${SECTIONS[1]}"
|
||||
# echo "loop"
|
||||
|
||||
|
||||
index=0
|
||||
for i in "${SECTIONS[@]}"; do # iterate through each element of array
|
||||
|
||||
# print the loop index and the value of the yad field
|
||||
# echo "$index" # 1, 2, 3, 4
|
||||
# echo "$i" # True, False
|
||||
|
||||
|
||||
if [[ $index -eq 1 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
# Debloat
|
||||
echo "Uninstalling EOS Extras: firewalld eos-update-notifier welcome eos-quickstart"
|
||||
sudo pacman -R firewalld eos-update-notifier welcome eos-quickstart --noconfirm
|
||||
echo "Disabling eos-welcome"
|
||||
eos-welcome --disable # disable eos-welcome popup window
|
||||
fi
|
||||
|
||||
|
||||
if [[ $index -eq 2 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
echo "Installing paru"
|
||||
sudo pacman -S paru --noconfirm
|
||||
fi
|
||||
|
||||
|
||||
if [[ $index -eq 3 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
echo "Installing htop"
|
||||
paru -S htop --noconfirm
|
||||
fi
|
||||
|
||||
|
||||
if [[ $index -eq 4 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
# install meshcentral agent
|
||||
# cd ~/Downloads/ ; wget --no-check-certificate -O meshagent "https://10.0.0.201/meshagents?id=%40FGwJAr%40pZPmGfuvJ1N1IpjOWl4USZc8k8XEE1xI4DEDzuWkJchGQHgbHBwrkuwB&installflags=0&meshinstall=6" ; chmod +x ./meshagent ; sudo ./meshagent -install
|
||||
# Install MeshCentral agent, place into z_TMPLT group
|
||||
cd ~/Downloads/ ; wget --no-check-certificate -O meshagent "https://10.0.0.201/meshagents?id=xbkSNMSjcbLzW6mppMwR4Y6dLTwjqKh7Dzxn90xQCmBaHd2lL2bZPh5bSwJj7Mcx&installflags=0&meshinstall=6" ; chmod +x ./meshagent ; sudo ./meshagent -install
|
||||
|
||||
# update pacman database and install xorg
|
||||
echo "Updating pacman cache and installing xorg-xhost"
|
||||
sudo pacman -Sy ; sudo pacman -S xorg-xhost --noconfirm
|
||||
|
||||
# set xhost for this session
|
||||
xhost +local:
|
||||
|
||||
# create autostart folder in case it doesn't exist
|
||||
mkdir ~/.config/autostart
|
||||
|
||||
echo "Adding xhost +local: to startup"
|
||||
cd ~/.config/autostart ; wget -q -O xhost.desktop https://git.zinchuk.xyz/yuriy/linux-setup-script/raw/branch/main/xhost.desktop
|
||||
fi
|
||||
|
||||
|
||||
if [[ $index -eq 5 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
echo "Installing LibreWolf"
|
||||
paru -S librewolf-bin --noconfirm
|
||||
fi
|
||||
|
||||
|
||||
if [[ $index -eq 6 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
echo "installing brave"
|
||||
paru -S brave-bin --noconfirm
|
||||
fi
|
||||
|
||||
|
||||
if [[ $index -eq 7 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
echo "installing pacseek"
|
||||
paru -S pacseek-bin --noconfirm
|
||||
fi
|
||||
|
||||
|
||||
if [[ $index -eq 8 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
echo "Installing and enabling Docker & Docker Compose"
|
||||
paru -S docker docker-compose --noconfirm && sudo systemctl enable docker.service && sudo systemctl enable containerd.service
|
||||
fi
|
||||
|
||||
|
||||
if [[ $index -eq 9 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
echo "empty here"
|
||||
fi
|
||||
|
||||
if [[ $index -eq 14 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
echo "Changing Hostname"
|
||||
echo "Please input new Hostname"
|
||||
read newhostname && hostnamectl set-hostname $newhostname
|
||||
fi
|
||||
|
||||
if [[ $index -eq 15 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
echo "Changing sudo timeout"
|
||||
echo "Paste the following into the editor:"
|
||||
konsole --hold -e echo "Defaults env_reset,timestamp_timeout=30" ; sudo visudo
|
||||
fi
|
||||
|
||||
|
||||
if [[ $index -eq 16 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
echo "Changing GRUB timeout"
|
||||
sudo nano /etc/default/grub
|
||||
sudo grub-mkconfig -o /boot/grub/grub.cfg
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [[ $index -eq 17 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
echo "Installing Konsave"
|
||||
pacman -Sy ; paru -S konsave --noconfirm
|
||||
|
||||
echo "Downloading Konsave Profile from Gitea"
|
||||
cd ~/Downloads/ ; wget -q -O KonsaveTMPLT.knsv https://git.zinchuk.xyz/yuriy/linux-setup-script/raw/branch/main/KonsaveTMPLT.knsv
|
||||
|
||||
echo "Importing Konsave Profile"
|
||||
konsave -i ~/Downloads/KonsaveTMPLT.knsv -f # import template
|
||||
konsave -a KonsaveTMPLT # activate template
|
||||
|
||||
echo "Uninstalling Konsave"
|
||||
paru -R konsave --noconfirm # uninstall konsave
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [[ $index -eq 18 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
file="/etc/pacman.d/mirrorlist"
|
||||
string="http://10.0.0.108:7878"
|
||||
|
||||
if grep -q "$string" "$file"; then
|
||||
echo "Flexo is in the mirrorlist. :)"
|
||||
else
|
||||
echo "FLEXO IP $string is not found in the mirrorlist file. Adding it."
|
||||
echo 'Server = http://10.0.0.108:7878/$repo/os/$arch' | sudo tee -a /etc/pacman.d/mirrorlist
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $index -eq 19 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
# https://wiki.archlinux.org/title/NetworkManager#Checking_connectivity
|
||||
file="/etc/NetworkManager/conf.d/20-connectivity.conf"
|
||||
string="enabled=false"
|
||||
|
||||
if grep -q "$string" "$file"; then
|
||||
echo "Network Connectivity is already disabled"
|
||||
else
|
||||
echo "Network Connectivity is not disabled. Adding network config file"
|
||||
echo '[connectivity]' | sudo tee -a /etc/NetworkManager/conf.d/20-connectivity.conf
|
||||
echo 'enabled=false' | sudo tee -a /etc/NetworkManager/conf.d/20-connectivity.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [[ $index -eq 20 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
echo "Adding Update Arch shortcut to desktop"
|
||||
cd ~/Desktop/ ; wget -q -O Update_Arch.sh https://git.zinchuk.xyz/yuriy/linux-setup-script/raw/branch/main/Update_Arch_Linux.sh ; chmod +x Update_Arch.sh
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [[ $index -eq 21 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
echo "Enabling SSH Access"
|
||||
sudo systemctl enable sshd.service && sudo systemctl start sshd.service
|
||||
fi
|
||||
|
||||
|
||||
if [[ $index -eq 22 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
echo "Custom Bashrc"
|
||||
echo "Downloading and replacing .bashrc file"
|
||||
|
||||
cd ~/ && wget -q -O .bashrc https://git.zinchuk.xyz/yuriy/Linux-bashrc-Profile/raw/branch/main/.bashrc && chmod 744 .bashrc
|
||||
fi
|
||||
|
||||
if [[ $index -eq 23 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
echo "Changing System Boot to CLI"
|
||||
sudo systemctl set-default multi-user.target
|
||||
fi
|
||||
|
||||
|
||||
if [[ $index -eq 24 ]] && [[ $i == *"TRUE"* ]]; then
|
||||
echo "Rebooting System"
|
||||
reboot
|
||||
fi
|
||||
|
||||
|
||||
#if [[ $index -eq NUMBER ]] && [[ $i == *"TRUE"* ]]; then
|
||||
#
|
||||
#fi
|
||||
|
||||
|
||||
((index++)) # Add 1 to count
|
||||
done
|
||||
|
23
README.md
23
README.md
@@ -1,8 +1,21 @@
|
||||
# Linux Setup Script
|
||||
## Helper Script to Setup a Fresh [EndeavourOS](https://endeavouros.com/) or Arch Linux Installation
|
||||
|
||||
Bash + YAD script for setting up a fresh EndeavourOS install with my personal preferences.
|
||||
Copy and Paste into Terminal to download and launch:
|
||||
- Needs yad installed on the system (pacman -S yad)
|
||||
````
|
||||
cd ~/Downloads/ && wget -q -O Linux_Toolbox.sh https://git.zinchuk.xyz/yuriy/Linux-Setup-Script/raw/branch/main/Linux_Toolbox.sh && chmod +x Linux_Toolbox.sh && bash Linux_Toolbox.sh
|
||||
````
|
||||
|
||||

|
||||
- Install Software through Pacman/Paru
|
||||
- paru, htop, librewolf, brave, docker, docker-compose
|
||||
- Install packages from a Pacman Export List
|
||||
- Change System Settings
|
||||
- Import KDE Settings through Konsave
|
||||
- Change sudo timeout, change grub timeout, insert [Flexo Local Update Repo](https://github.com/nroi/flexo), enable ssh
|
||||
|
||||
## Command to download and run:
|
||||
`wget -q -O - https://git.zinchuk.xyz/yuriy/Linux-Setup-Script/raw/branch/main/Linux-Setup-Script.sh | bash`
|
||||
|
||||
***
|
||||
|
||||
<p align="center">
|
||||
<img width="400" src="https://git.zinchuk.xyz/yuriy/linux-setup-script/raw/branch/main/Assets/preview-2024-07-06.png">
|
||||
</p>
|
6
Update_Arch_Linux.sh
Normal file
6
Update_Arch_Linux.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# konsole --hold -e sudo pacman -Sy archlinux-keyring chaotic-keyring endeavouros-keyring --noconfirm;paru -Syu --noconfirm;sudo pacman -Scc --noconfirm; echo "done!"
|
||||
|
||||
|
||||
konsole --hold -e bash "/home/$USER/Downloads/Linux_Toolbox.sh" "update"
|
7
xhost.desktop
Normal file
7
xhost.desktop
Normal file
@@ -0,0 +1,7 @@
|
||||
[Desktop Entry]
|
||||
Exec=xhost +local:
|
||||
Icon=
|
||||
Name=xhost
|
||||
Path=
|
||||
Terminal=False
|
||||
Type=Application
|
Reference in New Issue
Block a user