Update rebuilt-machine.sh
Much improved use of theme
This commit is contained in:
parent
7f883d0f8c
commit
9c530121d3
@ -18,32 +18,31 @@ echo -e "${YELLOW} UPDATING UBUNTU AND INSTALLING REQUIRED SOFTWARE PACKAGES ${N
|
|||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt -y --purge remove ubuntu-advantage-tools ubuntu-pro-client*
|
sudo apt -y --purge remove ubuntu-advantage-tools ubuntu-pro-client*
|
||||||
sudo apt -y upgrade
|
sudo apt -y upgrade
|
||||||
sudo apt -y install git jq tela-icon-theme gnome-software unzip vim curl openjdk-21-jre zlib1g-dev vlc chromium-browser p7zip-full libfuse2 htop net-tools bpytop ffmpeg sysbench smartmontools ksnip xsensors fonts-symbola lm-sensors cinnamon-desktop-environment
|
sudo apt -y install git jq gnome-software unzip vim curl openjdk-21-jre zlib1g-dev vlc chromium-browser p7zip-full libfuse2 htop net-tools bpytop ffmpeg sysbench smartmontools ksnip xsensors fonts-symbola lm-sensors cinnamon-desktop-environment
|
||||||
|
|
||||||
### SET DEFAULT SESSION TO CINNAMON ###
|
### SET DEFAULT SESSION TO CINNAMON ###
|
||||||
echo -e "${YELLOW} SETTING CINNAMON AS DEFAULT DESKTOP SESSION ${NC}\n"
|
echo -e "${YELLOW} SETTING CINNAMON AS DEFAULT DESKTOP SESSION ${NC}\n"
|
||||||
|
|
||||||
# Works for most LightDM or .xsession-compatible setups
|
# Works for most LightDM and GDM-based setups
|
||||||
echo "cinnamon" > ~/.xsession
|
echo "cinnamon" > "$HOME/.xsession"
|
||||||
chmod +x ~/.xsession
|
chmod +x "$HOME/.xsession"
|
||||||
|
|
||||||
# Optional fallback for LightDM users
|
cat > "$HOME/.dmrc" <<EOL
|
||||||
cat > ~/.dmrc <<EOL
|
|
||||||
[Desktop]
|
[Desktop]
|
||||||
Session=cinnamon
|
Session=cinnamon
|
||||||
EOL
|
EOL
|
||||||
|
|
||||||
echo -e "${GREEN} Cinnamon session has been set as default! ${NC}\n"
|
echo -e "${GREEN} Cinnamon session will be loaded by default on next login! ${NC}\n"
|
||||||
|
|
||||||
### DOWNLOAD & INSTALL QORTAL CORE ###
|
### DOWNLOAD & INSTALL QORTAL CORE ###
|
||||||
echo -e "${YELLOW} DOWNLOADING QORTAL CORE AND QORT SCRIPT ${NC}\n"
|
echo -e "${YELLOW} DOWNLOADING QORTAL CORE AND QORT SCRIPT ${NC}\n"
|
||||||
|
|
||||||
cd ~
|
cd "$HOME"
|
||||||
mkdir -p backups
|
mkdir -p backups
|
||||||
|
|
||||||
if [ -d qortal ]; then
|
if [ -d qortal ]; then
|
||||||
echo -e "${PURPLE} qortal DIRECTORY FOUND, BACKING UP ORIGINAL TO '~/backups' AND RE-INSTALLING ${NC}\n"
|
echo -e "${PURPLE} qortal DIRECTORY FOUND, BACKING UP ORIGINAL TO '~/backups' AND RE-INSTALLING ${NC}\n"
|
||||||
mv qortal backups/qortal-$(date +%s)
|
mv qortal "backups/qortal-$(date +%s)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
curl -L -O https://github.com/Qortal/qortal/releases/latest/download/qortal.zip
|
curl -L -O https://github.com/Qortal/qortal/releases/latest/download/qortal.zip
|
||||||
@ -55,7 +54,7 @@ curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/set
|
|||||||
curl -L -O https://raw.githubusercontent.com/Qortal/qortal/master/tools/qort
|
curl -L -O https://raw.githubusercontent.com/Qortal/qortal/master/tools/qort
|
||||||
chmod +x *.sh qort
|
chmod +x *.sh qort
|
||||||
|
|
||||||
cd ~
|
cd "$HOME"
|
||||||
|
|
||||||
### INSTALL QORTAL UI & HUB ###
|
### INSTALL QORTAL UI & HUB ###
|
||||||
cd qortal
|
cd qortal
|
||||||
@ -76,7 +75,7 @@ fi
|
|||||||
chmod +x Qortal-UI Qortal-Hub
|
chmod +x Qortal-UI Qortal-Hub
|
||||||
|
|
||||||
### DOWNLOAD EXTRA FILES ###
|
### DOWNLOAD EXTRA FILES ###
|
||||||
cd ~
|
cd "$HOME"
|
||||||
curl -L -O https://cloud.qortal.org/s/machine_files/download
|
curl -L -O https://cloud.qortal.org/s/machine_files/download
|
||||||
curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/refresh-qortal.sh
|
curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/refresh-qortal.sh
|
||||||
curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/auto-fix-qortal.sh
|
curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/auto-fix-qortal.sh
|
||||||
@ -86,34 +85,34 @@ curl -L -O https://raw.githubusercontent.com/crowetic/QORTector-scripts/main/sta
|
|||||||
|
|
||||||
chmod +x *.sh
|
chmod +x *.sh
|
||||||
unzip download
|
unzip download
|
||||||
rsync -raPz Machine-files/* ${HOME}
|
rsync -raPz Machine-files/* "$HOME"
|
||||||
rm -rf Machine-files download
|
rm -rf Machine-files download
|
||||||
|
|
||||||
### CINNAMON DETECTION & THEMING ###
|
### CINNAMON THEMING - ALWAYS APPLIES EVEN IF CINNAMON ISN'T ACTIVE ###
|
||||||
if [ "$XDG_CURRENT_DESKTOP" = "X-Cinnamon" ] || [ -d "/usr/share/cinnamon" ]; then
|
echo -e "${YELLOW} INSTALLING WINDOWS 10 THEMES FOR CINNAMON ${NC}\n"
|
||||||
echo -e "${YELLOW} CINNAMON DETECTED - INSTALLING WINDOWS 10 THEMES ${NC}\n"
|
|
||||||
|
|
||||||
mkdir -p ${HOME}/.themes
|
mkdir -p "${HOME}/.themes" "${HOME}/.icons"
|
||||||
git clone https://github.com/B00merang-Project/Windows-10.git ~/.themes/Windows-10
|
|
||||||
git clone https://github.com/B00merang-Project/Windows-10-Dark.git ~/.themes/Windows-10-Dark
|
|
||||||
git clone https://github.com/cbrnix/Flatery.git ~/.icons/Flatery
|
|
||||||
|
|
||||||
echo -e "${YELLOW} APPLYING CINNAMON THEMES TO MATCH WINDOWS 10 ${NC}\n"
|
# Avoid cloning twice
|
||||||
gsettings set org.cinnamon.desktop.wm.preferences theme "Windows-10-Dark"
|
[ ! -d "${HOME}/.themes/Windows-10" ] && git clone https://github.com/B00merang-Project/Windows-10.git ~/.themes/Windows-10
|
||||||
gsettings set org.cinnamon.desktop.interface gtk-theme "Windows-10-Basic"
|
[ ! -d "${HOME}/.themes/Windows-10-Dark" ] && git clone https://github.com/B00merang-Project/Windows-10-Dark.git ~/.themes/Windows-10-Dark
|
||||||
gsettings set org.cinnamon.theme name "Windows-10"
|
[ ! -d "${HOME}/.icons/Flatery" ] && git clone https://github.com/cbrnix/Flatery.git ~/.icons/Flatery
|
||||||
gsettings set org.cinnamon.desktop.background picture-uri "file://${HOME}/Pictures/wallpapers/Qortal-TheFuture-Wallpaper.png"
|
|
||||||
gsettings set org.cinnamon.desktop.interface icon-theme "Flatery"
|
### APPLY THEMES (WILL WORK AFTER REBOOT TOO) ###
|
||||||
else
|
echo -e "${YELLOW} APPLYING CINNAMON THEMES ${NC}\n"
|
||||||
echo -e "${RED} Cinnamon not detected, skipping Cinnamon theming. ${NC}"
|
|
||||||
fi
|
gsettings set org.cinnamon.desktop.wm.preferences theme "Windows-10-Dark" || true
|
||||||
|
gsettings set org.cinnamon.desktop.interface gtk-theme "Windows-10-Basic" || true
|
||||||
|
gsettings set org.cinnamon.theme name "Windows-10" || true
|
||||||
|
gsettings set org.cinnamon.desktop.background picture-uri "file://${HOME}/Pictures/wallpapers/Qortal-TheFuture-Wallpaper.png" || true
|
||||||
|
gsettings set org.cinnamon.desktop.interface icon-theme "Flatery" || true
|
||||||
|
|
||||||
### ADD DESKTOP SHORTCUTS ###
|
### ADD DESKTOP SHORTCUTS ###
|
||||||
echo -e "${YELLOW} CREATING DESKTOP LAUNCHERS FOR QORTAL APPLICATIONS ${NC}\n"
|
echo -e "${YELLOW} CREATING DESKTOP LAUNCHERS ${NC}\n"
|
||||||
|
|
||||||
mkdir -p ~/.local/share/applications
|
mkdir -p "$HOME/.local/share/applications"
|
||||||
|
|
||||||
cat > ~/.local/share/applications/qortal-ui.desktop <<EOL
|
cat > "$HOME/.local/share/applications/qortal-ui.desktop" <<EOL
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=Qortal UI
|
Name=Qortal UI
|
||||||
Comment=Launch Qortal User Interface
|
Comment=Launch Qortal User Interface
|
||||||
@ -124,7 +123,7 @@ Type=Application
|
|||||||
Categories=Qortal;
|
Categories=Qortal;
|
||||||
EOL
|
EOL
|
||||||
|
|
||||||
cat > ~/.local/share/applications/qortal-hub.desktop <<EOL
|
cat > "$HOME/.local/share/applications/qortal-hub.desktop" <<EOL
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=Qortal Hub
|
Name=Qortal Hub
|
||||||
Comment=Launch Qortal Hub
|
Comment=Launch Qortal Hub
|
||||||
@ -136,7 +135,7 @@ Categories=Qortal;
|
|||||||
EOL
|
EOL
|
||||||
|
|
||||||
### CRONTAB SETUP ###
|
### CRONTAB SETUP ###
|
||||||
echo -e "${YELLOW} FINISHING UP ${NC}\n"
|
echo -e "${YELLOW} SETTING CRONTAB TASKS ${NC}\n"
|
||||||
|
|
||||||
{
|
{
|
||||||
echo "@reboot sleep 399 && /home/${username}/auto-fix-qortal.sh > \"/home/${username}/qortal/auto-fix-startup.log\" 2>&1"
|
echo "@reboot sleep 399 && /home/${username}/auto-fix-qortal.sh > \"/home/${username}/qortal/auto-fix-startup.log\" 2>&1"
|
||||||
@ -147,6 +146,6 @@ echo -e "${YELLOW} FINISHING UP ${NC}\n"
|
|||||||
crontab rebuilt-machine-cron
|
crontab rebuilt-machine-cron
|
||||||
rm -f rebuilt-machine-cron
|
rm -f rebuilt-machine-cron
|
||||||
|
|
||||||
echo -e "${YELLOW} CINNAMON SET AS DEFAULT - MACHINE WILL REBOOT IN 10 SECONDS ${NC}\n"
|
echo -e "${GREEN} SETUP COMPLETE! CINNAMON WILL BE USED ON NEXT LOGIN. REBOOTING IN 10 SECONDS ${NC}\n"
|
||||||
sleep 10
|
sleep 10
|
||||||
sudo reboot
|
sudo reboot
|
||||||
|
Loading…
x
Reference in New Issue
Block a user