From f28cb079479bf33175bc9fb541687fdb98229dbd Mon Sep 17 00:00:00 2001 From: olli Date: Tue, 18 Jul 2023 14:36:20 +0200 Subject: [PATCH] mint.sh aktualisiert --- mint.sh | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/mint.sh b/mint.sh index d1b8918..4fd98ff 100644 --- a/mint.sh +++ b/mint.sh @@ -82,11 +82,19 @@ done sudo bash /usr/local/sbin/autoupdate.sh +# get default user +defaultuser=$(getent passwd 1000 | cut -d: -f1) +defaultuserhome=$(getent passwd 1000 | cut -d: -f6) + # Add User to docker group -sudo usermod -aG docker $(whoami) +sudo usermod -aG docker ${$defaultuser} # Backup-Script only if autologin deactivated -grep -qr ^autologin-user= /etc/lightdm || echo '#!/bin/bash + +if ! grep -qr ^autologin-user= /etc/lightdm +then + cat <${defaultuserhome}/.xsessionrc +#!/bin/bash if [ -f ~/Nextcloud/scripts/backup-this-device.sh ] then gnome-terminal --hide-menubar --title=BACKUP --geometry=120x35 -- bash ~/Nextcloud/scripts/backup-this-device.sh @@ -97,8 +105,6 @@ elif [ -f ~/.scripts/backup-this-device.sh ] then gnome-terminal --hide-menubar --title=BACKUP --geometry=120x35 -- bash ~/.scripts/backup-this-device.sh fi -' >~/.xsessionrc -[ -f ~/.xsessionrc ] && chmod 700 ~/.xsessionrc # Autoupdate flatpak and cinnamon dconf write /com/linuxmint/updates/auto-update-cinnamon-spices true @@ -120,10 +126,15 @@ dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/custom8/binding dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/custom8/name '"Lockscreen"' dconf write /org/cinnamon/desktop/keybindings/custom-list "['__dummy__'$(dconf dump / 2>&1 | egrep '^\[org/cinnamon/desktop/keybindings/custom-keybindings/' | cut -d/ -f 6 | cut -d] -f1 | perl -pe "s/(.+)\n/, '\$1'/g")]" -# Nemo Filemanager Settings -dconf write /org/nemo/preferences/default-folder-viewer "'list-view'" -dconf write /org/nemo/preferences/show-location-entry true - # dark theme #dconf write /org/cinnamon/desktop/interface/gtk-theme "'Mint-Y-Dark'" #dconf write /org/cinnamon/desktop/interface/icon-theme "'Mint-Y-Dark'" + +# Nemo Filemanager Settings +dconf write /org/nemo/preferences/default-folder-viewer "'list-view'" +dconf write /org/nemo/preferences/show-location-entry true +EOF + + chmod 700 "${defaultuserhome}"/.xsessionrc + chown ${defaultuser}. "${defaultuserhome}"/.xsessionrc +fi