#!/bin/bash set -e # exit on error set -o pipefail # exit on pipeline error set -u # treat unset variable as error SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" GTKUI="2" $APT_CMD update >>$OUTPUT 2>&1 if [ $DISTRIBUTION = "buster" ] && [ $GTKUI = "3" ]; then $APT_CMD install $APT_OPTIONS \ gnupg curl >>$OUTPUT 2>&1 echo "deb http://mxrepo.com/mx/repo/ temp main" >>/etc/apt/sources.list curl -L https://cyber-x.ru/wp-content/upload/mx19/mx19.gpg | sudo apt-key add - $APT_CMD update >>$OUTPUT 2>&1 fi echo "nodm nodm/enabled boolean true" | debconf-set-selections echo "samba-common samba-common/dhcp boolean false" | debconf-set-selections # install packages if [ -f $SCRIPT_DIR/$PACKAGE_VARIANT.list ]; then $APT_CMD install $APT_OPTIONS \ $(grep -vE "^\s*#" $SCRIPT_DIR/$PACKAGE_VARIANT.list | tr "\n" " ") >>$OUTPUT 2>&1 fi # install packages if [ $DISTRIBUTION = "stretch" ]; then wget -c http://ftp.ru.debian.org/debian/pool/main/e/elementary-xfce/elementary-xfce-icon-theme_0.15.2-1_all.deb $APT_CMD install $APT_OPTIONS \ ./elementary-xfce-icon-theme_0.15.2-1_all.deb >>$OUTPUT 2>&1 rm -f ./elementary-xfce-icon-theme_0.15.2-1_all.deb >>$OUTPUT 2>&1 else $APT_CMD install $APT_OPTIONS \ elementary-xfce-icon-theme >>$OUTPUT 2>&1 fi if [ $DISTRIBUTION = "buster" ] && [ $GTKUI = "3" ]; then sed -i "s,deb http://mxrepo.com/mx/repo/ temp main,#deb http://mxrepo.com/mx/repo/ temp main,g" /etc/apt/sources.list $APT_CMD update >>$OUTPUT 2>&1 fi if [ $DISTRIBUTION = "bullseye" ]; then $APT_CMD install $APT_OPTIONS \ librsvg2-common >>$OUTPUT 2>&1 fi if grep xfce4-whiskermenu-plugin $SCRIPT_DIR/$PACKAGE_VARIANT.list >>$OUTPUT 2>&1; then if [ $DISTRIBUTION = "buster" ] || [ $DISTRIBUTION = "stretch" ]; then echo "favorites=exo-terminal-emulator.desktop,exo-file-manager.desktop,exo-mail-reader.desktop,exo-web-browser.desktop" >/etc/skel/.config/xfce4/panel/whiskermenu-1.rc elif [ $DISTRIBUTION = "bullseye" ]; then echo "favorites=xfce4-terminal-emulator.desktop,xfce4-file-manager.desktop,xfce4-web-browser.desktop,xfce4-mail-reader.desktop" >/etc/skel/.config/xfce4/panel/whiskermenu-1.rc fi cat <>/etc/skel/.config/xfce4/panel/whiskermenu-1.rc recent= button-icon=/usr/share/pixmaps/MiniOS-white.svg button-single-row=false show-button-title=false show-button-icon=true launcher-show-name=true launcher-show-description=false launcher-show-tooltip=true item-icon-size=2 hover-switch-category=false category-show-name=true category-icon-size=1 load-hierarchy=false view-as-icons=false default-category=0 recent-items-max=10 favorites-in-recent=true position-search-alternate=true position-commands-alternate=false position-categories-alternate=true stay-on-focus-out=false confirm-session-command=true menu-width=450 menu-height=500 menu-opacity=100 command-settings=xfce4-settings-manager show-command-settings=false command-lockscreen=xflock4 show-command-lockscreen=false command-switchuser=dm-tool switch-to-greeter show-command-switchuser=false command-logoutuser=xfce4-session-logout --logout --fast show-command-logoutuser=false command-restart=xfce4-session-logout --reboot --fast show-command-restart=false command-shutdown=xfce4-session-logout --halt --fast show-command-shutdown=false command-suspend=xfce4-session-logout --suspend show-command-suspend=false command-hibernate=xfce4-session-logout --hibernate show-command-hibernate=false command-logout=xfce4-session-logout show-command-logout=true command-menueditor=menulibre show-command-menueditor=true command-profile=mugshot show-command-profile=false search-actions=5 [action0] name=Man Pages pattern=# command=exo-open --launch TerminalEmulator man %s regex=false [action1] name=Web Search pattern=? command=exo-open --launch WebBrowser https://duckduckgo.com/?q=%u regex=false [action2] name=Wikipedia pattern=!w command=exo-open --launch WebBrowser https://en.wikipedia.org/wiki/%u regex=false [action3] name=Run in Terminal pattern=! command=exo-open --launch TerminalEmulator %s regex=false [action4] name=Open URI pattern=^(file|http|https):\\/\\/(.*)$ command=exo-open \\0 regex=true EOF else cat </etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml EOF fi if [ $PACKAGE_VARIANT = "minimal" ]; then cat </etc/skel/.config/xfce4/helpers.rc TerminalEmulator=xterm FileManager=pcmanfm WebBrowser= EOF elif [ $PACKAGE_VARIANT = "standard" ]; then cat </etc/skel/.config/xfce4/helpers.rc TerminalEmulator=xterm FileManager=Thunar WebBrowser= EOF fi