forked from nicolargo/ubuntupostinstall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathubuntu-11.04-postinstall.sh
executable file
·314 lines (248 loc) · 10.1 KB
/
ubuntu-11.04-postinstall.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
#!/bin/bash
# Mon script de post installation Ubuntu
#
# Nicolargo - 06/2011
# GPL
#
# Syntaxe: # sudo ./ubuntupostinstall.sh
VERSION="1.48"
#=============================================================================
# Liste des applications à installer: A adapter a vos besoins
# Voir plus bas les applications necessitant un depot specifique
LISTE=""
# Developpement
LISTE=$LISTE" build-essential vim subversion git rabbitvcs-nautilus anjuta textadept"
# Java: http://doc.ubuntu-fr.org/java
LISTE=$LISTE" sun-java6-jre sun-java6-plugin sun-java6-fonts"
# Multimedia
LISTE=$LISTE" x264 ffmpeg2theora oggvideotools istanbul shotwell mplayer hugin nautilus-image-converter pavucontrol gimp gimp-save-for-web ogmrip transmageddon guvcview wavpack mppenc faac flac vorbis-tools faad lame nautilus-script-audio-convert cheese sound-juicer picard avidemux arista nautilus-arista milkytracker"
# Network
LISTE=$LISTE" iperf ifstat wireshark tshark arp-scan htop netspeed nmap netpipe-tcp"
# Systeme
LISTE=$LISTE" preload gloobus-preview gparted lm-sensors sensors-applet compizconfig-settings-manager drapes hardinfo fortune-mod libnotify-bin compiz-fusion-plugins-extra"
# Web
LISTE=$LISTE" pidgin pidgin-facebookchat pidgin-plugin-pack flashplugin-installer xchat googleearth-package lsb-core ttf-mscorefonts-installer"
#=============================================================================
# Test que le script est lance en root
if [ $EUID -ne 0 ]; then
echo "Le script doit être lancé en root: # sudo $0" 1>&2
exit 1
fi
HOME_PATH=`grep $USERNAME /etc/passwd | awk -F':' '{ print $6 }'`
# On commence par installer aptitude
#-----------------------------------
apt-get -y install aptitude
# Ajout des depots
#-----------------
#UBUNTUVERSION=`lsb_release -c | awk '{print$2}'`
UBUNTUVERSION=`lsb_release -cs`
echo "Ajout des depots pour Ubuntu $UBUNTUVERSION"
# Mon depot a moi
#add-apt-repository ppa:nicolashennion/ppa
#LISTE=$LISTE" sjitter"
# Spideroak
#add-apt-repository "deb http://apt.spideroak.com/debian/ stable non-free"
#wget -q http://apt.spideroak.com/spideroak-apt-pubkey.asc -O- | apt-key add -
#LISTE=$LISTE" spideroak"
# Restricted extra
# The Ubuntu Restricted Extras will install Adobe Flash Player, Java Runtime Environment (JRE) (sun-java-jre) with Firefox plug-ins (icedtea), a set of Microsoft Fonts (msttcorefonts), multimedia codecs (w32codecs or w64codecs), mp3-compatible encoding (lame), FFMpeg, extra Gstreamer codecs, the package for DVD decoding (libdvdread4, but see below for info on libdvdcss2), the unrar archiver, odbc, and cabextract. It also installs multiple "stripped" codecs and avutils (libavcodec-unstripped-52 and libavutil-unstripped-49).
LISTE=$LISTE" ubuntu-restricted-extras"
# Dropbox + pre-requirement Dropbox scripts
add-apt-repository "deb http://www.getdropbox.com/static/ubuntu $UBUNTUVERSION main"
apt-key adv --keyserver pgp.mit.edu --recv-keys FC918B335044912E
LISTE=$LISTE" nautilus-dropbox xclip zenity"
# PPAsearch
#add-apt-repository ppa:wrinkliez/ppasearch
#LISTE=$LISTE" ppasearch"
# GStreamer, daily build
add-apt-repository ppa:gstreamer-developers
LISTE=$LISTE" "`aptitude -w 2000 search gstreamer | cut -b5-60 | xargs -eol`
# Shutter, outil de capture d'ecran
add-apt-repository ppa:shutter
LISTE=$LISTE" shutter"
# Firefox (Daily build)
#add-apt-repository ppa:mozillateam/firefox-stable
#add-apt-repository ppa:mozillateam/firefox-next
#LISTE=$LISTE" firefox-4.0"
# Chromium, LE navigateur Web (dev-channel PPA)
add-apt-repository ppa:chromium-daily/dev
LISTE=$LISTE" chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg-extra chromium-codecs-ffmpeg-nonfree"
# Wine
add-apt-repository ppa:ubuntu-wine
LISTE=$LISTE" wine"
# X264 / THEORA
add-apt-repository ppa:nilarimogard/webupd8
# VLC
add-apt-repository ppa:ferramroberto/vlc
LISTE=$LISTE" vlc vlc-plugin-pulse"
# VLMC
add-apt-repository ppa:webupd8team/vlmc
LISTE=$LISTE" vlmc"
# Banshee
#add-apt-repository ppa:banshee-team/banshee-daily
#LISTE=$LISTE" banshee banshee-extension-soundmenu"
# Clementine
#add-apt-repository ppa:me-davidsansome/clementine-dev
#LISTE=$LISTE" clementine"
# GUVCView
add-apt-repository ppa:pj-assis/ppa
# Ubuntu tweak
add-apt-repository ppa:tualatrix/ppa
LISTE=$LISTE" ubuntu-tweak"
# Darktable
#add-apt-repository ppa:pmjdebruijn/darktable-release
#LISTE=$LISTE" darktable"
# Pino
#add-apt-repository ppa:vala-team/ppa
#add-apt-repository ppa:troorl/pino
#LISTE=$LISTE" pino"
# Hotot
add-apt-repository ppa:hotot-team
LISTE=$LISTE" hotot"
# Equinox Themes and Faenza Icon Theme
add-apt-repository ppa:tiheum/equinox
LISTE=$LISTE" gtk2-engines-equinox equinox-theme faenza-icon-theme faenza-extras faenza-icon-mono"
# Conky
#add-apt-repository ppa:conkyhardcore/ppa
#LISTE=$LISTE" conky-all conkybanshee"
# Terminator
add-apt-repository ppa:gnome-terminator/ppa
LISTE=$LISTE" terminator"
# Kazam screencast
#add-apt-repository ppa:and471/kazam-daily-stable
#LISTE=$LISTE" kazam"
# GMailWatcher (http://www.omgubuntu.co.uk/2010/07/gmailwatcher-another-way-to-get-gmail-alerts-in-the-ubuntu-messaging-menu/)
add-apt-repository ppa:loneowais/ppa
LISTE=$LISTE" gmailwatcher"
# WorkSpaces indicator (http://www.omgubuntu.co.uk/2010/10/indicator-workspaces-adds-options-maverick-ppa-plus-hints-at-future-features/)
#add-apt-repository ppa:geod/ppa-geod
#LISTE=$LISTE" indicator-workspaces"
# GetDeb
grep '^deb\ .*getdeb' /etc/apt/sources.list > /dev/null
if [ $? -ne 0 ]
then
#echo -e "\n## GetDeb\ndeb http://archive.getdeb.net/ubuntu $UBUNTUVERSION-getdeb apps\n" >> /etc/apt/sources.list
#wget -q -O- http://archive.getdeb.net/getdeb-archive.key | apt-key add -
echo -e "\n## GetDeb\ndeb http://mirrors.dotsrc.org/getdeb/ubuntu lucid-getdeb apps\ndeb-src http://mirrors.dotsrc.org/getdeb/ubuntu lucid-getdeb apps\n" >> /etc/apt/sources.list
apt-key adv --recv-keys --keyserver pgp.mit.edu 46D7E7CF
fi
# Depot partenaires
egrep '^deb\ .*partner' /etc/apt/sources.list > /dev/null
if [ $? -ne 0 ]
then
echo "## 'partner' repository"
echo -e "deb http://archive.canonical.com/ubuntu $UBUNTUVERSION partner\n" >> /etc/apt/sources.list
echo -e "deb-src http://archive.canonical.com/ubuntu $UBUNTUVERSION partner\n" >> /etc/apt/sources.list
fi
# WebUpd8 (lots of fresh software)
add-apt-repository ppa:nilarimogard/webupd8
# Nautilus elementary
add-apt-repository ppa:am-monkeyd/nautilus-elementary-ppa
# Elementary art
#add-apt-repository ppa:elementaryart
#LISTE=$LISTE" elementary-theme elementary-icon-theme"
# Spotify
egrep '^deb\ .*spotify' /etc/apt/sources.list > /dev/null
if [ $? -ne 0 ]
then
echo "## 'Spotify' repository"
echo -e "deb http://repository.spotify.com stable non-free\n" >> /etc/apt/sources.list
gpg --keyserver wwwkeys.de.pgp.net --recv-keys 4E9CFF4E
gpg --export 4E9CFF4E | apt-key add -
fi
LISTE=$LISTE" spotify-client-qt spotify-client-gnome-support"
# Dropbox Share/UnShare scripts
add-apt-repository ppa:nilarimogard/webupd8
LISTE=$LISTE" dropbox-share"
# Gedit Gmate
apt-add-repository ppa:ubuntu-on-rails/ppa
LISTE=$LISTE" gedit-gmate"
# XBMC
#apt-add-repository ppa:team-xbmc/ppa
#LISTE=$LISTE" xbmc"
# VirtualBox 4.0
egrep '^deb\ .*virtualbox' /etc/apt/sources.list > /dev/null
if [ $? -ne 0 ]
then
echo "deb http://download.virtualbox.org/virtualbox/debian $UBUNTUVERSION contrib" | tee -a /etc/apt/sources.list
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | apt-key add -
fi
LISTE=$LISTE" virtualbox-4.0 dkms"
# LibreOffice
add-apt-repository ppa:libreoffice/ppa
LISTE=$LISTE" libreoffice libreoffice-gnome"
# Handbrake
add-apt-repository ppa:stebbins/handbrake-releases
LISTE=$LISTE" handbrake-gtk"
# Sysmonitor
add-apt-repository ppa:alexeftimie/ppa
LISTE=$LISTE" indicator-sysmonitor dstat"
# Jupiter: Power saver for laptop
add-apt-repository ppa:webupd8team/jupiter
LISTE=$LISTE" jupiter"
# Mise a jour de la liste des depots
#-----------------------------------
echo "Mise a jour de la liste des depots"
# Update
aptitude update 2>&1 | grep NO_PUBKEY | perl -pwe 's#^.+NO_PUBKEY (.+)$#$1#' | xargs apt-key adv --recv-keys --keyserver keyserver.ubuntu.com
# Upgrade
aptitude dist-upgrade
# Installations additionnelles
#-----------------------------
echo "Installation des logiciels suivants: $LISTE"
aptitude -y install $LISTE
# GoogleEarth (besoin de generer package)
make-googleearth-package --force
sudo dpkg -i googleearth*.deb
rm -f googleearth*.deb GoogleEarthLinux.bin
# DVD
sudo sh /usr/share/doc/libdvdread4/install-css.sh
# Fortune
cd /usr/share/games/fortunes/
wget http://www.fortunes-fr.org/data/litterature_francaise
strfile litterature_francaise litterature_francaise.dat
wget http://www.fortunes-fr.org/data/personnalites
strfile personnalites personnalites.dat
wget http://www.fortunes-fr.org/data/proverbes
strfile proverbes proverbes.dat
wget http://www.fortunes-fr.org/data/philosophie
strfile philosophie philosophie.dat
wget http://www.fortunes-fr.org/data/sciences
strfile sciences sciences.dat
cd -
# Custom du systeme
gconftool-2 --type Boolean --set /desktop/gnome/interface/menus_have_icons True
gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"
# Custom .bashrc
cat >> $HOME_PATH/.bashrc << EOF
alias alert_helper='history|tail -n1|sed -e "s/^\s*[0-9]\+\s*//" -e "s/;\s*alert$//"'
alias alert='notify-send -i /usr/share/icons/gnome/32x32/apps/gnome-terminal.png "[$?] $(alert_helper)"'
export MOZ_DISABLE_PANGO=1
EOF
source $HOME_PATH/.bashrc
# Hotot mono tray icon
cd ~
wget http://gnome-look.org/CONTENT/content-files/133268-hotot.zip
unzip 133268-hotot.zip
mv *hotot.png /usr/share/hotot/ui/imgs/
rm 133268-hotot.zip
cd -
# Ajout info system dans le panel
# Sensors detect
sensors-detect
# Restart Nautilus
nautilus -q
echo "========================================================================"
echo
echo "Liste des logiciels installés: $LISTE"
echo
echo "Quelques actions à faire en bonus:"
echo
echo "1) Ajouter le profil audio MP3 HQ: gnome-audio-profiles-properties"
echo ">> audio/x-raw-int,rate=44100,channels=2 ! lamemp3enc name=enc target=1 bitrate=320 cbr=1 ! id3v2mux"
echo
echo "2) Theme Gnome (Système/Préference/Apparence): Equinox Evolution Dawn"
echo
echo "========================================================================"
# Fin du script
#---------------