Post installation script Linux Mint

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
West_Training_8668
Level 2
Level 2
Posts: 71
Joined: Tue Mar 29, 2016 8:41 am

Post installation script Linux Mint

Post by West_Training_8668 »

https://github.com/arturojosejr/post-in ... er/install

I'll be editing this as I can figure out how to do each step. Any help is appreciated.

confi

Code: Select all

#!/bin/bash -x
# Settings
# https://sites.google.com/site/easylinuxtipsproject/mint-cinnamon-first
# https://forums.linuxmint.com/viewtopic.php?f=213&t=223775&p=1178781#p1178781
# http://pastebin.com/1jx3Sr1A
# http://blog.self.li/post/74294988486/creating-a-post-installation-script-for-ubuntu
# TODO list at the end

clear
echo "Change directory permisions in home folder"
echo "========================================================================"
find ~ -type d -perm 777 -print -exec chmod 755 {} \;

clear
echo "Install xflux"
echo "========================================================================"
mkdir -p ~/bin
cd ~/bin
if [ ! -f ~/bin/xflux ]; then
    wget https://justgetflux.com/linux/xflux64.tgz
    tar zxvf xflux64.tgz
    rm xflux64.tgz
    mv xflux ~/bin
    # https://en.wikipedia.org/wiki/Color_temperature
    # temperature 2000-10000
    xflux -l 36.7 -g -4.5 -k 2000
    # hong kong xflux -l 22 -g 114 -k 2000
    # us xflux -l -38 -g -122 -k 2000
fi

clear
echo "Basic update"
echo "========================================================================"
sudo apt update && sudo apt-get -y upgrade
echo "========================================================================"

clear
echo "Removing packages"
echo "========================================================================"
sudo apt-get -y remove openjdk-8-*
sudo apt-get -y remove pidgin hexchat thunderbird banshee brasero simple-scan
sudo apt-get -y purge pidgin hexchat thunderbird banshee brasero simple-scan
echo "========================================================================"

clear
echo "Installing packages"
echo "========================================================================"
sudo apt-get -y install vim git audacity virtualbox dropbox keepassx dconf-cli \
fonts-hack-ttf unattended-upgrades
echo "========================================================================"

#### Install vim configuration
if [[ ! -f ~/.vimrc  &&  ! -d ~/.vim ]]; then
    clear
    echo "Installing vim configuration"
    echo "========================================================================"
    git clone https://github.com/arturojosejr/vim
    mkdir ~/.vim
    mv vim/bundle vim/vimrc ~/.vim
    rm -rf vim
    git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
    #https://coderwall.com/p/etzycq/vundle-plugininstall-from-shell
    vim -c 'PluginInstall' -c 'qa!'
    echo "========================================================================"
fi
################################################################################

#### Startup scripts
# http://askubuntu.com/questions/814/how-to-run-scripts-on-start-up
# http://askubuntu.com/questions/228304/how-do-i-run-a-script-at-start-up
# http://superuser.com/questions/685471/how-can-i-run-a-command-after-boot
if [[ ! -f /etc/init.d/mystartup.sh ]]; then
    clear
    echo "Creating xflux startup script"
    echo "========================================================================"
    echo "#!/bin/bash" | sudo tee -a /etc/init.d/mystartup.sh
    echo "xflux -l 36.7 -g -4.5 -k 2000" | sudo tee -a /etc/init.d/mystartup.sh
    sudo chmod +x /etc/init.d/mystartup.sh
    sudo update-rc.d mystartup.sh defaults 100
    echo "========================================================================"
fi
################################################################################

#### Unattended upgrades
  # https://forums.linuxmint.com/viewtopic.php?f=42&t=202715
  # https://forums.linuxmint.com/viewtopic.php?t=169580
  # if the file already exists uncomment the second line if not, create it

  # https://community.linuxmint.com/tutorial/view/1217
  if [[ ! -f /etc/apt/apt.conf.d/50unattended-upgrades.bak ]]; then
      clear
      echo "Unattended upgrades"
      echo "========================================================================"
      sudo cp /etc/apt/apt.conf.d/50unattended-upgrades /etc/apt/apt.conf.d/50unattended-upgrades.bak
      sudo sed -i '3s#^#//#' /etc/apt/apt.conf.d/50unattended-upgrades
      echo -e "\nUnattended-Upgrade::Origins-Pattern {
          \"o=Ubuntu,a=xenial-security\";
          \"o=Ubuntu,a=xenial-updates\";
          \"o=Ubuntu,a=xenial\";
          \"o=Canonical,a=xenial\";
          \"o=linuxmint,n=sarah\";
      };" | sudo tee --append /etc/apt/apt.conf.d/50unattended-upgrades
      if [[ ! -f /etc/apt/apt.conf.d/20auto-upgrades.bak ]]; then
          sudo cp /etc/apt/apt.conf.d/20auto-upgrades /etc/apt/apt.conf.d/20auto-upgrades.bak
          sudo rm /etc/apt/apt.conf.d/20auto-upgrades
          echo "APT::Periodic::Update-Package-Lists \"1\";
          APT::Periodic::Download-Upgradeable-Packages \"1\";
          APT::Periodic::AutocleanInterval \"30\";
          APT::Periodic::Unattended-Upgrade \"1\";" | sudo tee --append /etc/apt/apt.conf.d/20auto-upgrades
      fi
      echo "========================================================================"
  fi
################################################################################

# Install jDownloader
if [[ ! -d ~/Downloads/jd2 ]]; then
    clear
    echo "Installing jDownloader"
    echo "========================================================================"
    cd ~/bin
    bash JD2Setup_x64.sh
    echo "========================================================================"
fi

# Katoolin isn't working in Linux Mint
# https://forums.linuxmint.com/viewtopic.php?t=215842
# https://forums.linuxmint.com/viewtopic.php?t=223237
# if [ ! -f /usr/bin/katoolin ]; then
#     sudo su
#     git clone https://github.com/LionSec/katoolin.git && cp katoolin/katoolin.py /usr/bin/katoolin
#     chmod +x /usr/bin/katoolin
#     sudo katoolin
#     exit
# fi

clear
read -p "Do you want to install CS50 appliance tools? "
if [[ $REPLY =~ ^([Yy]|[Yy][Ee][Ss]| |)$ ]]; then
    echo "Installing CS50 tools"
    echo "========================================================================"
    read -p "32 or 64 bits: "
    if [[ "$REPLY" == "32" ]]; then
        cs50 32
    elif [[ "$REPLY" == "64" ]]; then
        cs50 64
    fi
    echo "========================================================================"
fi

#### dconf settings
clear
echo "Configuring system settings"
dconf-settings
echo "========================================================================"

#### Firefox settings (manual)
  # default search engine
  # https://www.linuxmint.com/searchengines.php
  # change search settings -> add google

  # add addblock to firefox
  # http://askubuntu.com/questions/73474/how-to-install-firefox-addon-from-command-line-in-scripts

  # change homepage
  # https://support.mozilla.org/en-US/questions/968367
  # 1. Type the following into your address bar: about:config
  # 2. Say you understand about the "voiding of the warranty"
  # 3. Search for the string "keyword.URL"
  # 4. Set the value to: https://www.google.com/#safe=active&output=search&sclient=psy-ab&q=
  # http://unix.stackexchange.com/questions/93795/how-to-set-firefox-homepage-from-terminal
  # grep browser.startup.homepage .mozilla/firefox/*.default/prefs.js
  # user_pref("browser.startup.homepage", "http://www.google.com");

  # change browser search country code and region
  # in about:config
  # browser.search.countryCode;EN
  # browser.search.region;EN

  # browse a page
  # https://support.mozilla.org/en-US/kb/how-search-from-address-bar
  # http://www.wordreference.com/tools/Firefox-search-shortcut.aspx
  # youtube yt
  # wordreference es en fr esen esfr enes enfr fres fren
  # torrent kat
  # amazon a
  # wikipedia wk wkes
  # facebook fb
################################################################################

#### Prompt for a reboot
sudo apt-get -y autoremove && clear && clear
read -p "Do you want to restart the system now? "
echo "========================================================================"
if [[ $REPLY =~ ^([Yy]|[Yy][Ee][Ss]| |)$ ]]; then
    sudo reboot
fi

#### Don't ask for passwords all the time
  # http://askubuntu.com/questions/136264/how-do-i-turn-off-all-the-password-prompts
  # http://askubuntu.com/questions/43969/how-to-make-ubuntu-remember-forever-the-password-after-the-first-time
  # http://askubuntu.com/questions/534125/never-ask-me-for-passwords?lq=1
################################################################################

#### Background terminal
# https://www.maketecheasier.com/terminal-as-transparent-wallpaper-in-ubuntu/
dconf

Code: Select all

#!/bin/bash

#### System Settings
  #### Appearance
    #### Backgrounds
    # Select image
    # dconf write /org/cinnamon/desktop/background/picture-uri "'file:///usr/share/backgrounds/linuxmint/default_background.jpg'"
    # Play backgrounds as a slideshow
    # dconf write /org/cinnamon/desktop/background/slideshow/slideshow-enabled false
    # Delay (minutes)
    # dconf write /org/cinnamon/desktop/background/slideshow/delay 15
    # Play images in random order
    # dconf write /org/cinnamon/desktop/background/slideshow/random-order true
    # Picture aspect (none, mosaic, centered, scaled, stretched, zoom, spanned)
    # dconf write /org/cinnamon/desktop/background/picture-options "'zoom'"
    # Background gradient (none, horizontal, vertical)
    # dconf write /org/cinnamon/desktop/background/color-shading-type "'horizontal'"
    # Gradient start color
    # dconf write /org/cinnamon/desktop/background/primary-color "'#000000000000'"
    # dconf write /org/cinnamon/desktop/background/color-shading-type "'solid'"

    #### Effects
    # Window effects
    dconf write /org/cinnamon/desktop-effects false
    # Effects on dialog boxes
    # dconf write /org/cinnamon/desktop-effects-on-dialogs false
    # Effects on Gtk menus
    # dconf write /org/cinnamon/desktop-effects-on-menus false
    # Effects style
    # dconf write
    # Fade effect on Cinnamon scrollboxes (like the Menu applications list)
    # dconf write /org/cinnamon/enable-vfade false
    # Session startup animation
    # dconf write /org/cinnamon/startup-animation false
    # Overlay scroll bars (logout required)
    # dconf write /org/cinnamon/desktop/interface/gtk-overlay-scrollbars true

    #### Fonts
    # Default font
    dconf write /org/cinnamon/desktop/interface/font-name "'Noto Sans 14'"
    # Desktop font
    dconf write /org/nemo/desktop/font "'Noto Sans 14'"
    # Document font
    dconf write /org/gnome/desktop/interface/document-font-name "'Noto Sans 14'"
    # Monospace font
    dconf write /org/gnome/desktop/interface/monospace-font-name "'Monospace 14'"
    # Window title font
    dconf write /org/cinnamon/desktop/wm/preferences/titlebar-font "'Noto Sans Bold 11'"

    #### Themes
    # Window borders
    # dconf write /org/cinnamon/desktop/wm/preferences/theme "'Mint-Y-Dark'"
    # Icons
    # dconf write /org/cinnamon/desktop/interface/icon-theme "'Mint-Y'"
    # Controls
    # dconf write /org/cinnamon/desktop/interface/gtk-theme "'Mint-Y-Dark'"
    # Mouse Pointer
    # dconf write /org/cinnamon/desktop/interface/cursor-theme "'Adwaita'"
    # Desktop
    # dconf write /org/cinnamon/theme/name "'Mint-Y-Dark'"
      #### Settings
      # Show icons in menus
      dconf write /org/cinnamon/settings-daemon/plugins/xsettings/menus-have-icons true
      # Show icons on buttons
      dconf write /org/cinnamon/settings-daemon/plugins/xsettings/buttons-have-icons false
      # Use a dark theme when available in application
      # dconf write /org

  #### Preferences
    #### Accessibility

    #### Account details

    #### Applets

    #### Date & Time
    # Use 24h clock
    # dconf write /org/cinnamon/desktop/interface/clock-use-24h true
    # Display the date
    # dconf write /org/cinnamon/desktop/interface/clock-show-date true
    # Display seconds
    # dconf write /org/cinnamon/desktop/interface/clock-show-seconds false
    # First day of week (0 local, 1 monday, 7 sunday)
    dconf write /org/cinnamon/desktop/interface/first-day-of-week 1

    #### Desklets
      #### Installed desklets
      # dconf write /org/cinnamon/enabled-desklets "['clock@cinnamon.org:0:150:0']"

      #### Available desklets (online)

      #### General Settings
      # Decoration of desklets (0 no decoration, 1 border only, 2 border and header)
      # dconf write /org/cinnamon/desklet-decorations 0

    #### Desktop

    #### Extensions

    #### General

    #### Hot Corners

    #### Input Method

    #### Languages

    #### Notifications

    #### Panel
    # Auto-hide panel (true, false, intel)
    dconf write /org/cinnamon/panels-autohide "['1:intel']"
    # Show delay (miliseconds)
    # dconf write /org/cinnamon/panels-show-delay "['1:50']"
    # Hide delay (miliseconds)
    # dconf write /org/cinnamon/panels-hide-delay "['1:100']"
    # Use customized panel size (otherwise it's defined by the theme)
    dconf write /org/cinnamon/panels-resizable "['1:true']" # This must be true for the following height to take effect.
    # Allow cinnamon to scale panel text and icons according to panel heights
    dconf write /org/cinnamon/panels-scale-text-icons "['1:true']"
    # Panel height
    dconf write /org/cinnamon/panels-height "['1:35']"
    # Allow the pointer to pass through the edges of panels
    # dconf write /org/cinnamon/no-adjacent-panel-barriers false

    #### Preferred Applications
      #### Removable media
      # Prompt or start programs on media insertion
      dconf write /org/cinnamon/desktop/media-handling/autorun-never false
      # Select an application for software CDs

    #### Privacy
    # Remember recently accessed files
    # dconf write /org/cinnamon/desktop/privacy/remember-recent-files true
    # Never forget old files
    # dconf write /org/cinnamon/desktop/privacy/recent-files-max-age -1
    # Number of days to remember old files
    # dconf write /org/cinnamon/desktop/privacy/recent-files-max-age 30

    #### Screensaver
    # Select screensaver
    # dconf write /org/cinnamon/desktop/screensaver/screensaver-name "''"
    # dconf write /org/cinnamon/desktop/screensaver/screensaver-name "'xscreensaver@cinnamon.org'"
    # dconf write /org/cinnamon/desktop/screensaver/xscreensaver-hack "'glmatrix'"
    # dconf write /org/cinnamon/desktop/screensaver/screensaver-name "'xscreensaver@cinnamon.org'"
    # dconf write /org/cinnamon/desktop/screensaver/xscreensaver-hack "'xmatrix'"
      #### Settings
      # Lock the computer when put to sleep
      dconf write /org/cinnamon/settings-daemon/plugins/power/lock-on-suspend false
      # Lock the computer when the screen turns off
      dconf write /org/cinnamon/desktop/screensaver/lock-enabled false
      # Delay before locking the screen
      # dconf write /org/cinnamon/desktop/screensaver/lock-delay "uint32 300"
      # Lock the computer when inactive (0 never)
      dconf write /org/cinnamon/desktop/session/idle-delay "uint32 0"
      # dconf write /org/cinnamon/desktop/session/idle-delay "uint32 600"
      # Show message when the screen is locked
      # dconf write /org/cinnamon/desktop/screensaver/default-message "'locked'"
      # Font
      # dconf write /org/cinnamon/desktop/screensaver/font-message "'Noto Sans 14'"
      # Ask for a custom message when locking the screen from the menu
      # dconf write /org/cinnamon/desktop/screensaver/ask-for-away-message false

      #### Date
      # Use a custom date and time format
      # Time Font
      # Date Font

    #### Startup Applications

    #### Windows
      #### Titlebar

      #### Behaviour
      # Window focus mode (click, mouse, sloppy)
      dconf write /org/cinnamon/desktop/wm/preferences/focus-mode "'sloppy'"
      # Automatically raise focussed windows
      # dconf write /org/cinnamon/desktop/wm/preferences/auto-raise false
      # Bring windows which require attention to the current workspace
      # dconf write /org/cinnamon/bring-windows-to-current-workspace false
      # Prevent focus stealing
      # dconf write /org/cinnamon/prevent-focus-stealing false
      # Attach dialog windows to the parent window

      #### Alt-Tab

    #### Window Tiling

    #### Workspaces

  #### Hardware

    #### Bluetooth

    #### Color

    #### Display

    #### Graphics Tablet

    #### Keyboard
      #### Typing
      # Enable key repeat
      dconf write /org/cinnamon/settings-daemon/peripherals/keyboard/repeat true
      # Repeat delay
      dconf write /org/cinnamon/settings-daemon/peripherals/keyboard/delay "uint32 200"
      # Repeat speed
      dconf write /org/cinnamon/settings-daemon/peripherals/keyboard/repeat-interval "uint32 20"
      # Text cursor blinks
      # dconf write /org/cinnamon/desktop/interface/cursor-blink true
      # Blink speed
      # dconf write /org/cinnamon/desktop/interface/cursor-blink-time 1200

      #### Shortcuts
      # ctrl + alt + del to open system manager
      # http://askubuntu.com/questions/597395/how-to-set-custom-keyboard-shortcuts-from-terminal
      # http://www.howtogeek.com/howto/20355/use-ctrlaltdel-for-task-manager-in-linux-to-kill-tasks-easily/
      dconf write /org/cinnamon/desktop/keybindings/custom-list "['custom0', 'custom1', 'custom2']"
      dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/custom0/name "'Task Manager'"
      dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/custom0/command "'gnome-system-monitor'"
      dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/custom0/binding "['<Primary><Alt>KP_Delete']"

      # Kill Window shortcut
      dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/custom1/name "'Kill Window'"
      dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/custom1/command "'xkill'"
      dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/custom1/binding "['<Primary>KP_Delete']"

      # Fix Screenshot Area
      if [ ! -f ~/bin/gnome_screenshot_fix_grab_area.sh ]; then
          cat << _EOF_ > ~/bin/gnome_screenshot_fix_grab_area.sh
          #!/bin/sh

          sleep 0.125
          gnome-screenshot --area
_EOF_
      fi
      dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/custom2/name "'Screenshot of Area'"
      dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/custom2/command "'gnome_screenshot_fix_grab_area.sh'"
      dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/custom2/binding "['<Shift>Print']"

      #### Layouts options
      # Swap Esc/Lock Mayus
      # http://superuser.com/questions/396988/how-to-remap-capslock-to-esc-in-linux-mint-12
      # http://askubuntu.com/questions/363346/how-to-permanently-switch-caps-lock-and-esc
      # dconf write /org/cinnamon/settings-daemon/peripherals/keyboard/numlock-state "'off'"
      dconf write /org/gnome/libgnomekbd/keyboard/options "['caps\tcaps:swapescape']"

    #### Mouse and Touchpad
      #### Mouse
      # Left handed (mouse buttons inverted)
      # dconf write /org/cinnamon/settings-daemon/peripherals/mouse/left-handed false
      # Show position of pointer when the Control key is pressed
      # dconf write /org/cinnamon/settings-daemon/peripherals/mouse/locate-pointer false
      # Emulate middle click by clicking both left and right buttons
      # dconf write /org/cinnamon/settings-daemon/peripherals/mouse/middle-button-enabled false
      # Pointer size
      # dconf write /org/cinnamon/desktop/interface/cursor-size 30
      # Pointer acceleration
      dconf write /org/cinnamon/settings-daemon/peripherals/mouse/motion-acceleration 4.0
      # Pointer sensitivity
      dconf write /org/cinnamon/settings-daemon/peripherals/mouse/motion-threshold 2.0
      # Double-Click timeout
      # dconf write /org/cinnamon/settings-daemon/peripherals/mouse/double-click 340

      #### Touchpad
      # Enable touchpad
      dconf write /org/cinnamon/settings-daemon/peripherals/touchpad/touchpad-enabled true
      # Tap to click
      dconf write /org/cinnamon/settings-daemon/peripherals/touchpad/tap-to-click true
      # Disable touchpad while typing
      dconf write /org/cinnamon/settings-daemon/peripherals/touchpad/disable-while-typing true
      # Two-finger click emulation (0 disabled, 1 left, 2 middle, 3 right)
      dconf write /org/cinnamon/settings-daemon/peripherals/touchpad/two-finger-click 3
      # Three-finger click emulation
      dconf write /org/cinnamon/settings-daemon/peripherals/touchpad/three-finger-click 2
      # Reverse scrolling direction
      dconf write /org/cinnamon/settings-daemon/peripherals/touchpad/natural-scroll false
      # Vertical edge scrolling
      dconf write /org/cinnamon/settings-daemon/peripherals/touchpad/vertical-edge-scrolling true
      # Horizontal edge scrolling
      dconf write /org/cinnamon/settings-daemon/peripherals/touchpad/horizontal-edge-scrolling true
      # Vertical two-finger scrolling
      dconf write /org/cinnamon/settings-daemon/peripherals/touchpad/vertical-two-finger-scrolling true
      # Horizontal two-finger scrolling
      dconf write /org/cinnamon/settings-daemon/peripherals/touchpad/horizontal-two-finger-scrolling true
      # Pointer acceleration
      dconf write /org/cinnamon/settings-daemon/peripherals/touchpad/motion-acceleration 5.4820717131474108 # A fraction is needed.
      # Pointer sensitivity
      dconf write /org/cinnamon/settings-daemon/peripherals/touchpad/motion-threshold 2

    #### Networking

    #### Power Management
    # Turn off the screen when inactive
    dconf write /org/cinnamon/settings-daemon/plugins/power/sleep-display-ac 0 # never
    dconf write /org/cinnamon/settings-daemon/plugins/power/sleep-display-battery 0

    # Suspend when inactive
    dconf write /org/cinnamon/settings-daemon/plugins/power/sleep-inactive-ac-timeout 0
    dconf write /org/cinnamon/settings-daemon/plugins/power/sleep-inactive-battery-timeout 0

    # When lid is closed
    dconf write /org/cinnamon/settings-daemon/plugins/power/lid-close-ac-action "'nothing'"
    dconf write /org/cinnamon/settings-daemon/plugins/power/lid-close-battery-action "'nothing'"

    # When the power button is pressed (blank, suspend, shutdown, hibernate, interactive, nothing)
    dconf write /org/cinnamon/settings-daemon/plugins/power/button-power "'suspend'"

    # When the battery is critically low
    dconf write /org/cinnamon/settings-daemon/plugins/power/critical-battery-action "'hibernate'"

    # Perform lid-closed action even with external monitors attached
    dconf write /org/cinnamon/settings-daemon/plugins/power/lid-close-suspend-with-external-monitor false

    # On battery, dim screen when inactive
    dconf write /org/cinnamon/settings-daemon/plugins/power/idle-dim-battery false

    # Brightness level when inactive
    # dconf write /org/cinnamon/settings-daemon/plugins/power/idle-brightness 30 # dim to 30%

    # Dim screen after inactive for
    # dconf write /org/cinnamon/settings-daemon/plugins/power/idle-dim-time 1200 # dim after x seconds

    #### Printers

    #### Sound
    # Starting Cinnamon
    dconf write /org/cinnamon/sounds/login-enabled false
    # Leaving Cinnamon
    dconf write /org/cinnamon/sounds/logout-enabled false
    # Switching workspace
    dconf write /org/cinnamon/sounds/switch-enabled false
    # Opening new windows
    dconf write /org/cinnamon/sounds/map-enabled false
    # Closing windows
    dconf write /org/cinnamon/sounds/close-enabled false
    # Minimizing windows
    dconf write /org/cinnamon/sounds/minimize-enabled false
    # Maximizing windows
    dconf write /org/cinnamon/sounds/maximize-enabled false
    # Unmaximizing windows
    dconf write /org/cinnamon/sounds/unmaximize-enabled false
    # Tiling and snapping windows
    dconf write /org/cinnamon/sounds/tile-enabled false
    # Inserting a device
    dconf write /org/cinnamon/sounds/plug-enabled false
    # Removing a device
    dconf write /org/cinnamon/sounds/unplug-enabled false
    # Changing the sound volume
    dconf write /org/cinnamon/desktop/sound/volume-sound-enabled false

  #### Administration

#### Programs Settings
  #### Terminal
    # Change terminal prompt to >
    # cat /etc/bash.bashrc | grep "PS1='" # comment this line
    # echo PS1=' > ' >> ~/.profile # add this instead

    #### General
    # Profile name
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/visible-name "'Original'"
    # Initial terminal size
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/default-size-columns 240
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/default-size-rows 100
    # Cursor shape (block, ibeam, underline)
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/cursor-shape "'block'"
    # Terminal bell
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/audible-bell false

    # Allow bold text
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/allow-bold true
    # Rewrap on resize
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/rewrap-on-resize true
    # Custom Font
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/use-system-font false
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/font "'Hack 14'"
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/visible-name "'Original'"

    #### Command

    #### Colors
    # Use colors from system theme
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/use-theme-colors true
    # Built-in schemes
    # select solarized dark
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/foreground-color "'rgb(131,148,150)'"
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/background-color "'rgb(0,43,54)'"
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/palette "['rgb(7,54,66)', 'rgb(220,50,47)', 'rgb(133,153,0)', 'rgb(181,137,0)', 'rgb(38,139,210)', 'rgb(211,54,130)', 'rgb(42,161,152)', 'rgb(238,232,213)', 'rgb(0,43,54)', 'rgb(203,75,22)', 'rgb(88,110,117)', 'rgb(101,123,131)', 'rgb(131,148,150)', 'rgb(108,113,196)', 'rgb(147,161,161)', 'rgb(253,246,227)']"
    # select green on black
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/foreground-color "'rgb(0,255,0)'"
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/background-color "'rgb(0,0,0)'"
    # Use transparent background
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/use-transparent-background false
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/background-transparency-percent 17

    #### Scrolling
    # Show scrollbar (never, always)
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/scrollbar-policy "'never'"
    # Scroll on output
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/scroll-on-output false
    # Scroll on keystroke
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/scroll-on-keystroke true
    # Limit scrollback
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/scrollback-unlimited true
    # dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/scrollback-lines 10000

    #### Compatiblity

  #### Nemo File Manager settings
  # dconf write /org/nemo/window-state/sidebar-bookmark-breakpoint 5
  # dconf write /org/nemo/window-state/start-with-sidebar true # can be toggled with F9
  dconf write /org/nemo/window-state/sidebar-width 200
  dconf write /org/nemo/window-state/maximized true
  # dconf write /org/nemo/preferences/show-hidden-files true # can be toggled with ctrl + h
    #### Views
    # View new folders using (icon-view, list-view, compact-view)
    # dconf write /org/nemo/preferences/default-folder-viewer "'icon-view'"
    # Arrange items
    # dconf write /org/nemo/preferences/default-sort-order "'name'"
    # Sort folders before files
    # dconf write /org/nemo/preferences/sort-directories-first true
    # Icon view default zoom level (smallest, smaller, small, standard, large, larger, largest)
    dconf write /org/nemo/icon-view/default-zoom-level "'large'"
    # Text beside icons
    # dconf write /org/nemo/icon-view/labels-beside-icons false
    # Use compact layout
    # dconf write /org/nemo/icon-view/default-use-tighter-layout false
    # Compact view default zoom level (smallest, smaller, small, standard, large, larger, largest)
    # dconf write /org/nemo/compact-view/default-zoom-level "'small'"
    # All columns have the same width
    # dconf write /org/nemo/compact-view/all-columns-have-same-width false
    # List view default zoom level
    # dconf write /org/nemo/list-view/default-zoom-level "'smaller'"
    # Tree view show only folders
    # dconf write /org/nemo/sidebar-panels/tree/show-only-directories true

    #### Behavior
    # Single click to open items
    dconf write /org/nemo/preferences/click-policy "'single'"
    # Click twice with a pause in between to rename items
    # dconf write /org/nemo/preferences/quick-renames-with-pause-in-between true
    # Open each folder in its own window
    # dconf write /org/nemo/preferences/always-use-browser false
    # Always start in dual-panel view
    # dconf write /org/nemo/preferences/start-with-dual-pane false
    # Ignore per-folder view preferences
    # dconf write /org/nemo/preferences/ignore-view-metadata false
    # Disable file operation queueing
    # dconf write /org/nemo/preferences/never-queue-file-ops false

    # Executable text files (launch, display, ask)
    dconf write /org/nemo/preferences/executable-text-activation "'display'"

    # Ask before emptying the Trash or deleting files
    # dconf write /org/nemo/preferences/confirm-trash false
    # Include a Delete command that bypasses Trash
    dconf write /org/nemo/preferences/enable-delete true
    # Bypass the Trash when the Delete key is pressed
    dconf write /org/nemo/preferences/swap-trash-delete true

    # Automatically mount removable media when inserted and on startup
    dconf write /org/cinnamon/desktop/media-handling/automount true
    # Automatically open a folder for automounted media
    dconf write /org/cinnamon/desktop/media-handling/automount-open false
    # Prompt for autorun/autostart programs when media are inserted
    dconf write /org/cinnamon/desktop/media-handling/autorun-never false
    # Automatically close the device's tab, pane, or window when a device is unmounted or ejected
    dconf write /org/nemo/preferences/close-device-view-on-device-eject true

    #### Display
    # Chose the order of information to appear beneath icon names. More information will appear
    # when zooming in closer. (none, size, type, detailed_type, date_modified, date_accessed, owner,
    # group, permissions, octal_permissions, mime_type, where)
    # dconf write /org/nemo/icon-view/captions "['none', 'size', 'date_modified']"
    # Date format (locale, iso, informal)
    # dconf write /org/nemo/preferences/date-format "'locale'"
    # Show the full path in the title bar and tab bars
    dconf write /org/nemo/preferences/show-full-path-titles true
    # File size prefixes (base-10, base-10-full, base-2, base-2-full)
    # dconf write /org/nemo/preferences/size-prefixes "'base-10'"
    # Show advanced permissions in the file property dialog
    dconf write /org/nemo/preferences/show-advanced-permissions true
    # List bookmarks in the menu
    # dconf write /org/nemo/preferences/show-bookmarks-in-to-menus true
    # List devices and network locations in the menu
    # dconf write /org/nemo/preferences/show-places-in-to-menus true

    #### List Columns
    dconf write /org/nemo/list-view/default-visible-columns "['name', 'size', 'type', 'date_modified', 'owner', 'permissions']"

    #### Preview
    # Show text in icons (always, local-only, never)
    # dconf write /org/nemo/preferences/show-icon-text "'never'"

    # Show thumbnails
    dconf write /org/nemo/preferences/show-image-thumbnails "'never'"
    # Only for files smaller than:
    # dconf write /org/nemo/preferences/thumbnail-limit "uint64 4294967295"

    # Show tooltips in icon and compact view
    # dconf write /org/nemo/preferences/tooltips-in-icon-view false
    # Show tooltips in list views
    # dconf write /org/nemo/preferences/tooltips-in-list-view false
    # Show tooltips on the desktop
    # dconf write /org/nemo/preferences/tooltips-on-desktop false

    #### Toolbar
    # Show previous button
    # dconf write /org/nemo/preferences/show-previous-icon-toolbar true
    # Show next button
    # dconf write /org/nemo/preferences/show-next-icon-toolbar true
    # Show up button
    # dconf write /org/nemo/preferences/show-up-icon-toolbar true
    # Show refresh button
    # dconf write /org/nemo/preferences/show-reload-icon-toolbar false
    # Show computer button
    # dconf write /org/nemo/preferences/show-computer-icon-toolbar false
    # Show home button
    # dconf write /org/nemo/preferences/show-home-icon-toolbar true # small icon on the left of the path
    # Show location entry/breadcrumbs toggle button
    # dconf write /org/nemo/preferences/show-edit-icon-toolbar true
    # Show open in terminal button
    # dconf write /org/nemo/preferences/show-open-in-terminal-toolbar true
    # Show new folder button
    dconf write /org/nemo/preferences/show-new-folder-icon-toolbar true # small icon next to the search icon
    # Show search button
    dconf write /org/nemo/preferences/show-search-icon-toolbar true
    # Show icon view button
    dconf write /org/nemo/preferences/show-icon-view-icon-toolbar false
    # Show list view button
    dconf write /org/nemo/preferences/show-list-view-icon-toolbar false
    # Show compact view button
    dconf write /org/nemo/preferences/show-compact-view-icon-toolbar false

  #### Xplayer
    # Repeat mode
    # dconf write /org/x/player/repeat false
    # Shuffle mode
    # dconf write /org/x/player/shuffle false

    #### General
    # Start playing files from last position
    dconf write /org/x/player/remember-position true

    # Load subtitle files when movie is loaded
    dconf write /org/x/player/autoload-subtitles true
    # Font:
    # dconf write /org/x/player/subtitle-font "'Sans Bold 20'"

    # Load chapter files when movie is loaded
    # dconf write /org/x/player/autoload-chapters true

    #### Display
    # Resize the window when a new video is loaded
    # dconf write /org/x/player/auto-resize true

    #### Audio

  #### Weather Desklet
  # http://stackoverflow.com/questions/12452961/how-to-get-city-code-weather-in-accuweather
  # http://pastebin.com/dbtemx5F
  # City Name = "Madrid, ES" Location = "EUR|ES|SP013|MADRID" Country = "Spain"
  # City Name = "Malaga, ES" Location = "EUR|ES|SP001|MÁLAGA" Country = "Spain"
  # dconf write /org/cinnamon/next-desklet-id 1
  # dconf write /org/cinnamon/enabled-desklets "['accudesk@logan:0:1025:25']"

  #### Wifi Applet
  dconf write /org/gnome/nm-applet/disable-disconnected-notifications true
  dconf write /org/gnome/nm-applet/disable-connected-notifications true

  #### Update Manager
  dconf write /com/linuxmint/updates/hide-window-after-update true
  dconf write /com/linuxmint/updates/hide-systray true
  dconf write /com/linuxmint/updates/default-repo-is-ok true
  dconf write /com/linuxmint/updates/level1-is-visible true
  dconf write /com/linuxmint/updates/level2-is-visible true
  dconf write /com/linuxmint/updates/level3-is-visible true
  dconf write /com/linuxmint/updates/level4-is-visible true
  dconf write /com/linuxmint/updates/level5-is-visible true
  dconf write /com/linuxmint/updates/level1-is-safe true
  dconf write /com/linuxmint/updates/level2-is-safe true
  dconf write /com/linuxmint/updates/level3-is-safe true
  dconf write /com/linuxmint/updates/level4-is-safe false
  dconf write /com/linuxmint/updates/level5-is-safe false
  dconf write /com/linuxmint/updates/security-updates-are-visible true
  dconf write /com/linuxmint/updates/security-updates-are-safe false
  dconf write /com/linuxmint/updates/kernel-updates-are-visible true
  dconf write /com/linuxmint/updates/kernel-updates-are-safe false
  dconf write /com/linuxmint/updates/refresh-days 7
  dconf write /com/linuxmint/updates/autorefresh-days 7
  dconf write /com/linuxmint/updates/dist-upgrade true
  dconf write /com/linuxmint/updates/blacklisted-packages "@as []"
################################################################################
cs50

Code: Select all

#!/bin/bash -x

# http://cs50.stackexchange.com/questions/1459/how-to-install-the-tools-for-the-course-on-ubuntu

sudo apt-get -y remove openjdk-8*
sudo apt-get -y install gcc g++ gdb make openjdk-9-jdk openjdk-9-jre nodejs
echo "========================================================================"
echo "c compiler, default-jdk & jre and filezilla has been installed"
echo "========================================================================"
echo "Installing apache2, php7, mysql-server"
echo "========================================================================"
# http://www.2daygeek.com/install-lamp-stack-apache-mariadb-php-phpmyadmin-on-linuxmint/#
# https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-16-04
# https://forums.linuxmint.com/viewtopic.php?f=47&t=225671&p=1192042#p1192042
service apache2 restart && service mysql restart > /dev/null
if [ $? -ne 0 ]; then
    clear
    echo "Installing apache2, php7, mysql-server"
    sudo apt install -y apache2 mariadb-server mariadb-client
    sudo mysql_secure_installation
    sudo apt install -y php7.0 php7.0-mysql libapache2-mod-php7.0 \
        php7.0-mbstring php7.0-common php7.0-gd php7.0-mcrypt php-gettext \
        php7.0-curl php7.0-cli
    sudo apt-get install -y phpmyadmin php-mbstring php-gettext
    sudo ln -s ../../phpmyadmin/apache.conf phpmyadmin.conf
    #sudo a2enconf phpmyadmin
    #sudo /etc/init.d/apache2 restart
    sudo phpenmod mcrypt
    sudo phpenmod mbstring

    # Restart all the installed services to verify that everything is installed properly
    clear
    service apache2 restart && service mysql restart > /dev/null
    if [ $? -ne 0 ]; then
      echo "Please Check the Install Services, There is some $(tput bold)$(tput setaf 1)Problem$(tput sgr0)"
      else
      echo "Installed Services run $(tput bold)$(tput setaf 2)Sucessfully$(tput sgr0)"
      read
    fi
    echo "========================================================================"
fi

#read -p "Install scratch? "
#if [[ "$REPLY" =~ ^([Yy]|[Yy][Ee][Ss]| |)$ ]]; then
#    sudo apt-get install -y scratch
#    echo "MIT Scratch has been installed"
#    echo "========================================================================"
#fi

if [[ $1 == 32 ]]; then
    wget http://mirror.cs50.net/appliance50/2015/debs/dists/trusty/main/binary-i386/check50_1.19-2_i386.deb
    wget http://mirror.cs50.net/appliance50/2015/debs/dists/trusty/main/binary-i386/render50_1.8-0_i386.deb
    wget http://mirror.cs50.net/appliance50/2015/debs/dists/trusty/main/binary-i386/style50_2.1.4-1_i386.deb
    echo "Download complete"
    uname -a | grep arm && dpkg --force-architecture --force-depends -i check50_1.19-2_i386.deb || dpkg -i check50_1.19-2_i386.deb
    echo "check50 done"
    uname -a | grep arm && dpkg --force-architecture --force-depends -i style50_2.1.4-1_i386.deb || dpkg -i style50_2.1.4-1_i386.deb
    echo "style50 done"
    uname -a | grep arm && dpkg --force-architecture --force-depends -i render50_1.8-0_i386.deb || dpkg -i render50_1.8-0_i386.deb
    echo "render50 done"
    echo "========================================================================"
    echo "check50, style50 and render50 has been installed"
    echo "Installing python and ruby"
    echo "========================================================================"
    sudo apt-get -y install python python-setuptools ruby
    easy_install pip
    su - -c "pip install cs50"
    gem install cs50
    echo "========================================================================"
    echo "python & ruby have been instaled"
    echo "custom python and ruby libraries have been configured"
    echo "========================================================================"
    echo "Installing custom C/C++ and php libraries"
    echo "========================================================================"
    wget http://mirror.cs50.net/appliance50/2015/debs/dists/trusty/main/binary-i386/library50-c_6-0_i386.deb
    dpkg -i library50-c_6-0_i386.deb
    rm library50-c_6-0_i386.deb
    echo "========================================================================"
    echo "custom C/C++ library has been configured"
    echo "processing custom php library"
    echo "========================================================================"
    wget http://mirror.cs50.net/appliance50/2015/debs/dists/trusty/main/binary-i386/library50-php_4-0_i386.deb
    dpkg -i library50-php_4-0_i386.deb
    rm library50-php_4-0_i386.deb
    echo "========================================================================"
    echo "custom php library has been configured"
    echo "========================================================================"
    wget https://github.com/tysonchamp/spl-for-ubuntu/archive/master.zip
    unzip master.zip
    cd spl-for-ubuntu-master
    make
    make install
    echo "========================================================================"
elif [[ "$1" == "64" ]]; then

fi

echo "
# My custom alias for CS50 By Harvard University
mkcs50() {
    echo "cc -ggdb -std=c99 -Wall -Werror ${1}.c -lcrypt -lcs50 -lm -o $1";
    cc -ggdb -std=c99 -Wall -Werror ${1}.c -lcrypt -lcs50 -lm -o $1 ;
}
alias mk=mkcs50" | cat >> ~/.bashrc
echo "========================================================================"
source ./.bashrc
chmod -R 777 /var/www/*
echo "Installation has been finished."
echo "CS50 README
============================================================================
1. Install Browser Addons:
============================================================================
After installation of apliance is finished, install the below addons in your
mozilla firefox web browser:
1) https://addons.mozilla.org/en-US/firefox/addon/1843
2) https://addons.mozilla.org/en-US/firefox/addon/3829
3) https://addons.mozilla.org/en-US/firefox/addon/60
2. Scratch:
============================================================================
Scratch Is already installed but still If you want to access the online
version then visit below url: http://scratch.mit.edu/
3. Install Oracle Java:
============================================================================
If you wanna install through PPA, goto below url
http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
or,
download from official website
http://java.com/en/download/manual.jsp"
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 16 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
karlchen
Level 23
Level 23
Posts: 18205
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: After installation script configuration

Post by karlchen »

Hello, DarknessCrYsiS.

And the target of your post will be what, if I may ask?
Using the post as your personal notepad?

Cheers,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 771 days now.
Lifeline
West_Training_8668
Level 2
Level 2
Posts: 71
Joined: Tue Mar 29, 2016 8:41 am

Re: After installation script configuration

Post by West_Training_8668 »

Hello Karl,
I guess it will be helpful for someone else. Right now I'm stuck with the Firefox settings. I want google as the homepage and to install an add blocker.
BlackVeils

Re: After installation script configuration

Post by BlackVeils »

personally what i do for web browser config, is configure the program directly on a fresh profile, then save the profile folder.
West_Training_8668
Level 2
Level 2
Posts: 71
Joined: Tue Mar 29, 2016 8:41 am

Re: After installation script configuration

Post by West_Training_8668 »

I need to figure out how to install dropbox from command line and test if the folder with the configuration exists inside the dropbox directory.
West_Training_8668
Level 2
Level 2
Posts: 71
Joined: Tue Mar 29, 2016 8:41 am

Re: Post-installation Cinnamon Linux Mint configuration script

Post by West_Training_8668 »

TODO list:

Show a less page with the configurations to perform manually at the end of the script

Ask the user if he doesn't want to type his password and if so do:
http://askubuntu.com/questions/136264/h ... rd-prompts
http://askubuntu.com/questions/43969/ho ... first-time
http://askubuntu.com/questions/534125/n ... words?lq=1

I want to find out a way of dimming the screen when flux is running. It should be a script that runs every ten minutes from around 8 to 10 pm.
http://stackoverflow.com/questions/9117 ... is-running

Ask the user if he wants a terminal as the desktop background.
https://www.maketecheasier.com/terminal ... in-ubuntu/
Last edited by West_Training_8668 on Thu Jul 21, 2016 5:48 pm, edited 4 times in total.
BlackVeils

Re: Post-installation Cinnamon Linux Mint configuration script

Post by BlackVeils »

test for folder

Code: Select all

if [[ -a /folder/path ]]; then
   echo "folder exists"
else
   echo "no folder"
fi
xbacklight ?
I think you need to figure out what range of numbers you have to I crease or decrease by.
xbacklight -inc 5
xbacklight -dec 5
maybe there is another way to use it to set specific number, I don't know. check man pages.
West_Training_8668
Level 2
Level 2
Posts: 71
Joined: Tue Mar 29, 2016 8:41 am

Re: Post-installation Cinnamon Linux Mint configuration script

Post by West_Training_8668 »

I think the if [[ $1 == 32 ]]; then part is giving me an error:

Code: Select all

if [ $? -ne 0 ]; then
    clear
    echo "Installing apache2, php7, mysql-server"
    sudo apt install -y apache2 mariadb-server mariadb-client
    sudo mysql_secure_installation
    sudo apt install -y php7.0 php7.0-mysql libapache2-mod-php7.0 \
        php7.0-mbstring php7.0-common php7.0-gd php7.0-mcrypt php-gettext \
        php7.0-curl php7.0-cli
    sudo apt-get install -y phpmyadmin php-mbstring php-gettext
    sudo ln -s ../../phpmyadmin/apache.conf phpmyadmin.conf
    #sudo a2enconf phpmyadmin
    #sudo /etc/init.d/apache2 restart
    sudo phpenmod mcrypt
    sudo phpenmod mbstring

    # Restart all the installed services to verify that everything is installed properly
    clear
    service apache2 restart && service mysql restart > /dev/null
    if [ $? -ne 0 ]; then
      echo "Please Check the Install Services, There is some $(tput bold)$(tput setaf 1)Problem$(tput sgr0)"
      else
      echo "Installed Services run $(tput bold)$(tput setaf 2)Sucessfully$(tput sgr0)"
      read
    fi
    echo "========================================================================"
fi

#read -p "Install scratch? "
#if [[ "$REPLY" =~ ^([Yy]|[Yy][Ee][Ss]| |)$ ]]; then
#    sudo apt-get install -y scratch
#    echo "MIT Scratch has been installed"
#    echo "========================================================================"
#fi

if [[ $1 == 32 ]]; then
BlackVeils

Re: Post-installation Cinnamon Linux Mint configuration script

Post by BlackVeils »

in bash = is for comparing, == is for something else.
BEeK

Re: Post-installation Cinnamon Linux Mint configuration script

Post by BEeK »

DarknessCrYsiS wrote:I think the if [[ $1 == 32 ]]; then part is giving me an error:
Did you forget the "fi" at the end?

I believe it is correct because this works:

Code: Select all

#! /bin/bash
a=15; if [[ $a == 15 ]]; then echo a=15; fi
West_Training_8668
Level 2
Level 2
Posts: 71
Joined: Tue Mar 29, 2016 8:41 am

Re: Post installation script Linux Mint

Post by West_Training_8668 »

Vim Plug's youcompleteme hook doesn't install in a 32 bit machine. How can I have the script follow this steps for Linux Mint 18 (Ubuntu 16.04)? The thing is I would need a check for bits of the machine in the plugins file but I don't know how to do that, and I would also need to add the proper PPAs and I don't know if it would be something like:

Code: Select all

deb http://llvm.org/apt/xenial/ llvm-toolchain-xenial-3.6 main
deb-src http://llvm.org/apt/xenial/ llvm-toolchain-xenial-3.6 main
I'm pretty sure this is not the place to ask this so can you direct me to where I can ask?
West_Training_8668
Level 2
Level 2
Posts: 71
Joined: Tue Mar 29, 2016 8:41 am

Re: Post installation script Linux Mint

Post by West_Training_8668 »

What would be better? To make the script stop if something goes wrong, or to continue installing, saving the errors to a log and showing it at the end? Which would be the proper way to do the second? Should I add command1 2>&1 | tee ~/log.txt all over the script?
I think this would be a good way.
Locked

Return to “Scripts & Bash”