blob: 6cff71bcdb885f4d104d92c89589e5f82a04a544 [file] [log] [blame]
Carmelo Casconec5569c22018-04-18 10:09:15 +09001#!/usr/bin/env bash
2
Carmelo Casconee59bc372019-01-08 14:33:18 -08003# Installs desktop utilities and code editors.
Carmelo Casconec5569c22018-04-18 10:09:15 +09004# Largely inspired by the P4.org tutorial VM scripts:
5# https://github.com/p4lang/tutorials/
6
7set -xe
8
Carmelo Casconeea2c1102018-08-21 18:32:58 -07009# Remove unneeded software
10sudo 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 Casconec5569c22018-04-18 10:09:15 +090044sudo add-apt-repository ppa:webupd8team/sublime-text-3 -y
45sudo add-apt-repository ppa:webupd8team/atom -y
46sudo apt-get update
47
48sudo DEBIAN_FRONTEND=noninteractive apt-get -y install wireshark
49echo "wireshark-common wireshark-common/install-setuid boolean true" | sudo debconf-set-selections
50sudo DEBIAN_FRONTEND=noninteractive dpkg-reconfigure wireshark-common
51
52sudo apt-get -y --no-install-recommends install \
Carmelo Casconec5569c22018-04-18 10:09:15 +090053 atom \
54 sublime-text-installer \
Carmelo Casconeea2c1102018-08-21 18:32:58 -070055 vim
Carmelo Casconec5569c22018-04-18 10:09:15 +090056
Carmelo Casconee59bc372019-01-08 14:33:18 -080057# TODO: Disable screensaver and automatically log into the SDN user
Carmelo Casconec5569c22018-04-18 10:09:15 +090058
59# Sublime
60cd /home/sdn
61mkdir -p ~/.config/sublime-text-3/Packages/
62cd .config/sublime-text-3/Packages/
63git clone https://github.com/c3m3gyanesh/p4-syntax-highlighter.git
64
65# Atom
66apm install language-p4
67
68# Adding Desktop icons
69DESKTOP=/home/sdn/Desktop
70mkdir -p ${DESKTOP}
71
Carmelo Casconeea2c1102018-08-21 18:32:58 -070072cat > ${DESKTOP}/Wireshark.desktop << EOF
Carmelo Casconec5569c22018-04-18 10:09:15 +090073[Desktop Entry]
74Encoding=UTF-8
75Type=Application
76Name=Wireshark
77Name[en_US]=Wireshark
78Icon=wireshark
79Exec=/usr/bin/wireshark
80Comment[en_US]=
81EOF
82
Carmelo Casconeea2c1102018-08-21 18:32:58 -070083cat > ${DESKTOP}/Sublime\ Text.desktop << EOF
Carmelo Casconec5569c22018-04-18 10:09:15 +090084[Desktop Entry]
85Encoding=UTF-8
86Type=Application
87Name=Sublime Text
88Name[en_US]=Sublime Text
89Icon=sublime-text
90Exec=/opt/sublime_text/sublime_text
91Comment[en_US]=
92EOF
93
Carmelo Casconeea2c1102018-08-21 18:32:58 -070094cat > ${DESKTOP}/Atom.desktop << EOF
Carmelo Casconec5569c22018-04-18 10:09:15 +090095[Desktop Entry]
96Encoding=UTF-8
97Type=Application
98Name=Atom
99Name[en_US]=Atom
100Icon=atom
101Exec=/usr/bin/atom
102Comment[en_US]=
103EOF
Carmelo Casconeea2c1102018-08-21 18:32:58 -0700104
105chmod +x ${DESKTOP}/*.desktop