|
|
@ -19,11 +19,11 @@ PGKNAME='openssh-server' |
|
|
|
runVoid dpkg-query --status $PGKNAME |
|
|
|
if [ $? -ne 0 ] ; then |
|
|
|
set -e |
|
|
|
pkexec apt install $PGKNAME |
|
|
|
pkexec /opt/debian-bash/tools/append_or_replace "^#\?PermitRootLogin.*$" "PermitRootLogin no" /etc/ssh/sshd_config |
|
|
|
pkexec /opt/debian-bash/tools/append_or_replace "^#\?PasswordAuthentication.*$" "PasswordAuthentication no" /etc/ssh/sshd_config |
|
|
|
pkexec /opt/debian-bash/tools/append_or_replace "^#\?AllowUsers.*$" "AllowUsers $ALLOWED_USERS" /etc/ssh/sshd_config |
|
|
|
pkexec systemctl restart sshd |
|
|
|
sudo apt install $PGKNAME |
|
|
|
sudo /opt/debian-bash/tools/append_or_replace "^#\?PermitRootLogin.*$" "PermitRootLogin no" /etc/ssh/sshd_config |
|
|
|
sudo /opt/debian-bash/tools/append_or_replace "^#\?PasswordAuthentication.*$" "PasswordAuthentication no" /etc/ssh/sshd_config |
|
|
|
sudo /opt/debian-bash/tools/append_or_replace "^#\?AllowUsers.*$" "AllowUsers $ALLOWED_USERS" /etc/ssh/sshd_config |
|
|
|
sudo systemctl restart sshd |
|
|
|
set +e |
|
|
|
else |
|
|
|
echo "${PGKNAME} already installed!" |
|
|
@ -34,10 +34,10 @@ if [[ ! /usr/local/bin/firefox -ef /opt/firefox/firefox ]];then |
|
|
|
set -e |
|
|
|
cd /tmp |
|
|
|
wget `curl 'https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-US' | cut -d '"' -f2` -O firefox-latest.tar.bz2 |
|
|
|
pkexec mkdir /opt/firefox -p |
|
|
|
pkexec chown $USER /opt/firefox |
|
|
|
sudo mkdir /opt/firefox -p |
|
|
|
sudo chown $USER /opt/firefox |
|
|
|
tar -xjf firefox-latest.tar.bz2 -C /opt |
|
|
|
cat <<EOF | pkexec tee -a /usr/share/applications/firefox-stable.desktop |
|
|
|
cat <<EOF | sudo tee -a /usr/share/applications/firefox-stable.desktop |
|
|
|
[Desktop Entry] |
|
|
|
Name=Firefox Stable |
|
|
|
Comment=Web Browser |
|
|
@ -50,26 +50,59 @@ MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vn |
|
|
|
StartupNotify=true |
|
|
|
StartupWMClass=Firefox |
|
|
|
EOF |
|
|
|
pkexec ln -s /opt/firefox/firefox /usr/local/bin/firefox |
|
|
|
pkexec update-alternatives --install /usr/bin/x-www-browser x-www-browser /opt/firefox/firefox 200 && sudo update-alternatives --set x-www-browser /opt/firefox/firefox |
|
|
|
pkexec apt remove firefox-esr |
|
|
|
sudo ln -s /opt/firefox/firefox /usr/local/bin/firefox |
|
|
|
sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /opt/firefox/firefox 200 && sudo update-alternatives --set x-www-browser /opt/firefox/firefox |
|
|
|
sudo apt remove firefox-esr |
|
|
|
set +e |
|
|
|
else |
|
|
|
echo "firefox latest already installed!" |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# ublock origin |
|
|
|
MOZILLA_GLOBAL_ADDONS_FOLDER="/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" |
|
|
|
UBLOCK_ADDON="uBlock0@raymondhill.net" |
|
|
|
if [[ ! -d "${MOZILLA_GLOBAL_ADDONS_FOLDER}/${UBLOCK_ADDON}" ]]; then |
|
|
|
UBLOCK_URL=$(curl -s https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/ | grep -Poe "\"https://addons\.mozilla\.org/firefox/downloads/file.*?\"" | cut -d'"' -f2) |
|
|
|
wget ${UBLOCK_URL} -O /tmp/ublock_origin.xpi |
|
|
|
mkdir -p ${MOZILLA_GLOBAL_ADDONS_FOLDER}/${UBLOCK_ADDON} |
|
|
|
pkexec unzip /tmp/ublock_origin.xpi -d ${MOZILLA_GLOBAL_ADDONS_FOLDER}/${UBLOCK_ADDON}/ |
|
|
|
sudo mkdir -p ${MOZILLA_GLOBAL_ADDONS_FOLDER}/${UBLOCK_ADDON} |
|
|
|
sudo unzip /tmp/ublock_origin.xpi -d ${MOZILLA_GLOBAL_ADDONS_FOLDER}/${UBLOCK_ADDON}/ |
|
|
|
else |
|
|
|
echo "ublock origin already installed!" |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## gnome settings |
|
|
|
gsettings set org.gnome.shell favorite-apps "['org.gnome.Nautilus.desktop','firefox-stable.desktop','org.gnome.Software.desktop']" |
|
|
|
gsettings set org.gnome.settings-daemon.peripherals.keyboard remember-numlock-state true |
|
|
|
gsettings set org.gnome.desktop.interface clock-show-date true |
|
|
|
gsettings set org.gnome.nautilus.preferences click-policy 'single' |
|
|
|
gsettings set org.gnome.shell.overrides dynamic-workspaces false |
|
|
|
gsettings set org.gnome.desktop.wm.preferences num-workspaces 1 |
|
|
|
|
|
|
|
## gnome extension system-monitor |
|
|
|
runVoid dpkg-query --status gnome-shell-extension-system-monitor |
|
|
|
if [ $? -ne 0 ] ; then |
|
|
|
set -e |
|
|
|
sudo apt install gnome-shell-extension-system-monitor |
|
|
|
sudo cp /usr/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com/schemas/*.gschema.xml /usr/share/glib-2.0/schemas/ |
|
|
|
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/ |
|
|
|
gnome-shell-extension-tool -e system-monitor@paradoxxx.zero.gmail.com |
|
|
|
gnome-shell-extension-tool -r system-monitor@paradoxxx.zero.gmail.com |
|
|
|
|
|
|
|
gsettings set org.gnome.shell.extensions.system-monitor show-tooltip true |
|
|
|
gsettings set org.gnome.shell.extensions.system-monitor cpu-show-text false |
|
|
|
gsettings set org.gnome.shell.extensions.system-monitor cpu-graph-width 60 |
|
|
|
gsettings set org.gnome.shell.extensions.system-monitor memory-display false |
|
|
|
gsettings set org.gnome.shell.extensions.system-monitor net-display true |
|
|
|
gsettings set org.gnome.shell.extensions.system-monitor net-style digit |
|
|
|
gsettings set org.gnome.shell.extensions.system-monitor icon-display false |
|
|
|
gsettings set org.gnome.shell.extensions.system-monitor disk-display false |
|
|
|
|
|
|
|
set +e |
|
|
|
else |
|
|
|
echo "gnome-shell-extension-system-monitor installed!" |
|
|
|
fi |
|
|
|
|
|
|
|
|