Carmelo Cascone | c5569c2 | 2018-04-18 10:09:15 +0900 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
Carmelo Cascone | e59bc37 | 2019-01-08 14:33:18 -0800 | [diff] [blame^] | 3 | # Installs desktop utilities and code editors. |
Carmelo Cascone | c5569c2 | 2018-04-18 10:09:15 +0900 | [diff] [blame] | 4 | # Largely inspired by the P4.org tutorial VM scripts: |
| 5 | # https://github.com/p4lang/tutorials/ |
| 6 | |
| 7 | set -xe |
| 8 | |
Carmelo Cascone | ea2c110 | 2018-08-21 18:32:58 -0700 | [diff] [blame] | 9 | # Remove unneeded software |
| 10 | sudo apt-get remove -y --purge \ |
| 11 | libreoffice* \ |
| 12 | account-plugin-aim \ |
| 13 | account-plugin-facebook \ |
| 14 | account-plugin-flickr \ |
| 15 | account-plugin-jabber \ |
| 16 | account-plugin-salut \ |
| 17 | account-plugin-yahoo \ |
| 18 | aisleriot \ |
| 19 | gnome-mahjongg \ |
| 20 | gnome-mines \ |
| 21 | gnome-sudoku \ |
| 22 | landscape-client-ui-install \ |
| 23 | unity-lens-music \ |
| 24 | unity-lens-photos \ |
| 25 | unity-lens-video \ |
| 26 | unity-scope-audacious \ |
| 27 | unity-scope-chromiumbookmarks \ |
| 28 | unity-scope-clementine \ |
| 29 | unity-scope-colourlovers \ |
| 30 | unity-scope-devhelp \ |
| 31 | unity-scope-firefoxbookmarks \ |
| 32 | unity-scope-gmusicbrowser \ |
| 33 | unity-scope-gourmet \ |
| 34 | unity-scope-musicstores \ |
| 35 | unity-scope-musique \ |
| 36 | unity-scope-openclipart \ |
| 37 | unity-scope-texdoc \ |
| 38 | unity-scope-tomboy \ |
| 39 | unity-scope-video-remote \ |
| 40 | unity-scope-virtualbox \ |
| 41 | unity-scope-zotero \ |
| 42 | unity-webapps-common |
| 43 | |
Carmelo Cascone | c5569c2 | 2018-04-18 10:09:15 +0900 | [diff] [blame] | 44 | sudo add-apt-repository ppa:webupd8team/sublime-text-3 -y |
| 45 | sudo add-apt-repository ppa:webupd8team/atom -y |
| 46 | sudo apt-get update |
| 47 | |
| 48 | sudo DEBIAN_FRONTEND=noninteractive apt-get -y install wireshark |
| 49 | echo "wireshark-common wireshark-common/install-setuid boolean true" | sudo debconf-set-selections |
| 50 | sudo DEBIAN_FRONTEND=noninteractive dpkg-reconfigure wireshark-common |
| 51 | |
| 52 | sudo apt-get -y --no-install-recommends install \ |
Carmelo Cascone | c5569c2 | 2018-04-18 10:09:15 +0900 | [diff] [blame] | 53 | atom \ |
| 54 | sublime-text-installer \ |
Carmelo Cascone | ea2c110 | 2018-08-21 18:32:58 -0700 | [diff] [blame] | 55 | vim |
Carmelo Cascone | c5569c2 | 2018-04-18 10:09:15 +0900 | [diff] [blame] | 56 | |
Carmelo Cascone | e59bc37 | 2019-01-08 14:33:18 -0800 | [diff] [blame^] | 57 | # TODO: Disable screensaver and automatically log into the SDN user |
Carmelo Cascone | c5569c2 | 2018-04-18 10:09:15 +0900 | [diff] [blame] | 58 | |
| 59 | # Sublime |
| 60 | cd /home/sdn |
| 61 | mkdir -p ~/.config/sublime-text-3/Packages/ |
| 62 | cd .config/sublime-text-3/Packages/ |
| 63 | git clone https://github.com/c3m3gyanesh/p4-syntax-highlighter.git |
| 64 | |
| 65 | # Atom |
| 66 | apm install language-p4 |
| 67 | |
| 68 | # Adding Desktop icons |
| 69 | DESKTOP=/home/sdn/Desktop |
| 70 | mkdir -p ${DESKTOP} |
| 71 | |
Carmelo Cascone | ea2c110 | 2018-08-21 18:32:58 -0700 | [diff] [blame] | 72 | cat > ${DESKTOP}/Wireshark.desktop << EOF |
Carmelo Cascone | c5569c2 | 2018-04-18 10:09:15 +0900 | [diff] [blame] | 73 | [Desktop Entry] |
| 74 | Encoding=UTF-8 |
| 75 | Type=Application |
| 76 | Name=Wireshark |
| 77 | Name[en_US]=Wireshark |
| 78 | Icon=wireshark |
| 79 | Exec=/usr/bin/wireshark |
| 80 | Comment[en_US]= |
| 81 | EOF |
| 82 | |
Carmelo Cascone | ea2c110 | 2018-08-21 18:32:58 -0700 | [diff] [blame] | 83 | cat > ${DESKTOP}/Sublime\ Text.desktop << EOF |
Carmelo Cascone | c5569c2 | 2018-04-18 10:09:15 +0900 | [diff] [blame] | 84 | [Desktop Entry] |
| 85 | Encoding=UTF-8 |
| 86 | Type=Application |
| 87 | Name=Sublime Text |
| 88 | Name[en_US]=Sublime Text |
| 89 | Icon=sublime-text |
| 90 | Exec=/opt/sublime_text/sublime_text |
| 91 | Comment[en_US]= |
| 92 | EOF |
| 93 | |
Carmelo Cascone | ea2c110 | 2018-08-21 18:32:58 -0700 | [diff] [blame] | 94 | cat > ${DESKTOP}/Atom.desktop << EOF |
Carmelo Cascone | c5569c2 | 2018-04-18 10:09:15 +0900 | [diff] [blame] | 95 | [Desktop Entry] |
| 96 | Encoding=UTF-8 |
| 97 | Type=Application |
| 98 | Name=Atom |
| 99 | Name[en_US]=Atom |
| 100 | Icon=atom |
| 101 | Exec=/usr/bin/atom |
| 102 | Comment[en_US]= |
| 103 | EOF |
Carmelo Cascone | ea2c110 | 2018-08-21 18:32:58 -0700 | [diff] [blame] | 104 | |
| 105 | chmod +x ${DESKTOP}/*.desktop |