forked from MarkRijckenberg/shell-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrestore-packagelist.bash
executable file
·1781 lines (1574 loc) · 92.2 KB
/
restore-packagelist.bash
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
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
# !!!!! WINDOWS 8.1 64-bit users should use ninite.com, Glary Utilities and avast! Premier Software Updater
# !!!!! for semi-automated Windows application deployments and updates
# !!!!! WINDOWS 8.1 64-bit users should install "Classic Start" Ninite.com utility
# !!!!! and disable Superfetch Windows service to avoid hard disk thrashing and excessive memory use
# !!!!! WINDOWS 8.1 64-bit users should use http://www.pendrivelinux.com/yumi-multiboot-usb-creator/ to
# !!!!! to add operating systems one by one in a flexible manner onto a multi-boot multi-OS USB stick
# !!!!! WINDOWS 8.1 64-bit users should install new games via Steam and via www.pokki.com
# !!!!! WINDOWS 8.1 64-bit App Store URL: http://windows.microsoft.com/en-us/windows-8/apps#Cat=t1
# !!!!! WINDOWS 8.1 64-bit Second App Store URL: http://www.pokki.com/
# TYPE: Bash Shell script.
# PURPOSE: This bash shell script allows you to easily restore packages into a clean install of Xubuntu 14.04 LTS 64-bit
# REQUIRES: Xubuntu 14.04 LTS 64-bit (to support UEFI+SecureBoot+biber+bibtex+bluetooth), cinnamon-bluetooth,
# wget, apt-get, unp, wine, biber, biblatex
# Use Cinnamon instead of Unity interface, because Unity causes Teamviewer sessions to slow down due to window
# animation in Unity
# REQUIRED FREE DISKSPACE FOR Xubuntu 14.04 LTS: 5 GB of free disk space in root partition
# REQUIRED FREE DISKSPACE FOR BASEPACKAGES: 1.4 GB of free disk space in root partition after installing Linux Mint DVD
# REQUIRED FREE DISKSPACE FOR PPA PACKAGES: 1.4 GB of free disk space in root partition after installing Linux Mint DVD
# TOTAL AMOUNT OF REQUIRED DISKSPACE FOR Xubuntu 14.04 LTS + BASEPACKAGES + PPA PACKAGES
# = 5 GB + 1.4 GB + 1.4 GB = 7.8 GB
# COMPATIBILITY WITH WIRELESS BLUETOOTH SPEAKERS: bluetooth speakers fully work in Linux Mint 16 Cinnamon
# thanks to cinnamon-bluetooth package.
# To make bluetooth speakers work in lxqt desktop, run these 4 Terminal commands:
# 1) pactl list | grep -i module-bluetooth-discover
# 2) pactl load-module module-bluetooth-discover
# 3) pavucontrol
# 4) sudo apt-get remove blueman
# -> select bluetooth speakers as output in pavucontrol
# INSTALL DURATION: 20 minutes for install of Linux Mint + 74 minutes for install of base packages and PPA packages
# Author: Mark Rijckenberg
# Copyright (c) 20120812
# REVISION DATE: 20140112
# Updated by: markrijckenberg at gmail dot com
#sudo su
PATH=/usr/sbin:/usr/bin:/sbin:/bin
#Prerequisites: USB drives SAMSUNG and IOMEGA need to be mounted correctly in order for this script to work correctly!
MACHINE_TYPE=`uname -m`
# define basepackage filename variables - VERSION NUMBERS FREQUENTLY CHANGE!!
# updated on 2014-08-26
YEDFILENAME="yEd-3.13_32-bit_setup.sh"
# define Astronomy filename variables
DUFILENAME="DUv3_9pview.tgz"
NIGHTSHADEFILENAME="nightshade-11.12.1.tar.gz"
SCISOFTFILENAME="scisoft-7.7.0"
SKYVIEWERFILENAME="skyviewer-1.0.0"
C2AFILENAME="c2a_full_2_0_49.zip"
AUDELAFILENAME="audela-2.0.0"
# define Data Science filename variables
RSTUDIOFILENAME="rstudio-0.98.1056"
#define source directories
HOME=$(eval echo ~${SUDO_USER})
SOURCE2=/etc/
SOURCE3=/media/windows/rsync/
#define target directories where backup will be stored
cd $HOME
TARGET1=/media/SAMSUNG/$HOME/
TARGET2=/media/IOMEGA/$HOME/
TARGET3=/media/SAMSUNG/etc/
TARGET4=/media/IOMEGA/etc/
TARGET5=/media/SAMSUNG/media/windowsdata/rsync/
TARGET6=/media/IOMEGA/media/windowsdata/rsync/
ZIP=zip/
TAR=tar/
PDF=pdf/
DEB=deb/
KMZ=kmz/
mkdir $ZIP
mkdir $TAR
mkdir $PDF
mkdir $DEB
mkdir $KMZ
mkdir triatlas
# clean up current directory
cd $HOME
echo "Performing file cleanup"
mv *.zip $ZIP
mv *.pdf $PDF
mv *.deb $DEB
mv *.km? $KMZ
mv *gz $TAR
rm *.exe
#sudo /usr/bin/rsync -quvra --exclude='.*' --exclude "$HOME.gvfs" --max-size='100M' $TARGET1 $HOME
#sudo /usr/bin/rsync -quvra --exclude='.*' --exclude "$HOME.gvfs" --max-size='100M' $TARGET2 $HOME
#sudo /usr/bin/rsync -quvra --exclude='.*' --exclude "$HOME.gvfs" --max-size='100M' $TARGET3 $SOURCE2
#sudo /usr/bin/rsync -quvra --exclude='.*' --exclude "$HOME.gvfs" --max-size='100M' $TARGET4 $SOURCE2
# not required during restore: sudo /usr/bin/rsync -quvra --exclude='.*' --exclude "$HOME.gvfs" --max-size='100M' $TARGET5 $SOURCE3
# not required during restore: sudo /usr/bin/rsync -quvra --exclude='.*' --exclude "$HOME.gvfs" --max-size='100M' $TARGET6 $SOURCE3
#sudo DEBIAN_FRONTEND=noninteractive apt-get install dselect rsync -y
#sudo DEBIAN_FRONTEND=noninteractive apt-key add $TARGET1/Repo.keys
# sudo DEBIAN_FRONTEND=noninteractive apt-key add Repo.keys
#sudo dpkg --set-selections < $TARGET1/Package.list
#sudo dpkg --set-selections < Package.list
#sudo dselect
#sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
#sudo cp sources.list.12.04 /etc/apt/sources.list
###############################################################################################
# BASE PACKAGES SECTION #
###############################################################################################
# define aliases in ~/.bashrc file
echo "alias apti='sudo aptitude update && sudo aptitude install '" >> ~/.bashrc
echo "alias aptr='sudo aptitude remove '" >> ~/.bashrc
echo "alias aptp='sudo aptitude purge '" >> ~/.bashrc
echo "alias aptu='sudo aptitude update'" >> ~/.bashrc
echo "alias apts='sudo aptitude search '" >> ~/.bashrc
echo "alias d-u='sudo aptitude update && sudo aptitude dist-upgrade'" >> ~/.bashrc
# turn off apport error/crash reporting
sudo sed -i s/enabled=1/enabled=0/ /etc/default/apport
##########################################################################################################
# add PPA repositories
##########################################################################################################
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:hsoft/ppa
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:lubuntu-dev/lubuntu-daily
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:gilir/q-project
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:danielrichter2007/grub-customizer
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:libreoffice/ppa
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:mjblenner/ppa-hal
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:i-nex-development-team/daily
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:nemh/gambas3
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:peterlevi/ppa
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:linrunner/tlp
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:kazam-team/stable-series
sudo DEBIAN_FRONTEND=noninteractive apt-add-repository --yes ppa:dhor/myway
sudo DEBIAN_FRONTEND=noninteractive apt-add-repository --yes ppa:finalterm/daily
sudo DEBIAN_FRONTEND=noninteractive apt-add-repository --yes ppa:webupd8team/atom
sudo DEBIAN_FRONTEND=noninteractive apt-add-repository --yes ppa:philip5/extra
sudo DEBIAN_FRONTEND=noninteractive apt-add-repository --yes ppa:openshot.developers/ppa
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:stebbins/handbrake-releases
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:lyc256/sopcast-player-ppa
sudo DEBIAN_FRONTEND=noninteractive apt-add-repository --yes ppa:surfernsk/internet-software
sudo DEBIAN_FRONTEND=noninteractive apt-add-repository --yes ppa:makson96/desurium
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:noneed4anick/cuttlefish
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:tualatrix/ppa
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:webupd8team/y-ppa-manager
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:ubuntu-wine/ppa
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:oibaf/graphics-drivers
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:noobslab/apps
# very important security related PPA that was the first repository to fix the
# CVE-2014-6277 bash shellshock vulnerability on October 8, 2014:
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:ubuntu-security-proposed/ppa
# add repository for eid-mw and eid-viewer software packages
# replace codename (for example: trusty) with right Ubuntu codename
RELEASE=`awk -F'[" ]' '/VERSION=/{print $3}' /etc/os-release| awk '{print tolower($0)}'`
sudo touch /etc/apt/sources.list.d/eid.list
sudo sh -c 'echo "deb http://files.eid.belgium.be/debian trusty main" >> /etc/apt/sources.list.d/eid.list'
# add repository for google music manager software package
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/musicmanager/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
# add partner repository for skype software package
# replace codename (for example: trusty) with right Ubuntu codename
sudo touch /etc/apt/sources.list.d/partner.list
sudo sh -c 'echo "deb http://archive.canonical.com/ubuntu trusty partner" >> /etc/apt/sources.list.d/partner.list'
sudo sh -c 'echo "deb-src http://archive.canonical.com/ubuntu trusty partner" >> /etc/apt/sources.list.d/partner.list'
##########################################################################################################
# refresh list of available packages in Ubuntu repositories
sudo DEBIAN_FRONTEND=noninteractive apt-key add Repo.keys
sudo DEBIAN_FRONTEND=noninteractive apt-get update
##########################################################################################################
# install list of packages defined in packages files
# allpackages = basepackages + astropackages
# sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install `cat allpackages` -o APT::Install-Suggests="false"
# commented out following line, because it will break bluetooth support in Linux Mint
# sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes purge pulseaudio*
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes purge arno-iptables-firewall
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes purge ufw
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes purge blueman
##########################################################################################################
# install Citrix Receiver icaclient in Ubuntu 14.04 LTS - only works using Mozilla Firefox, not using Google Chrome
# source 1: http://ubuntuforums.org/showthread.php?t=2181903
# source 2: http://blog.vinnymac.org/?p=351
# source 3: https://help.ubuntu.com/community/CitrixICAClientHowTo
##########################################################################################################
cd $HOME
sudo dpkg -P icaclient
rm -rf $HOME/foo
sudo dpkg --add-architecture i386 # only needed once
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install firefox apt-file git nspluginwrapper lib32z1 libc6-i386 libxml2:i386 libstdc++6:i386 libxerces-c3.1:i386 libcanberra-gtk-module:i386 libcurl3:i386 libasound2-plugins:i386 libgstreamer-plugins-base0.10-0:i386 openssl ca-certificates
sudo apt-file update --architecture i386
sudo apt-file update --architecture amd64
git clone https://github.com/CloCkWeRX/citrix-receiver-ubuntu-fixed.git foo
find foo/opt/Citrix/ICAClient/ -exec file {} ';' | grep "ELF" | grep "executable" > ica_elf_list
cat ica_elf_list | while read f; do arch=$(echo "$f" | grep -o '..-bit' | sed 's/32-bit/i386/' | sed 's/64-bit/amd64/'); file=$(echo "$f" | awk '{print $1}' | sed 's/://g'); ldd "$file" | sed "s/^/$arch/g"; done | sort | uniq > ica_so_list
cat ica_so_list | awk '{print $4}' | grep '^/' | sort | uniq | while read f; do dpkg -S "$f"; done > ica_deb_list
cat ica_deb_list | awk '{print $1}' | sed 's/:$//g' | sort | uniq > ica_deb_list_final
cat ica_so_list | grep "not found" > ica_so_missing
cat ica_so_missing | while read f; do arch=$(echo "$f" | awk '{print $1}'); file=$(echo "$f" | awk '{print $2}'); apt-file find -x "$file$" -a $arch | sed "s/: /:$arch provides /g"; done > ica_missing_packages
cat ica_missing_packages | awk '{print $3}' | sort | uniq | while read provided; do providers=$(grep "provides $provided" ica_missing_packages | awk '{print $1}'); count=$(echo $providers | wc -w); selected=$providers; if [ $count -gt 1 ]; then echo "Multiple packages can provide $provided, please select one:" >&2; select selected in $providers; do break; done < /dev/tty; echo "You selected $selected" >&2; fi; echo $selected; done > ica_selected_packages
missing=$(cat ica_selected_packages | awk '{print $1}'); sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install $missing
cat ica_elf_list | while read f; do arch=$(echo "$f" | grep -o '..-bit' | sed 's/32-bit/i386/' | sed 's/64-bit/amd64/'); file=$(echo "$f" | awk '{print $1}' | sed 's/://g'); ldd "$file" | sed "s/^/$arch/g"; done | sort | uniq > ica_so_list
cat ica_so_list | awk '{print $4}' | grep '^/' | sort | uniq | while read f; do dpkg -S "$f"; done > ica_deb_list
cat ica_deb_list | awk '{print $1}' | sed 's/:$//g' | sort | uniq > ica_deb_list_final
cat ica_so_list | grep "not found" > ica_so_missing
cat ica_so_missing | while read f; do arch=$(echo "$f" | awk '{print $1}'); file=$(echo "$f" | awk '{print $2}'); apt-file find -x "$file$" -a $arch | sed "s/: /:$arch provides /g"; done > ica_missing_packages
# make sure ica_so_missing file is now empty:
cat ica_so_missing
checked=""; unnecessary=""; unchecked="$(cat ica_deb_list_final) EOF"; while read -d ' ' f <<< $unchecked; do checked="$f $checked"; candidates=$(apt-cache depends "$f" | grep '\sDepends' | awk '{print $2}' | sed 's/[<>]//g'); unchecked="$(for d in $candidates; do if ! grep -q $d <<< $checked; then echo -n "$d "; fi; done) $unchecked"; unchecked="$(echo $unchecked | sed "s/$f //g")"; unnecessary="$(for d in $candidates; do if ! grep -q $d <<< $unnecessary; then echo -n "$d "; fi; done) $unnecessary"; done; for u in $unnecessary; do echo "$u"; done > ica_implicit_dependencies
original=$(cat ica_deb_list_final); for f in $original; do if ! grep -q $f ica_implicit_dependencies; then echo "$f"; fi; done > ica_explicit_dependencies
sed -i 's/grep "i\[0-9\]86"/grep "i\\?[x0-9]86"/g' foo/DEBIAN/postinst
new_depends="$(cat ica_explicit_dependencies | tr '\n' ',') nspluginwrapper"; sed -i "s/^Depends: .*$/Depends: $new_depends/" foo/DEBIAN/control
rm -rf foo/opt/Citrix/ICAClient/keystore/cacerts
ln -s /etc/ssl/certs foo/opt/Citrix/ICAClient/keystore/cacerts
mkdir -p foo/usr/share/applications
printf '[Desktop Entry]\nName=Citrix ICA client\nComment="Launch Citrix applications from .ica files"\nCategories=Network;\nExec=/opt/Citrix/ICAClient/wfica\nTerminal=false\nType=Application\nNoDisplay=true\nMimeType=application/x-ica' > foo/usr/share/applications/wfica.desktop
dpkg -b foo icaclient_amd64_fixed_for_14.04_LTS.deb
sudo dpkg -i icaclient_amd64_fixed_for_14.04_LTS.deb
sudo ln -s /usr/share/ca-certificates/mozilla/* /opt/Citrix/ICAClient/keystore/cacerts
sudo c_rehash /opt/Citrix/ICAClient/keystore/cacerts/
xdg-mime default wfica.desktop application/x-ica
# Thank you Michael May for reminding me to add the following step:
# Click on the “open menu” icon in the top right corner of the Mozilla Firefox interface.
# Then click on the Add-ons icon
# Click on Plugins and then on “Citrix Receiver for Linux”
# Choose “Always activate” option next to “Citrix Receiver for Linux”
# Attempt to access your Citrix site. If Firefox prompts you to open a .ica file, choose
# to open it with /opt/Citrix/ICAClient/wfica.sh, and tell Firefox to remember that choice.
##########################################################################################################
# install eid card reader middleware - replace codename (for example: trusty) with right Ubuntu codename
# Supported CCID readers: http://pcsclite.alioth.debian.org/ccid/section.html
##########################################################################################################
# Supported CCID readers: http://pcsclite.alioth.debian.org/ccid/section.html
cd $HOME
# RELEASE = saucy,trusty, etc...... = distribution codename
#RELEASE=`awk -F'[" ]' '/VERSION=/{print $3}' /etc/os-release| awk '{print tolower($0)}'`
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes remove --purge beid*
#sudo touch /etc/apt/sources.list.d/eid.list
#sudo sh -c 'echo "deb http://files.eid.belgium.be/debian trusty main" >> /etc/apt/sources.list.d/eid.list'
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install usbutils pciutils eid-mw eid-viewer aptitude firefox pcscd default-jre opensc libacr38u libacr38ucontrol0 libacsccid1 libccid libudev-dev libusb-1.0-0 libpcsclite1 libpcsclite-dev pcsc-tools
sudo update-pciids
sudo update-usbids
#Manually set the following values in Mozilla Firefox in about:config
#security.ssl.allow_unrestricted_renego_everywhere__temporarily_available_pref;true
#security.ssl.enable_false_start;true
#security.ssl.renego_unrestricted_hosts;*.be
#Manually replace the security.ssl.renego_unrestricted_hosts name
#certif.belgium.be or *.be in about:config, if you want to authenticate on a DIFFERENT site than www.cm.be or test.eid.belgium.be !!!
#Download Belgium Root certificates here:
#http://repository.eid.belgium.be/certificates.php?cert=Root&lang=en
#Import Belgium Root certificates into Firefox.
#The Belgium Root certificates are required if you want to use the applications of the FSP Finance (Belcotax, Intervat, Finprof, etc.).
#Before you begin, make sure your identity card is in the card reader. Then:
#Viewing certificates
#For Linux: Go to Edit > Preferences > Advanced > Encryption and click ‘View certificates’.
#Check-marking certificates
#Follow the steps below for the ‘Belgium Root CA’ and ‘Belgium Root CA2’ certificates. Can you only find one certificate? Then you obviously only have to perform these steps once.
#Find the ‘Belgium Root CA’ or ‘Belgium Root CA2’ certificate and click the line below the arrow.
#Click ‘Edit…’.
#Check ALL three boxes.
#Click ‘OK’.
#Ensure that there are absolutely NO add-ons or plugins installed in Mozilla Firefox.
#Installing the Belgium eid Firefox add-on will NOT work in Ubuntu 13.10 64-bit and only make matters worse!
#Disconnect the eid card reader from the PC.
#Reconnect the eid card reader to the PC.
#Insert eid card into card reader.
#Reboot the PC.
#Test eid card reader here:
#http://test.eid.belgium.be/
#Source: http://wiki.yobi.be/wiki/Belgian_eID
# install dupeguru-me which can find and delete similar music filenames using fuzzy logic
# rerun dupeguru-me on /media/IOMEGA/downloads/Youtube-playlists after each mp3 conversion using YouTubeToMP3
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:hsoft/ppa
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install dupeguru-me
# Install lxqt desktop environment => merge of lxde and razorqt desktops
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:lubuntu-dev/lubuntu-daily
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:gilir/q-project
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install lxqt-metapackage lxqt-panel openbox
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install liblxqt0 libqtxdg0 libqtxdg-data
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install pcmanfm-qt lxsession lximage-qt lxrandr-qt
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install lxqt-about lxqt-appswitcher lxqt-config lxqt-lightdm-greeter
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install lxqt-notificationd lxqt-policykit lxqt-power lxqt-powermanagement lxqt-runner lxqt-session
##########################################################################################################
# install base packages using basepackages file
cd $HOME/shell-scripts
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install aptitude
sudo DEBIAN_FRONTEND=noninteractive aptitude install `cat basepackages` -o APT::Install-Suggests="false"
cd $HOME
##########################################################################################################
# create symbolic link to wkhtmltopdf in /usr/local/bin after installing base packages
sudo ln -s /usr/bin/wkhtmltopdf /usr/local/bin/html2pdf
# install grub customizer
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:danielrichter2007/grub-customizer
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install grub-customizer
# install newest version of Libreoffice
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:libreoffice/ppa
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install libreoffice
#install deprecated, obsolete hal package so that fluendo content and DRM-demanding
# Flash websites are supported in Lubuntu 13.10 or newer
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:mjblenner/ppa-hal
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install hal
#install i-nex - I-nex is similar to CPU-Z in Windows, it uses the same interface to display your hardware information.
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:i-nex-development-team/daily
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:nemh/gambas3
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install i-nex
# install Variety - cool wallpaper changer
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:peterlevi/ppa
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install variety
#install pipelight which allows to run your favorite Silverlight application directly inside your Linux browser
#sudo DEBIAN_FRONTEND=noninteractive apt-add-repository --yes ppa:ehoover/compholio
#sudo DEBIAN_FRONTEND=noninteractive apt-add-repository --yes ppa:mqchael/pipelight
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
#sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install pipelight
# install google-talkplugin
#wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo DEBIAN_FRONTEND=noninteractive apt-key add -
#sudo sh -c 'echo "deb http://dl.google.com/linux/talkplugin/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
#sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install google-talkplugin
# install daily build of firefox-trunk (bleeding edge browser)
#sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes purge firefox
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:ubuntu-mozilla-daily/ppa
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
#sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install firefox-trunk
# Install TLP - advanced power management command line tool for Linux
# TLP saves more laptop power than standard Ubuntu package laptop-mode-tools
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:linrunner/tlp
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install tlp tlp-rdw
# Install kazam screen recording tool for Ubuntu 12.04 / 12.10 / 13.04
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:kazam-team/stable-series
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install kazam
# install hotshots Screen Capture Tool In Ubuntu 12.04 / 12.10 / 13.04
#sudo DEBIAN_FRONTEND=noninteractive apt-add-repository --yes ppa:dhor/myway
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install hotshots
# install Final Term - excellent Terminal emulator in Ubuntu 12.04 / 12.10 / 13.04
#sudo DEBIAN_FRONTEND=noninteractive apt-add-repository --yes ppa:finalterm/daily
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
#sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install finalterm
# install xiki shell - A shell console with GUI features
# http://xiki.org
# source: https://github.com/trogdoro/xiki
cd $HOME
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install ruby1.9.3 ruby-dev
git clone git://github.com/trogdoro/xiki.git
cd xiki
sudo gem install bundler # <- no "sudo" if using rvm
bundle # <- no "sudo" if using rvm
sudo ruby etc/command/copy_xiki_command_to.rb /usr/bin/xiki
xiki web/start
# then navigate to http://localhost:8161/dbs
# to view the locally installed mysql databases, tables and fields
cd $HOME
# install Google Music Manager - sync local mp3s in Ubuntu with ios or Android device
#wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
#sudo sh -c 'echo "deb http://dl.google.com/linux/musicmanager/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install google-musicmanager-beta
#sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install google-musicmanager
# install newest version of VLC player
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:videolan/master-daily
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
#sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install vlc
# install newest version of minitube
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install libqtgui4 libqt4-xml libqt4-network libqt4-dbus phonon-backend-vlc
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install minitube
# install spotify - can sync mp3 files between Ubuntu 13.10 and ipod nano 6th generation
#sudo DEBIAN_FRONTEND=noninteractive apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 94558F59
#sudo sh -c 'echo "deb http://repository.spotify.com stable non-free" >> /etc/apt/sources.list.d/spotify.list'
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
#sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install spotify-client
# install atom text editor with integrated github support
#sudo DEBIAN_FRONTEND=noninteractive apt-add-repository --yes ppa:webupd8team/atom
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install atom
# install kdenlive video editor
#sudo DEBIAN_FRONTEND=noninteractive apt-add-repository --yes ppa:philip5/extra
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install kdenlive
# install openshot which is a simple and easy to use video editor, like a good substitute for the windows movie maker
#sudo DEBIAN_FRONTEND=noninteractive apt-add-repository --yes ppa:openshot.developers/ppa
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install openshot
# install Handbrake - open source video transcoder - add Subtitles (VobSub, Closed Captions CEA-608, SSA, SRT)
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:stebbins/handbrake-releases
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install handbrake
# install SopCast webTV player
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:lyc256/sopcast-player-ppa
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install sopcast-player
# install qbittorrent client
# import RSS feeds from http://showrss.info/?cs=feeds into qbittorrent client
#sudo DEBIAN_FRONTEND=noninteractive apt-add-repository --yes ppa:surfernsk/internet-software
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install qbittorrent
# install desurium game client
#sudo DEBIAN_FRONTEND=noninteractive apt-add-repository --yes ppa:makson96/desurium
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install desurium
# install 64-bit compatible Steam client
wget media.steampowered.com/client/installer/steam.deb
sudo dpkg -i steam.deb
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f install
##########################################################################################################
# install LGOGDownloader game client (unofficial downloader to GOG.com for Linux users)
# It uses the same API as the official GOGDownloader.
##########################################################################################################
cd $HOME
rm -rf $HOME/lgogdownloader
git clone https://github.com/Sude-/lgogdownloader.git
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install build-essential libcurl4-openssl-dev liboauth-dev libjsoncpp-dev libhtmlcxx-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev libboost-program-options-dev libboost-date-time-dev libtinyxml-dev librhash-dev help2man
cd lgogdownloader
sudo make release
sudo make install
# install kde plasma 5 desktop environment
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:neon/kf5
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
#sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install project-neon5-session project-neon5-utils project-neon5-konsole project-neon5-plasma-workspace-wallpapers project-neon5-breeze
# Cuttlefish is an ingenious little tool. It allows you to define a set of actions that occur when a certain stimulus is activated.
# sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:noneed4anick/cuttlefish
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install cuttlefish
# Install Ubuntu Tweak to easily uninstall old kernel versions
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:tualatrix/ppa
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install ubuntu-tweak
# install skype
cd $HOME
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes remove skype skype-bin
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install skype
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f install
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install gtk2-engines-murrine:i386 gtk2-engines-pixbuf:i386 sni-qt:i386
# install Y PPA Manager
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:webupd8team/y-ppa-manager
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
cd $HOME
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install y-ppa-manager
# libdvdcss2, to play encrypted DVDs
cd $HOME
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install libdvdcss2
sudo /usr/share/doc/libdvdread4/./install-css.sh
###############################################################################################
# WEBBROWSER SOFTWARE SECTION #
###############################################################################################
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
# 64-bit stuff here
# install Google Chrome browser which includes newest version of Adobe Flash - other browsers do not
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb
# fix the Google Chrome dependencies issue
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f install
# install 4kyoutubetomp3 - extremely fast Youtube playlist downloader
VIDEODOWNLOADERREMOTEDIR="https://code.google.com/p/4kdownload/"
url=$(wget -O- -q --no-check-certificate `echo $VIDEODOWNLOADERREMOTEDIR` | sed -ne 's/^.*"\([^"]*tubetomp3[^"]*amd64*\.deb\)".*/\1/p' | sort -r | head -1)
# Create a temporary directory
dir=$(mktemp -dt)
cd "$dir"
# Download the .deb file
wget `echo $url`
# Install the package
sudo dpkg -i "${url##*/}"
# Clean up
rm "${url##*/}"
cd $HOME
rm -rf "$dir"
cd $HOME
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f install
# install 4kvideodownloader that converts personal Youtube playlists to Youtube mp3s
VIDEODOWNLOADERREMOTEDIR="https://code.google.com/p/4kdownload/"
url=$(wget -O- -q --no-check-certificate `echo $VIDEODOWNLOADERREMOTEDIR` | sed -ne 's/^.*"\([^"]*videodownloader[^"]*amd64*\.deb\)".*/\1/p' | sort -r | head -1)
# Create a temporary directory
dir=$(mktemp -dt)
cd "$dir"
# Download the .deb file
wget `echo $url`
# Install the package
sudo dpkg -i "${url##*/}"
# Clean up
rm "${url##*/}"
cd $HOME
rm -rf "$dir"
cd $HOME
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f install
# install Google Earth in Ubuntu 13.10 64-bit or newer
# uninstall old Google Earth
cd $HOME
rm -rf $HOME/.googleearth
sudo rm -rf /opt/google-earth && sudo rm /usr/share/mime/application/vnd.google-earth.* /usr/share/mimelnk/application/vnd.google-earth.* /usr/share/applnk/Google-googleearth.desktop /usr/share/mime/packages/googleearth-mimetypes.xml /usr/share/gnome/apps/Google-googleearth.desktop /usr/share/applications/Google-googleearth.desktop /usr/local/bin/googleearth
sudo rm googleearth*.deb
sudo rm google-earth*.deb
sudo rm GoogleEarth*
sudo dpkg -P google-earth
sudo dpkg -P googleearth
# install new Google Earth
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install libfreeimage3 lib32nss-mdns multiarch-support lsb-core googleearth-package
sudo make-googleearth-package --force
sudo dpkg -i googleearth*.deb
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f install
# install newest wine version
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes --force-yes -f ppa:ubuntu-wine/ppa
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f install wine1.6 winetricks wine1.6-amd64
# install Teamviewer server + client which depends on wine1.6
cd $HOME
wget http://download.teamviewer.com/download/teamviewer_linux.deb
sudo dpkg -i teamviewer_linux.deb
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f install
# teamviewer autostart fix procedure - add configuration lines below to /etc/rc.local
sudo -k teamviewer --daemon start
cd /opt/teamviewer9/tv_bin/script
sudo cp teamviewerd.sysv /etc/init.d/
sudo chmod 755 /etc/init.d/teamviewerd.sysv
sudo update-rc.d teamviewerd.sysv defaults
/opt/teamviewer9/tv_bin/script/teamviewer --daemon start &
# !!!!!! Also add teamviewer program to KDE's Autostart (autostart launch command to use: teamviewer)
# install youtube-to-mp3 program
cd $HOME
wget http://www.mediahuman.com/download/YouTubeToMP3.amd64.deb
sudo dpkg -i YouTubeToMP3.amd64.deb
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f install
# install dupeguru-me which can find and delete similar music filenames using fuzzy logic
# rerun dupeguru-me on /media/IOMEGA/downloads/Youtube-playlists after each mp3 conversion using YouTubeToMP3
# install Viber program
cd $HOME
wget download.cdn.viber.com/cdn/desktop/Linux/viber.deb
sudo dpkg -i viber.deb
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f install
else
# 32-bit stuff here
# install youtube-to-mp3 program
cd $HOME
wget http://www.mediahuman.com/download/YouTubeToMP3.i386.deb
sudo dpkg -i YouTubeToMP3.i386.deb
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f install
# install dupeguru-me which can find and delete similar music filenames using fuzzy logic
# rerun dupeguru-me on /media/IOMEGA/downloads/Youtube-playlists after each mp3 conversion using YouTubeToMP3
# install Google Chrome browser which has better support for Flash websites (Youtube, ...)
cd $HOME
wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb
sudo dpkg -i google-chrome*.deb
# fix the Google Chrome dependencies issue
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f install
# install 4kyoutubetomp3 - extremely fast Youtube playlist downloader
cd $HOME
VIDEODOWNLOADERREMOTEDIR="https://code.google.com/p/4kdownload/"
url=$(wget -O- -q --no-check-certificate `echo $VIDEODOWNLOADERREMOTEDIR` | sed -ne 's/^.*"\([^"]*tubetomp3[^"]*i386*\.deb\)".*/\1/p' | sort -r | head -1)
# Create a temporary directory
dir=$(mktemp -dt)
cd "$dir"
# Download the .deb file
wget `echo $url`
# Install the package
sudo dpkg -i "${url##*/}"
# Clean up
rm "${url##*/}"
cd $HOME
rm -rf "$dir"
cd $HOME
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f install
# install 4kvideodownloader that converts personal Youtube playlists to Youtube mp3s
VIDEODOWNLOADERREMOTEDIR="https://code.google.com/p/4kdownload/"
url=$(wget -O- -q --no-check-certificate `echo $VIDEODOWNLOADERREMOTEDIR` | sed -ne 's/^.*"\([^"]*videodownloader[^"]*i386*\.deb\)".*/\1/p' | sort -r | head -1)
# Create a temporary directory
dir=$(mktemp -dt)
cd "$dir"
# Download the .deb file
wget `echo $url`
# Install the package
sudo dpkg -i "${url##*/}"
# Clean up
rm "${url##*/}"
cd $HOME
rm -rf "$dir"
cd $HOME
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f install
# install Google Earth in Ubuntu 13.10 32-bit or newer
# uninstall old Google Earth
cd $HOME
rm -rf $HOME/.googleearth
sudo rm -rf /opt/google-earth && sudo rm /usr/share/mime/application/vnd.google-earth.* /usr/share/mimelnk/application/vnd.google-earth.* /usr/share/applnk/Google-googleearth.desktop /usr/share/mime/packages/googleearth-mimetypes.xml /usr/share/gnome/apps/Google-googleearth.desktop /usr/share/applications/Google-googleearth.desktop /usr/local/bin/googleearth
sudo rm googleearth*.deb
sudo rm google-earth*.deb
sudo rm GoogleEarth*
sudo dpkg -P google-earth
sudo dpkg -P googleearth
# install new Google Earth
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install libfreeimage3 lib32nss-mdns multiarch-support lsb-core googleearth-package
sudo make-googleearth-package --force
sudo dpkg -i googleearth*.deb
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f install
# install newest wine version
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes --force-yes -f ppa:ubuntu-wine/ppa
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f install wine1.6-i386
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f install wine1.6 winetricks
# install Teamviewer server + client which depends on wine1.6
cd $HOME
wget http://download.teamviewer.com/download/teamviewer_linux.deb
sudo dpkg -i teamviewer_linux.deb
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f install
# teamviewer autostart fix procedure - add configuration lines below to /etc/rc.local
cd $HOME
sudo -k teamviewer --daemon start
cd /opt/teamviewer9/tv_bin/script
sudo cp teamviewerd.sysv /etc/init.d/
sudo chmod 755 /etc/init.d/teamviewerd.sysv
sudo update-rc.d teamviewerd.sysv defaults
/opt/teamviewer9/tv_bin/script/teamviewer --daemon start &
cd $HOME
# !!!!!! Also add teamviewer program to KDE's Autostart (autostart launch command to use: teamviewer)
fi
# install Opera browser
# wget -O- http://deb.opera.com/archive.key | sudo DEBIAN_FRONTEND=noninteractive apt-key add -
#sudo sh -c 'echo "deb http://deb.opera.com/opera/ stable non-free" >> /etc/apt/sources.list'
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
# sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install opera
# Enable and upgrade the open-source graphics drivers for Intel, AMD Radeon, and Nouveau (NVIDIA)
#sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes --force-yes -f ppa:oibaf/graphics-drivers
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes -f dist-upgrade
# OBSOLETE - install Multimedia codecs
# sudo -E wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo DEBIAN_FRONTEND=noninteractive apt-get --quiet update && sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo DEBIAN_FRONTEND=noninteractive apt-get --quiet update
# sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install non-free-codecs libdvdcss
# install Realplayer (latest version is from 2009)
#sudo DEBIAN_FRONTEND=noninteractive apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install lsb
#wget http://client-software.real.com/free/unix/RealPlayer11GOLD.deb
#sudo dpkg -i RealPlayer11GOLD.deb
# uninstall Java due to all the critical security issues in 2013
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes remove java-common
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes remove default-jre
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes remove default-jre-headless
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes remove gcj-jre-headless
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes remove openjdk-6-jre-headless
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes remove openjdk-7-jre-headless
#sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes remove mysql-server-core-?.?
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes remove unity-lens-shopping
# sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes purge pulseaudio*
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes purge arno-iptables-firewall
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes purge ufw
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes purge xscreensaver xscreensaver-data gnome-screensaver
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes purge evolution-data-server-common samba
sudo DEBIAN_FRONTEND=noninteractive apt-get autoclean
sudo DEBIAN_FRONTEND=noninteractive apt-get clean
sudo rm /etc/apt/sources.list.d/*
# Install yEd editor
# (powerful desktop application that can be used to quickly and effectively generate high-quality diagrams)
# Save diagrams in .pdf format so they can be included as graphics in a new latex document in texmaker
# Allows easy creation of Entity Relationship (ER) diagrams (as part of data modeling by data scientist)
# documentation: http://www.linuxuser.co.uk/tutorials/create-flowcharts-with-yedcreate-flowcharts-with-yed
cd $HOME
wget http://www.yworks.com/products/yed/demo/`echo $YEDFILENAME`
sh `echo $YEDFILENAME`
# install Kruidvat fotoservice software
cd $HOME
wget http://dls.photoprintit.com/download/Data/1287/hps/setup_Kruidvat_fotoservice.tgz
tar -zxvf setup_Kruidvat_fotoservice.tgz
./install.pl
# run shellshock test to see if bash is vulnerable
cd $HOME
wget https://shellshocker.net/shellshock_test.sh ; bash shellshock_test.sh
# clean up current directory
echo "Performing file cleanup"
cd $HOME
rm *.zip
rm *.pdf
rm *.deb
rm *.km?
rm *gz
rm *.exe
rm google*
rm *yEd*.sh
rm .goutputstrea*
rm *.cab
rm *.xpi
rm ica_*
###############################################################################################
# ASTRONOMY SOFTWARE SECTION #
###############################################################################################
# install zotero add-on for Mozilla Firefox
cd $HOME
wget https://download.zotero.org/extension/zotero-4.0.20.2.xpi
gksudo firefox -install-global-extension zotero-4.0.20.2.xpi
cd $HOME/shell-scripts
sudo DEBIAN_FRONTEND=noninteractive apt-get install `cat astropackages` -o APT::Install-Suggests="false"
cd $HOME
# install texlive 2012.201206 packages (will upgrade texlive 2009 to texlive 2012.201206 in Ubuntu 12.04)
# sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:texlive-backports/ppa
#sudo DEBIAN_FRONTEND=noninteractive apt-get update
#sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install texlive-latex-extra texlive-bibtex-extra latex-xcolor biber
#sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install texlive-fonts-recommended texlive-binaries texlive-latex-base texlive-publishers
#sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install texlive-latex-extra biblatex
# install casapy-upstream-binary - Common Astronomy Software Applications package provided by NRAO, python bindings
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes --force-yes ppa:aims/casapy
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install casapy-upstream-binary
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes --force-yes ppa:olebole/astro-quantal
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install casacore
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install cpl
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install esorex
# download and decompress SAOImage DS9 software
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install saods9
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install sextractor
# download CSC KML Interface to Sky in Google Earth
echo "Downloading CSC KML Interface to Sky in Google Earth"
wget http://cxc.harvard.edu/csc/googlecat/cxo_1.2.kml
echo "kml file can be opened using Google Earth"
# download The Crab Nebula Explodes
echo "Downloading The Crab Nebula Explodes"
wget http://services.google.com/earth/kmz/crab_nebula_n.kmz
echo "kmz file can be opened using Google Earth"
# download Multicolor Galaxies
echo "Downloading Multicolor Galaxies"
wget http://services.google.com/earth/kmz/aegis_n.kmz
echo "kmz file can be opened using Google Earth"
# download Images of Nearby Galaxies from the National Optical Astronomical Observatory
echo "Downloading Images of Nearby Galaxies from the National Optical Astronomical Observatory"
wget http://services.google.com/earth/kmz/noao_showcase_n.kmz
echo "kmz file can be opened using Google Earth"
# download The Sloan Digital Sky Survey catalog
echo "Downloading The Sloan Digital Sky Survey catalog"
wget http://services.google.com/earth/kmz/sdss_query_n.kmz
echo "kmz file can be opened using Google Earth"
# download Exoplanets
echo "Downloading Exoplanets"
wget http://services.google.com/earth/kmz/exo_planets_n.kmz
echo "kmz file can be opened using Google Earth"
# download and install Audela
echo "Downloading and installing Audela - free and open source astronomy software intended for digital observations"
wget http://sourceforge.net/projects/audela/files/audela/`echo $AUDELAFILENAME`/`echo $AUDELAFILENAME`.deb
sudo dpkg -i `echo $AUDELAFILENAME`.deb
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
# 64-bit stuff here
# download and decompress IRAF - Image Reduction and Analysis Facility, a general purpose
# software system for the reduction and analysis of astronomical data
echo "Downloading and decompressing IRAF - Image Reduction and Analysis Facility"
wget ftp://iraf.noao.edu/iraf/v216/PCIX/iraf.lnux.x86_64.tar.gz
unp iraf.lnux.x86_64.tar.gz
echo "Downloading and installing skychart"
SKYCHARTREMOTEDIR="http://sourceforge.net/projects/skychart/files/1-%20cdc-skychart/version_3.8/"
url=$(wget -O- -q --no-check-certificate `echo $SKYCHARTREMOTEDIR` | sed -ne 's/^.*"\([^"]*skychart[^"]*amd64*\.deb\)".*/\1/p' | sort -r | head -1)
# Create a temporary directory
dir=$(mktemp -dt)
cd "$dir"
# Download the .deb file
wget `echo $SKYCHARTREMOTEDIR``echo $url`
# Install the package
sudo dpkg -i $url
# Clean up
rm $url
cd $HOME
rm -rf "$dir"
cd $HOME
sudo DEBIAN_FRONTEND=noninteractive apt-get -f install
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install texmaker
#install texstudio
#TEXSTUDIOREMOTEDIR="http://download.opensuse.org/repositories/home:/jsundermeyer/xUbuntu_13.10/amd64/"
#url=$(wget -O- -q --no-check-certificate `echo $TEXSTUDIOREMOTEDIR` | sed -ne 's/^.*"\([^"]*texstudio[^"]*\.deb\)".*/\1/p' | sort -r | head -1)
# Create a temporary directory
#dir=$(mktemp -dt)
#cd "$dir"
# Download the .deb file
#wget `echo $TEXSTUDIOREMOTEDIR``echo $url`
# Install the package
#sudo dpkg -i `echo $url`
# Clean up
#rm `echo $url`
#cd
#rm -rf "$dir"
#cd
#sudo DEBIAN_FRONTEND=noninteractive apt-get -f install
else
# 32-bit stuff here
# download and decompress IRAF - Image Reduction and Analysis Facility, a general purpose
# software system for the reduction and analysis of astronomical data
echo "Downloading and decompressing IRAF - Image Reduction and Analysis Facility"
wget ftp://iraf.noao.edu/iraf/v216/PCIX/iraf.lnux.x86.tar.gz
unp iraf.lnux.x86.tar.gz
echo "Downloading and installing skychart"
SKYCHARTREMOTEDIR="http://sourceforge.net/projects/skychart/files/1-%20cdc-skychart/version_3.8/"
url=$(wget -O- -q --no-check-certificate `echo $SKYCHARTREMOTEDIR` | sed -ne 's/^.*"\([^"]*skychart[^"]*i386*\.deb\)".*/\1/p' | sort -r | head -1)
# Create a temporary directory
dir=$(mktemp -dt)
cd "$dir"
# Download the .deb file
wget `echo $SKYCHARTREMOTEDIR``echo $url`
# Install the package
sudo dpkg -i $url
# Clean up
rm $url
cd $HOME
rm -rf "$dir"
cd $HOME
sudo DEBIAN_FRONTEND=noninteractive apt-get -f install
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install texmaker
#install texstudio
#TEXSTUDIOREMOTEDIR="http://download.opensuse.org/repositories/home:/jsundermeyer/xUbuntu_12.10/i386/"
#url=$(wget -O- -q --no-check-certificate `echo $TEXSTUDIOREMOTEDIR` | sed -ne 's/^.*"\([^"]*texstudio[^"]*\.deb\)".*/\1/p' | sort -r | head -1)
# Create a temporary directory
#dir=$(mktemp -dt)
#cd "$dir"
# Download the .deb file
#wget `echo $TEXSTUDIOREMOTEDIR``echo $url`
# Install the package
#sudo dpkg -i `echo $url`
# Clean up
#rm `echo $url`
#cd
#rm -rf "$dir"
#cd
#sudo DEBIAN_FRONTEND=noninteractive apt-get -f install
fi
wget http://sourceforge.net/projects/skychart/files/2-catalogs/Stars/skychart-data-stars_3.8-2293_all.deb
sudo dpkg -i skychart-data-stars_3.8-2293_all.deb
sudo DEBIAN_FRONTEND=noninteractive apt-get -f install
wget http://sourceforge.net/projects/skychart/files/2-catalogs/Nebulea/skychart-data-dso_3.8-2293_all.deb
sudo dpkg -i skychart-data-dso_3.8-2293_all.deb
sudo DEBIAN_FRONTEND=noninteractive apt-get -f install
wget http://sourceforge.net/projects/skychart/files/2-catalogs/Nebulea/skychart-data-pictures_3.1-1466_all.deb
sudo dpkg -i skychart-data-pictures_3.1-1466_all.deb
sudo DEBIAN_FRONTEND=noninteractive apt-get -f install
###############################################################################################
# DOWNLOAD TRIATLAS PDF FILES BEFORE ANY OTHER PDF FILES #
###############################################################################################
#download Triatlas charts in PDF format from http://www.uv.es/jrtorres/triatlas.html
echo "Downloading Triatlas charts (from jrtorres) in A4 format for Europe"
wget http://www.uv.es/jrtorres/section_a/Triatlas_2ed_A.pdf
wget http://www.uv.es/jrtorres/TriAtlas_A_Index.pdf
wget http://www.uv.es/jrtorres/section_b/Triatlas_2ed_B1.pdf
wget http://www.uv.es/jrtorres/section_b/Triatlas_2ed_B2.pdf
wget http://www.uv.es/jrtorres/section_b/Triatlas_2ed_B3.pdf
wget http://www.uv.es/jrtorres/TriAtlas_B_Index.pdf
wget http://www.uv.es/jrtorres/section_c/C01_001-030.pdf
wget http://www.uv.es/jrtorres/section_c/C02_031-060.pdf
wget http://www.uv.es/jrtorres/section_c/C03_061-090.pdf
wget http://www.uv.es/jrtorres/section_c/C04_091-120.pdf
wget http://www.uv.es/jrtorres/section_c/C05_121-150.pdf
wget http://www.uv.es/jrtorres/section_c/C06_151-180.pdf
wget http://www.uv.es/jrtorres/section_c/C07_181-210.pdf
wget http://www.uv.es/jrtorres/section_c/C08_211-240.pdf
wget http://www.uv.es/jrtorres/section_c/C09_241-270.pdf
wget http://www.uv.es/jrtorres/section_c/C10_271-300.pdf
wget http://www.uv.es/jrtorres/section_c/C11_301-330.pdf
wget http://www.uv.es/jrtorres/section_c/C12_331-360.pdf
wget http://www.uv.es/jrtorres/section_c/C13_361-390.pdf
wget http://www.uv.es/jrtorres/section_c/C14_391-420.pdf
wget http://www.uv.es/jrtorres/section_c/C15_421-450.pdf
wget http://www.uv.es/jrtorres/section_c/C16_451-480.pdf
wget http://www.uv.es/jrtorres/section_c/C17_481-510.pdf
wget http://www.uv.es/jrtorres/section_c/C18_511-540.pdf
wget http://www.uv.es/jrtorres/section_c/C19_541-571.pdf
wget http://www.uv.es/jrtorres/TriAtlas_C_Index.pdf
mv *.pdf triatlas
# download SAO/NASA ADS Help Pages
echo "Downloading SAO/NASA ADS Help Pages"
wget http://adsabs.harvard.edu/abs_doc/help_pages/adshelp.pdf
mv adshelp.pdf sao_nasa_ads_help_pages_July_9_2012.pdf
# download American Astronomical Society manuscript preparation guidelines
echo "Downloading American Astronomical Society manuscript preparation guidelines"
wget http://ctan.mackichan.com/macros/latex/contrib/aastex/docs/aasguide.pdf
mv aasguide.pdf American_Astronomical_Society_guidelines.pdf
# download The Not So Short Introduction to LaTeX2e by Tobias Oetiker et alii
echo "Downloading The Not So Short Introduction to LaTeX2e by Tobias Oetiker et alii"