sh GNOME 3安装后脚本
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh GNOME 3安装后脚本相关的知识,希望对你有一定的参考价值。
#!/bin/bash
# Set up .bashrc
cat >> ~/.bashrc <<EOL
# BEGIN franga2000's .bashrc stuff & things
# Aliases
alias ll='ls -alh'
alias l='ls -CF'
alias du='du -h'
alias df='df -h'
alias free='free -h'
alias wget='http -d'
# Colored manpages
man() {
LESS_TERMCAP_md=$'\e[01;31m' \
LESS_TERMCAP_me=$'\e[0m' \
LESS_TERMCAP_se=$'\e[0m' \
LESS_TERMCAP_so=$'\e[01;44;33m' \
LESS_TERMCAP_ue=$'\e[0m' \
LESS_TERMCAP_us=$'\e[01;32m' \
command man "$@"
}
EOL
. ~/.bashrc
# Install must-haves
sudo apt install -y -m lm-sensors htop httpie gdebi gnome-exe-thumbnailer
# Configure programs
## Nautilus
### Sort dirs before files
dconf write /org/gnome/nautilus/preferences/sort-directories-first true
### Allow running text files
dconf write /org/gnome/nautilus/preferences/executable-text-activation 'ask'
## GEdit
### Display line numbers
dconf write /org/gnome/gedit/preferences/editor/display-line-numbers true
### Highlight current line
dconf write /org/gnome/gedit/preferences/editor/highlight-current-line true
### 4-column tabs
dconf write /org/gnome/gedit/preferences/editor/tabs-size 4
### Highlight matching brackets
dconf write /org/gnome/gedit/preferences/editor/bracket-matching true
### Auto-indent
dconf write /org/gnome/gedit/preferences/editor/auto-indent true
## Enable VIM syntax highlighting
sudo sh -c 'echo syntax on >> /etc/vim/vimrc'
# Setup 'New file' templates
cd ~/Templates/
touch Text\ file.txt
echo -e '#!/bin/bash\n' > Bash\ script.sh
chmod +x Bash\ script.sh
# Install extensions (currenty just opens links in FF)
firefox -new-tab -url https://extensions.gnome.org/extension/18/native-window-placement/ \
-new-tab -url https://extensions.gnome.org/extension/826/suspend-button/ \
-new-tab -url https://extensions.gnome.org/extension/841/freon/ \
-new-tab -url https://extensions.gnome.org/extension/1004/public-ip-address/ \
-new-tab -url https://extensions.gnome.org/extension/923/ping-indicator/ \
-new-tab -url https://extensions.gnome.org/extension/921/multi-monitors-add-on/ \
-new-tab -url https://extensions.gnome.org/extension/826/suspend-button/ \
-new-tab -url https://extensions.gnome.org/extension/906/sound-output-device-chooser/ \
-new-tab -url https://extensions.gnome.org/extension/905/refresh-wifi-connections/ \
-new-tab -url https://extensions.gnome.org/extension/55/media-player-indicator/
以上是关于sh GNOME 3安装后脚本的主要内容,如果未能解决你的问题,请参考以下文章
sh 1604安装程序gnome v1
sh 如何正确安装python Selenium(在ubuntu gnome上测试)
Ubuntu Desktop下自动启动终端并运行脚本
sh 将Gnome终端降级至3.6.2
在 Ubuntu 中为 GNOME 3 创建应用程序启动器
脚本执行后避免 gnome-terminal 关闭?