ฉันเขียนสคริปต์ทุบตีเพื่อทำให้การตั้งค่าและการติดตั้งของฉันเป็นแบบอัตโนมัติ อย่างไรก็ตาม หลังจากที่สคริปต์ของฉันเสร็จสิ้นgsettingsคำสั่งก็หยุดทำงาน

gsettings set org.gnome.settings-daemon.plugins.media-keys area-screenshot-clip "['<Ctrl>P']"
gsettings get org.gnome.settings-daemon.plugins.media-keys area-screenshot-clip
output: ['<Ctrl>P'] #correct!

เอาต์พุตเทอร์มินัลถูกต้อง อย่างไรก็ตาม การโยงคีย์ของฉันไม่เปลี่ยนแปลง และตรวจสอบการตั้งค่าของฉันโดยใช้ dconf-editor แสดงว่าไม่มีการเปลี่ยนแปลง การรันคำสั่ง gsettingsใดๆทำให้เกิดพฤติกรรมเดียวกัน

ใส่คำอธิบายภาพที่นี่

ต่อไปนี้เป็นสคริปต์ทุบตีแบบเต็มของฉัน

##################Update Drivers##################

sudo tee /etc/sudoers.d/$USER <<END
$USER $(hostname) = NOPASSWD: ALL
END

sudo apt-get remove --purge '^nvidia-.*' -y
sudo ubuntu-drivers autoinstall -y


##################Wake on Wifi (wowl)##################
sudo iw phy0 wowlan enable magic-packet

##################SSH server##################
sudo apt install openssh-server -y
    
##################Language Format##################
FILE=/etc/default/locale
sudo echo LC_ALL="en_US.UTF-8" >> $FILE
##################Download Files##################
FILE=./Anaconda3-2021.11-Linux-x86_64.sh
if [ -f "$FILE" ]; then
    echo "$FILE exists..."
else 
    echo "Downloading Anaconda3-2021.11"
    wget https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh
fi


FILE=./google-chrome-stable_current_amd64.deb
if [ -f "$FILE" ]; then
    echo "$FILE exists..."
else 
    echo "Downloading google-chrome-stable_current_amd64"
    wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
fi



FILE=./teamviewer_amd64.deb
if [ -f "$FILE" ]; then
    echo "$FILE exists..."
else 
    echo "Downloading teamviewer_amd64"
    wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
fi

FILE=./teams_1.4.00.26453_amd64.deb
if [ -f "$FILE" ]; then
    echo "$FILE exists..."
else 
    echo "Downloading teams_1.4.00.26453_amd64.deb"
    wget https://packages.microsoft.com/repos/ms-teams/pool/main/t/teams/teams_1.4.00.26453_amd64.deb
fi

##################Install Favourite apps##################

#Chrome
sudo dpkg -i google-chrome-stable_current_amd64.deb
#Discord
sudo snap install discord
#teamviewer
sudo apt install ./teamviewer_amd64.deb -y
#Microsoft teams
sudo apt install ./teams_1.4.00.26453_amd64.deb -y
#signal
sudo snap install signal-desktop
#whatsapp
sudo snap install whatsapp-for-linux
#unetbootin
sudo add-apt-repository ppa:gezakovacs/ppa -y
sudo apt-get update
sudo apt-get install unetbootin -y
#timeshaft
sudo add-apt-repository -y ppa:teejee2008/ppa
sudo apt install timeshift -y
#pycharm
sudo snap install pycharm-community --classic

#Anaconda pre-requisites
sudo apt-get update -y
sudo apt-get install curl -y
sudo apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 -y

##################Uninstall Games/firefox##################
sudo apt remove aisleriot gnome-mahjongg gnome-mines gnome-sudoku -y
sudo apt-get remove firefox -y

# then, remove the sudo access
sudo /bin/rm /etc/sudoers.d/$USER
sudo -k

##################Install Anaconda##################



bash Anaconda3-2021.11-Linux-x86_64.sh -b -p $HOME/anaconda3
source ~/.bashrc
eval "$($HOME/anaconda3/bin/conda shell.bash hook)"
conda init

###add anaconda-navigator to menue####
FILE=$HOME/anaconda.sh
echo export CONDA_PYTHON_EXE=$HOME/anaconda3/bin/python > $FILE
echo export PATH=$HOME/anaconda3/bin:$PATH >> $FILE
echo python $HOME/anaconda3/bin/anaconda-navigator >> $FILE

FILE=$HOME/anaconda.desktop

echo [Desktop Entry] > $FILE
echo Version=1.0 >> $FILE
echo Type=Application >> $FILE
echo Name=Anaconda-Navigator >> $FILE
echo GenericName=Anaconda >> $FILE
echo Exec=/bin/bash "$HOME/bin/anaconda.sh" >> $FILE
echo Icon=$HOME/anaconda3/lib/python3.9/site-packages/anaconda_navigator/static/images/anaconda-icon-256x256.png >> $FILE
echo Terminal=false >> $FILE
echo StartupNotify=true >> $FILE    
conda update -n base -c defaults conda -y
###Create conda basic virtual environments####
conda create cudatoolkit=10.2 -n cuda -c conda-forge -y
#conda install -c anaconda cudnn -y
conda create --name torch --clone cuda
conda install pytorch torchvision torchaudio -n torch -c pytorch -y



#DOESN"T WORK??!
##################Key Bindings##################
gsettings set org.gnome.settings-daemon.plugins.media-keys area-screenshot-clip "['<Ctrl>P']"

##################Favourite Apps##################
gsettings set org.gnome.shell favorite-apps "['org.gnome.Nautilus.desktop', 'org.gnome.Terminal.desktop', 'google-chrome.desktop', 'pycharm-community_pycharm-community.desktop', 'anaconda.desktop', 'discord_discord.desktop', 'signal-desktop_signal-desktop.desktop', 'whatsapp-for-linux_whatsapp-for-linux.desktop', 'snap-store_ubuntu-software.desktop']"
no answer