This is a SH/DASH script which can be used to fully prepare Linux Mint 17.3 Mate install for use by the common person. The goal is to prepare a older PC with atleast 768-1024MB RAM, P4 CPU which can be used in projects to be given away to schools or people with no money for modern PC. Linux Mint 17.3 Mate is a good replacement for XP. It will still allow you to use Email, Youtube, Flash Games and most normal web activities. Also Teamviewer is available for remote support. Almost no knowledge is needed to prepare a Mint install when using this script. The only requirements are: Get a Mint 17.3 Mate ISO, install it on your HDD, make the script executeable and run the script, done (well perhaps you want to use 'mintdrivers' for your VGA). Usage: Spoiler The script will accept 1 switch. The switch: --nosudo Using this switch will allow the script to only run on the current user, as long as it is not run with or as SUDO (Super User) To make the script executeable, run in a terminal: Code: chmod +x "YOURFILE" Replace "YOURFILE" by the location of your script. Now just doubleclick the script or run from terminal with or without sudo. Input your password (it will be hidden while typing) and press enter. Now enjoy the spectacle and hope everything works correctly. Notes: Spoiler Do not run as ROOT, the script may will not work correctly and warn you. I restricted the script to only run on Mint 17.3 with Mate with Internet connection. If any errorcode is generated by a application other than 0, the script will exit with a warning (usually anything other than than 0 is program error). Compiz settings are made Read-Only since Mint decided to switch from Flat-File to Dconf for config settings, but some settings do not work properly. They also added a reset button in 'MintDesktop'. So the script will assume generally liked settings and make flat-file config read-only to prevent less knowledgeable people ruining the Compiz settings. You can remove this if you want, by making '~/.config/compiz-1/compizconfig' and files inside writeable, edit '~/profile' and delete '~/.compiz_config_ro'. Do these also in '/etc/skel'. You could also edit out these part from script before executing. If you want to know what the script does, just look at it, it have commented each section. The script should be easily readable, it is not rocket science or assembly The script runs in 3 parts. Super User, Current User and a section for Both. Settings are also applied to '/etc/skel' folder. So when you create a new user, the skeleton folder ia copied with the settings to new user accounts. While Linux Mint is already pretty secure after using this script, you should still regulary update your system using mintUpdate or 'sudo apt-get dist-upgrade'. No system is invurnable (not till our Skynet overlords rule over us). Especially with super complex inferior human written buggy multiplatform mediacontent HTML/CSS/JAVASCRIPT viewers Code: Spoiler Filename: installscript_linuxmint-17.3-mate-dvd-32bit.sh Code: #!/bin/sh ### Create variable for embed Tab in Heredocs TAB="$(printf '\t')" ### Create function for sudof which will give warning if no SUDO privileges sudof() { sudo $@ || printf '\n%s\n%s\n' \'No SUDO privileges acquired,' \'I will still try, but what can be done is limited.'} ### Create function for exitf which will allow exit without EXIT signal trapping exitf() { trap - EXITexit "$1"} ### Checks to trap errors and display helpful info to the user or catch some bugs set -o errexit USER_ERR() { printf '\n%s\n%s\n' \'The script got a "INTERRUPT" signal and ended probably incorrectly.' \'I recommend you restart the script and let me finish or you may have a bad time.'read -r usererrexitf 1} PROG_ERR() { if ! ping -c 1 google.com >/dev/null; thenprintf '\n%s\n%s\n' \'I was unable to reach the internet AND I catched a error, thus I stopped.' \'Check your LAN cable and internet settings, then try restart the script.'elseprintf '\n%s\n%s\n' \'A wild error appeared, thus I stopped.' \'Please correct the problem, then restart the script or you may have a bad time.'firead -r progerrexitf 1} trap 'USER_ERR' INT trap 'PROG_ERR' EXIT ### Check for internet connection, else try to fix and test again, else fail and exit until ping -c 1 google.com >/dev/null; do if [ "$RETRY" = '1' ]; thenprintf '\n%s\n%s\n' \'I was unable to reach the internet, thus I stopped.' \'Check your LAN cable and internet settings, then try restart the script.'read -r nointernetexitf 1fiprintf '\n%s\n%s\n\n' \'Warning, No internet connection detected.' \'I will try and see what I can do to fix it.'sudof dns-fixnmcli nm enable falsenmcli nm enable trueRETRY='1'done ### Check to prevent running the script on the wrong Linux distros or versions if ! lsb_release -rs | grep -q '17.3' || ! ps -e | grep -q '^.* mate-panel$'; then printf '%s\n' 'Error, this script is written to run on "Linux Mint 17.3 with Mate", thus I stopped.'read -r wrongdistmateexitf 1fi ### Check if run by root, if not, ask for sudo. If pure root (not sudo), exit ### If given option '--nosudo' to script, only run under current user if [ "$(id -u)" -ne 0 ]; then if [ "$1" != '--nosudo' ]; thenprintf '%s\n' 'Please run this script with SUDO user'sudo "$0" || trueexitf 0else#### Everything here will run in only current userUSERDIR="$HOME"CONFIG="$USERDIR/.config"LOCAL="$USERDIR/.local/share"## Preconfigure user settings.cd "$USERDIR"## Place shortcuts on desktop( cd '/usr/share/applications/'cp --target-directory="$(xdg-user-dir DESKTOP)" \'firefox.desktop' \'libreoffice-startcenter.desktop' \'pinta.desktop' \"$(find teamviewer*.desktop)" \'vlc.desktop')find $(xdg-user-dir DESKTOP)/*.desktop -maxdepth 1 -type f -exec chmod +x '{}' \;( cd '.config'while :; do## Check if writeable dconf/user file or writeable dconf folder and empty, else failif ( [ -f 'dconf/user' ] && [ -w 'dconf/user' ] ) || ( [ -w 'dconf/' ] && ! [ -e 'dconf/user' ] ); thengsettings set org.mate.peripherals-touchpad 'horiz-scroll-enabled' 'true'gsettings set org.mate.peripherals-touchpad 'tap-to-click' 'true'gsettings set org.mate.power-manager 'action-critical-battery' 'suspend'gsettings set org.mate.power-manager 'button-lid-ac' 'blank'gsettings set org.mate.power-manager 'button-lid-battery' 'blank'gsettings set org.mate.caja.desktop 'trash-icon-visible' 'true' gsettings set org.mate.caja.desktop 'computer-icon-visible' 'false' gsettings set org.mate.background 'picture-filename' '/usr/share/backgrounds/linuxmint-rosa/ether_clouds_life.jpg'gsettings set org.mate.background 'picture-options' 'stretched'gsettings set org.mate.Marco.general 'num-workspaces' '1'gsettings set org.mate.Marco.general 'compositing-manager' 'false'gsettings set com.linuxmint.desktop 'mate-window-manager' 'marco'gsettings set org.mate.Marco.global-keybindings 'run-command-1' '<Control><Shift>Escape'gsettings set org.mate.Marco.keybinding-commands 'command-1' 'mate-system-monitor'gsettings set org.mate.lockdown 'disable-lock-screen' 'true'gsettings set org.mate.interface 'gtk-theme' 'Mint-X-Brown'gsettings set org.mate.interface 'icon-theme' 'Mint-X-Brown'if [ -f '/usr/share/applications/run-dialog.desktop' ]; thengsettings set org.mate.panel 'show-program-list' 'true'fiif [ -f '/usr/share/mate-panel/layouts/custom01.layout' ]; thengsettings set org.mate.panel 'default-layout' 'custom01'gsettings set org.mate.Marco.global-keybindings 'panel-main-menu' 'Super_L'mate-panel --resetfigsettings set org.gnome.DejaDup 'exclude-list' "['\$TRASH']"dconf reset -f '/org/mate/terminal/profiles/default/'breakfi## If dconf database not writeable, try restore permission and owner, then retry, else skipif [ "$RETRY" = '1' ]; thenprintf '%s\n' 'Failed to restore permission and owner on dconf database or perhaps not a file?'read -r umadbreakfiprintf '\n%s\n%s\n%s\n%s\n%s\n\n' \'Warning, your dconf database is not writeable!' \'current permissions are:' \"$USERDIR/dconf/: '$(stat --format 'Owner:%U Perm:%a' 'dconf/')'" \"$USERDIR/dconf/user: '$(stat --format 'Owner:%U Perm:%a' 'dconf/user')'" \'I will try and see what I can do to fix it.'sudof chown -R "$(id -un)" 'dconf/'chgrp -R "$(id -un)" 'dconf/'chmod 700 'dconf/'if [ -f 'dconf/user' ]; thenchmod 600 'dconf/user'fiRETRY='1'done)fielif [ -z "$SUDO_USER" ]; then printf '%s\n' 'This script should be run from a SUDO user, not pure root.'exitf 1else #### Everything here will run in only SUDO userUSERDIR='/etc/skel'CONFIG="$USERDIR/.config"LOCAL="$USERDIR/.local/share"## Enable firewallufw enable## Disable Eula screen of ttf mscorefonts fonts packagedebconf-set-selections <<- 'END'ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select truettf-mscorefonts-installer msttcorefonts/present-mscorefonts-eula noteEND## Enable install dpkg recommended packagesif [ -f '/etc/apt/apt.conf.d/00recommends' ]; thenmv -v '/etc/apt/apt.conf.d/00recommends' '/etc/apt/apt.conf.d/00recommends.disabled' >/dev/nullfi## Refresh and cleanup package cache and reconfigure any partially installed or broken packagesapt-get updateapt-get autocleandpkg --configure -a## Create function for apt-get and DPKG options so command can be easily reusedSILAPT() {DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Progress-Fancy="1" -o Dpkg::Progress-Fancy::Progress-Bg="%1b[0m" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" $@}## Install softwares, purge some useless(my opinion) and upgrade all packagesSILAPT install rkhunter openshot openshot-doc frei0r-plugins cheese xfburn pinta quadrapassel mahjongg glchess gnect gnotravex gnome-sudoku gnomine aisleriot dconf-tools apparmor apparmor-profiles apparmor-utils gufw onboard gparted hardinfo deja-dup exfat-fuse exfat-utils ttf-mscorefonts-installer seahorse-nautilus app-install-data linux-firmware-nonfree language-pack-gnome-nl-base language-pack-gnome-nl language-pack-nl-base language-pack-nl firefox-locale-nl thunderbird-locale-nl thunderbird-locale-en libreoffice-l10n-nl libreoffice-help-nl myspell-nlSILAPT autoremove --purge mint-search-addon mint-stylish-addon totem-mozilla icedtea-netx-common banshee brasero pidgin mintwelcome mintbackup mintupload mint-backgrounds-rafaela gimp gimp-data gimp-help-en gimp-help-nl gimp-help-common libgimp2.0SILAPT dist-upgrade## Re/install Teamviewer if not installed or version different from online downloadTMVER="$(dpkg -s teamviewer 2>&1 | grep "Version" | cut -d' ' -f2)"if [ -z "$TMVER" ] || ! wget --spider -S 'http://download.teamviewer.com/download/teamviewer_i386.deb' 2>&1 | grep -q "$TMVER"; thencd '/tmp'wget -O 'teamviewer_linux.deb' 'http://download.teamviewer.com/download/teamviewer_i386.deb'if [ -n "$TMVER" ]; thenSILAPT autoremove --purge teamviewerfigdebi -n teamviewer_linux.debfi## Cleanup leftover packagesapt-get cleanRESDPACK="$(dpkg --get-selections | grep deinstall | cut -f1)"if [ -n "$RESDPACK" ]; thendpkg --purge $RESDPACKficd '/usr/share'## Create custom Mate-Panel layout that feels more like win 98cat > 'mate-panel/layouts/custom01.layout' <<- 'END'[Toplevel bottom]expand=trueorientation=bottomsize=24 [Object menu]object-type=menutoplevel-id=bottomposition=0locked=true [Object show-desktop]object-type=appletapplet-iid=WnckletFactory::ShowDesktopApplettoplevel-id=bottomposition=10locked=true [Object separator]object-type=separatortoplevel-id=bottomposition=20locked=true [Object launcher-caja]object-type=launcherlauncher-location=/usr/share/applications/caja-browser.desktopmenu-path=applications:/toplevel-id=bottomposition=30locked=true [Object launcher-terminal]object-type=launcherlauncher-location=/usr/share/applications/mate-terminal.desktopmenu-path=applications:/toplevel-id=bottomposition=40locked=true [Object launcher-firefox]object-type=launcherlauncher-location=/usr/share/applications/firefox.desktopmenu-path=applications:/toplevel-id=bottomposition=50locked=true [Object window-list]object-type=appletapplet-iid=WnckletFactory::WindowListApplettoplevel-id=bottomposition=60locked=true [Object notification-area]object-type=appletapplet-iid=NotificationAreaAppletFactory::NotificationAreatoplevel-id=bottomposition=10panel-right-stick=truelocked=true [Object clock]object-type=appletapplet-iid=ClockAppletFactory::ClockApplettoplevel-id=bottomposition=0panel-right-stick=truelocked=trueEND## Create a menu entry for 'Run program'cat > 'applications/run-dialog.desktop' <<- 'END'[Desktop Entry]Version=1.0Name=Run program..Comment=Run an application by typing a command or choosing from a listName[nl]=Programma uitvoeren..Comment[nl]=Voer een programma uit via een commando of lijstExec=mate-panel --run-dialogIcon=gnome-runTerminal=falseType=ApplicationCategories=GTK;System;Utility;OnlyShowIn=MATE;END## Prevent WineMenuBuilder if exists from creating new Wine associations and menu entriesif [ -f 'wine/wine.inf' ]; thensed -i 's|winemenubuilder.exe -a -r|winemenubuilder.exe -r|' 'wine/wine.inf'fi## Preconfigure default user settings( cd 'glib-2.0/schemas'cat > 'mint-artwork-mate_custom01.gschema.override' <<- 'END'[org.mate.interface]gtk-theme='Mint-X-Brown'icon-theme='Mint-X-Brown' [org.mate.background]picture-filename='/usr/share/backgrounds/linuxmint-rosa/ether_clouds_life.jpg' [org.mate.caja.desktop]computer-icon-visible=falsetrash-icon-visible=true [org.mate.Marco.general]num-workspaces=1compositing-manager=false [org.mate.peripherals-touchpad]horiz-scroll-enabled=true [org.mate.Marco.keybinding-commands]command-1='mate-system-monitor' [org.mate.Marco.global-keybindings]run-command-1='<Control><Shift>Escape'panel-main-menu='Super_L' [org.mate.power-manager]action-critical-battery='suspend'button-lid-ac='blank'button-lid-battery='blank' [org.mate.lockdown]disable-lock-screen=true [org.mate.panel]show-program-list=true [com.linuxmint.desktop]mate-window-manager='marco' [org.gnome.DejaDup]exclude-list=['$TRASH'] [org.mate.terminal.profile]background-type='solid'ENDcat > 'mate-panel_custom01.gschema.override' <<- 'END'[org.mate.panel]default-layout='custom01'ENDglib-compile-schemas './')cd '/etc'## Enable all apparmor profiles and disable problematic onesif ! aa-status | grep -q '0 profiles are in complain mode.'; thenservice apparmor start( cd 'apparmor.d'find './' -maxdepth 1 -type f -exec aa-enforce '{}' \;aa-disable \'usr.bin.chromium-browser' \'usr.sbin.rsyslogd' \'usr.sbin.dnsmasq' \'usr.sbin.cupsd')fi## Preconfigure MDM to a GDM based theme (better for weak systems)if [ -f 'mdm/mdm.conf' ]; then( cd 'mdm'if grep -q 'Greeter=' 'mdm.conf'; thensed -i 's|Greeter=.*|Greeter=/usr/lib/mdm/mdmgreeter|' 'mdm.conf'elsesed -i '/\[daemon\]/a \\nGreeter=/usr/lib/mdm/mdmgreeter' 'mdm.conf'fiif grep -q 'GraphicalTheme=' 'mdm.conf'; thensed -i 's|GraphicalTheme=.*|GraphicalTheme=Arc-Dust-Userlist|' 'mdm.conf'elsesed -i '/\[greeter\]/a \\nGraphicalTheme=Arc-Dust-Userlist' 'mdm.conf'fi)for LIST in \'greeter/GraphicalTheme' \'daemon/Greeter'; doif [ -e "$LIST" ]; thenmdmflexiserver -l -c "UPDATE_CONFIG $LIST"fidonefi## Optimize swap usage for 1GB RAM systemscat > 'sysctl.d/custom01_swap-usage.conf' <<- 'END'# Decrease swap usage to a reasonable levelvm.swappiness=10# Improve cache managementvm.vfs_cache_pressure=50END## Refresh and update rkhunter file databaserkhunter --updaterkhunter --propupd#### This command will run this script in normal user with parameter --nosudosudo -Hu "$SUDO_USER" sh -c "'$0' --nosudo"fi #### Everything below here will run in both sudo and normal user cd "$USERDIR" ## Set age of recent used files in "recently-used.xbel" to 7 daysprintf '%s\n' 'gtk-recent-files-max-age=7' > '.gtkrc-2.0'## Configure profile startup script to make Compiz config folder read-only so mintdesktop can't ruin our settingsif ! grep -q 'compiz_config_ro' '.profile'; thencat >> '.profile' <<- END if [ -f "\$HOME/.compiz_ro_config" ]; then${TAB}. "\$HOME/.compiz_config_ro"fiENDficat > '.compiz_config_ro' <<- END# Set Compiz config folder to read-only so mintdesktop can't ruin our settingsif grep -q 'profile = custom01' "\$HOME/.config/compiz-1/compizconfig/config"; then${TAB}if [ -w "\$HOME/.config/compiz-1/compizconfig/config" ]; then${TAB}${TAB}chmod -R -w "\$HOME/.config/compiz-1/compizconfig"${TAB}fifiEND## Preconfigure Firefox settingsif [ -f '.mozilla/firefox/profiles.ini' ]; thenFIRDIR=".mozilla/firefox/$(sed -n '0,/Path=/{s|Path=||p}' '.mozilla/firefox/profiles.ini')"if [ -d "$FIRDIR" ]; then( cd "$FIRDIR"mkdir -p 'searchplugins'cat > 'searchplugins/google-ssl.xml' <<- 'END'<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/"><os:ShortName>Google SSL</os:ShortName><os:Description>Google SSL</os:Description><os:InputEncoding>UTF-8</os:InputEncoding><os:Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAAAAD0hUJK9IVC5/SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQuT0hUJK9IVC5vSFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC5/SFQv/0hUL/9IVC//SFQv/1jU7/+sir//7v5//95df/+9S9//vPtf/3oW7/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/+9jC//3s4f/1lFn/9IVC//SFQv/0iEb//NvH//eibv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//3u5f/5u5b/9IVC//SFQv/0hUL/9IVC//m6lP/707r/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/5vpv//N7M//SIR//0hUL/9IVC//WSV//97OH/+8+0//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//epev/6yKr/+byW//nCoP/+9O7//e3j//WSVv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SHRv/+9vH//OLT//WPUf/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//aeaf/5uZL////+//iwhf/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//m4kf//+/n/96h5//WNT//7zbL/9p9q//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/+9fD/+86z//SFQv/0hUL/96Rx//3r4P/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL//vby//iwhf/0hUL/9IVC//izif//+/j/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//rIqf/5vJf/9IVC//SGRP/95NX/+9a///SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hkT/+bqU//m7lv/84dD///79//rLr//3p3f/9IVC//SFQv/0hUL/9IVC//SFQub0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQub0hUJJ9IVC5vSFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQub0hUJJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</os:Image><SearchForm>https://www.google.com/</SearchForm><os:Url type="text/html" method="GET" template="https://www.google.com/search?q={searchTerms}" resultDomain="google.com"></os:Url><os:Url type="application/x-suggestions+json" method="GET" template="https://suggestqueries.google.com/complete/search?output=firefox&client=firefox&hl=en&q={searchTerms}" resultDomain="suggestqueries.google.com"></os:Url><os:Url type="application/opensearchdescription+xml" method="GET" template="http://mycroftproject.com/updateos.php/id0/google-com-ssl.xml" rel="self" resultDomain="mycroftproject.com"></os:Url></SearchPlugin>ENDPROFILE="$(basename "$FIRDIR")"PROVIDER='Google SSL'DISCLAIMER='By modifying this file, I agree that I am doing so only within Firefox itself, using official, user-driven search engine selection processes, and in a way which does not circumvent user consent. I acknowledge that any attempt to change this file from outside of Firefox is a malicious act, and will be responded to accordingly.'cat > 'search-metadata.json' <<- END{ "[global]": {$TAB"current": "$PROVIDER",$TAB"hash": "$(printf '%s' "$PROFILE$PROVIDER$DISCLAIMER" | openssl sha256 -binary | base64)" }}ENDfor LIST in \'browser.startup.homepage|"https://www.google.nl/"' \'general.smoothScroll|true' \'general.autoScroll|true' \'privacy.donottrackheader.enabled|true' \'signon.rememberSignons|false' \'datareporting.healthreport.uploadEnabled|false'\"browser.search.selectedEngine|\"$PROVIDER\"";doLIST1=$(echo $LIST | cut -d'|' -f1)LIST2=$(echo $LIST | cut -d'|' -f2)if grep -q "\"$LIST1\"" 'prefs.js'; thensed -i "s|.*\"$LIST1\".*|user_pref(\"$LIST1\", $LIST2);|" 'prefs.js'elseprintf "%s\n" "user_pref("$LIST1", $LIST2);" >> 'prefs.js'fidonemkdir -p 'extensions'wget -O 'extensions/uBlock0@raymondhill.net.xpi' 'https://addons.mozilla.org/firefox/downloads/latest/607454/addon-607454-latest.xpi')fifi( cd "$CONFIG"## Preconfigure Compiz Settingsif [ -d 'compiz-1/compizconfig' ]; thenchmod -R +w 'compiz-1/compizconfig'elsemkdir -p 'compiz-1/compizconfig'fi( cd 'compiz-1/compizconfig'cat > 'config' <<- 'END'[general]integration = trueprofile = custom01backend = iniENDcat > 'custom01.ini' <<- 'END'[core]s0_active_plugins = core;composite;crashhandler;opengl;compiztoolbox;decor;gnomecompat;mousepoll;ezoom;move;staticswitcher;regex;grid;resize;titleinfo;animation;s0_focus_prevention_match = !(class=Polkit-gnome-authentication-agent-1) & !(class=MintMenu.py)s0_outputs = 1920x975+0+0; [gnomecompat]s0_command_screenshot = mate-screenshots0_command_window_screenshot = mate-screenshot --windows0_command_terminal = mate-terminal [crashhandler]s0_wm_cmd = marco --replace [commands]s0_command20 = s0_run_command20_key = Disabled [ezoom]s0_zoom_in_button = <Control><Alt>Button4s0_zoom_in_key = <Control><Alt>equals0_zoom_out_key = <Control><Alt>minuss0_zoom_out_button = <Control><Alt>Button5s0_zoom_specific_1_key = <Control><Alt>0s0_follow_focus = false [grid]s0_top_left_corner_action = 7s0_top_right_corner_action = 9s0_bottom_left_corner_action = 1s0_bottom_right_corner_action = 3s0_bottom_edge_action = 2s0_outline_color = #84fb009fs0_fill_color = #74fb004fs0_put_center_key = Disableds0_put_restore_key = Disableds0_put_maximize_key = Disabled [resize]s0_border_color = #7dfb009fs0_fill_color = #8afb0019 [animation]s0_unminimize_effects = s0_unminimize_durations = s0_unminimize_matches = s0_unminimize_options = [cube]s0_top_color = #3c3c3cffs0_bottom_color = #3c3c3cffs0_skydome = trues0_skydome_gradient_start_color = #000000ffs0_skydome_gradient_end_color = #727272ff [expo]s0_expo_key = <Control><Alt>Ups0_reflection = trues0_selected_color = #000000ff [wall]s0_up_key = Disableds0_down_key = Disabled [wobbly]s0_snap_inverted = trueEND)if [ "$(id -u)" -ne 0 ]; thenchmod -R -w 'compiz-1/compizconfig'fi## Preconfigure Libreoffice file save settingsmkdir -p 'libreoffice/4/user'cat > 'libreoffice/4/user/registrymodifications.xcu' <<- 'END'<?xml version="1.0" encoding="UTF-8"?><oor:items xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><item oor:path="/org.openoffice.Setup/Office/Factories/org.openoffice.Setup:Factory['com.sun.star.presentation.PresentationDocument']"><prop oor:name="ooSetupFactoryDefaultFilter" oor:op="fuse"><value>MS PowerPoint 97</value></prop></item><item oor:path="/org.openoffice.Setup/Office/Factories/org.openoffice.Setup:Factory['com.sun.star.sheet.SpreadsheetDocument']"><prop oor:name="ooSetupFactoryDefaultFilter" oor:op="fuse"><value>MS Excel 97</value></prop></item><item oor:path="/org.openoffice.Setup/Office/Factories/org.openoffice.Setup:Factory['com.sun.star.text.TextDocument']"><prop oor:name="ooSetupFactoryDefaultFilter" oor:op="fuse"><value>MS Word 97</value></prop></item></oor:items>END## Preconfigure Mint Update managermkdir -p 'linuxmint'cat > 'linuxmint/mintUpdate.conf' <<- 'END'[general]hide_window_after_update = Falsehide_systray = Truedefault_repo_is_ok = True[levels]level1_visible = Truelevel2_visible = Truelevel3_visible = Truelevel4_visible = Falselevel5_visible = Falselevel1_safe = Truelevel2_safe = Truelevel3_safe = Truelevel4_safe = Falselevel5_safe = Falsesecurity_visible = Truesecurity_safe = True[refresh]refresh_days = 0refresh_hours = 0refresh_minutes = 5autorefresh_days = 0autorefresh_hours = 2autorefresh_minutes = 0[update]dist_upgrade = True[icons]busy = /usr/lib/linuxmint/mintUpdate/icons/base.svgup2date = /usr/lib/linuxmint/mintUpdate/icons/base-apply.svgupdates = /usr/lib/linuxmint/mintUpdate/icons/base-info.svgerror = /usr/lib/linuxmint/mintUpdate/icons/base-error2.svgunknown = /usr/lib/linuxmint/mintUpdate/icons/base.svgapply = /usr/lib/linuxmint/mintUpdate/icons/base-exec.svgEND## Create a menu entry for 'Run program' in 'System' menuif [ -f '/usr/share/applications/run-dialog.desktop' ]; thenmkdir -p 'menus'cat > 'menus/mate-settings.menu' <<- END<!DOCTYPE Menu PUBLIC '-//freedesktop//DTD Menu 1.0//EN' 'http://standards.freedesktop.org/menu-spec/menu-1.0.dtd'><Menu>${TAB}<Name>Desktop</Name>${TAB}<MergeFile type="parent">/etc/xdg/menus/mate-settings.menu</MergeFile>${TAB}<Include>${TAB}${TAB}<Filename>run-dialog.desktop</Filename>${TAB}</Include></Menu>ENDfi)## Preconfigure Wine associations and menu entriesmkdir -p "$LOCAL"( cd "$LOCAL"if [ -f 'applications/wine-extension-exe.desktop' ]; thenrm -f mime/packages/x-wine*rm -f applications/wine-extension*rm -f icons/hicolor/*/*/application-x-wine-extension*rm -f mime/application/x-wine-extension*fimkdir -p 'applications'( cd 'applications'## Configure VLC as default for Video and Audio filescat > 'mimeapps.list' <<- 'END'[Removed Associations]application/x-msi=wine.desktop;application/x-ms-dos-executable=mono-runtime-terminal.desktop;mono-runtime-common.desktop;wine.desktop;application/x-ms-shortcut=wine.desktop; [Default Applications]audio/mpeg=vlc.desktopaudio/x-mpegurl=vlc.desktopaudio/x-scpls=vlc.desktopaudio/x-vorbis+ogg=vlc.desktopaudio/x-wav=vlc.desktopvideo/mp4=vlc.desktopvideo/mpeg=vlc.desktopvideo/mp2t=vlc.desktopvideo/msvideo=vlc.desktopvideo/quicktime=vlc.desktopvideo/webm=vlc.desktopvideo/x-avi=vlc.desktopvideo/x-flv=vlc.desktopvideo/x-matroska=vlc.desktopvideo/x-mpeg=vlc.desktopvideo/x-ogm+ogg=vlc.desktopENDcat > 'wine-uninstaller.desktop' <<- 'END'[Desktop Entry]Exec=wine uninstallerHidden=trueName=Uninstall Wine SoftwareType=ApplicationENDcat > 'wine-winecfg.desktop' <<- 'END'[Desktop Entry]Exec=winecfgHidden=trueName=Configure WineType=ApplicationENDcat > 'wine-browsedrive.desktop' <<- 'END'[Desktop Entry]Exec=xdg-open .wine/dosdevices/c:Hidden=trueName=Browse C: DriveType=ApplicationENDcat > 'wine-notepad.desktop' <<- 'END'[Desktop Entry]Exec=notepadHidden=trueName=NotepadType=ApplicationEND)mkdir -p 'keyrings'cat > 'keyrings/login.keyring' <<- 'END'[keyring]display-name=custom01ctime=0mtime=0lock-on-idle=falselock-after=falseEND)## Delete bash command history cd "$HOME" if [ -f '.bash_history' ]; thenrm '.bash_history'fiexitf 0