-
Notifications
You must be signed in to change notification settings - Fork 3
/
ubuntu-firstrun-config.bash
398 lines (393 loc) · 20.2 KB
/
ubuntu-firstrun-config.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
#!/bin/bash
#===============================================================================
# FILE: ubuntu-firstrun-config.bash
# USAGE: sudo bash ./ubuntu-firstrun-config.bash
# DESCRIPTION: The script enables installation and configuration of some
# essential apps and utilties that make your Ubuntu more
# useful and powerful.
# OPTIONS: ---
# REQUIREMENTS: zenity (preinstalled with Ubuntu)
# NOTES: ---
# AUTHOR: wiktor2200, https://github.com/wiktor2200
# REPO: https://github.com/wiktor2200/Ubuntu-firstrun-config
# CREATED: 2018-06-12
# UPDATED: 2023-04-15
#===============================================================================
# This script is generated using: generate-script-from-config.bash from repo: https://github.com/wiktor2200/Ubuntu-firstrun-config
# Get script's main directory
DIR=`dirname $0`
LOG_FILE=/home/$USER/`date +%F_%T_ubuntu_firstrun_config_log`
# Render zenity menu
response=$(zenity --height=700 --width=1200 --window-icon=$DIR/ubuntu_icon.png --list --checklist --title="Configure your Ubuntu!" --column="State" --column="Task" --column="Description" TRUE "0Upgrade - Upgrade packages" "Perform apt dist-upgrade" \
TRUE "0Upgrade - Set upgrade notifications for all users" "Set upgrade notifications for all users" \
TRUE "Cleanup - Clean packages" "Perform apt autoremove, clean and autoclean" \
TRUE "Cleanup - Uninstall garbage Gnome and Ubuntu packages" "Uninstall some garbage packages e.g. orca, shotwell, rhythmbox, totem, transmission" \
TRUE "Documents - Install Libreoffice" "Install full Libreoffice package with language packages." \
TRUE "IDE - Install Visual Studio Code IDE" "Install Visual Studio Code - easy, customizable and powerful IDE for almost all languages." \
TRUE "Multimedia - Install VLC" "Install popular media player - both music and videos." \
TRUE "Photos - Install GIMP" "Install popular photo editor GIMP." \
TRUE "Useful - Install password manager" "Install password manager – keepassXC" \
TRUE "Utilties - Install archives tools" "Support for zip, rar, 7zip etc." \
TRUE "Utilties - Install codecs" "Codecs to support common audio, video formats and additional fonts." \
TRUE "Utilties - Install Gnome tools" "Install Gnome settings managers and utils." \
TRUE "Utilties - Install language packages" "Installing language packages for your locale different than English." \
TRUE "Utilties - Install useful system utilties" "Install Partitioning tools, space usage tools, hardware info tools." \
TRUE "Utilties - Install backup tools." "Install backup tools - luckybackup AKA rsync-gui and unison syncronizer." \
TRUE "Utilties - Replace default snap packages with native Gnome apps." "Replace default snap packages with native Gnome apps." \
TRUE "Utilties - Replace firefox snap package with native apt." "Replace firefox snap package with native apt." \
FALSE "Utilties - Install duplicate finder czkawka. (using AppImage)" "Install duplicate finder czkawka. (using AppImage)" \
FALSE "Utilties - Install Bleachbit cleaner." "Install Bleachbit powerful cache, temp files and garbage cleaner." \
FALSE "Cleanup - Uninstall Ubuntu dock" "Uninstall Ubuntu Gnome dock." \
FALSE "Developer - Install Docker" "Install Docker from snap package manager." \
FALSE "Developer - Install VirtualBox" "Install Virtualbox virtual machines manager." \
FALSE "Documents - Install ebook reader" "Install ebook reader – calibre" \
FALSE "Documents - Install OCR Reader" "Install utilties to OCR read files." \
FALSE "Documents - Install PDF tools" "Install utilties to support pdf modifications - merging, spliting, replacing pages etc." \
FALSE "Documents - Install QownNotes" "Install notepad with markdown support and todo list manager supporting sync." \
FALSE "Fixes - Fix top panel icons" "Fix top panel icons on systems upgraded from 16.04" \
FALSE "Graphics - Install Dia – diagram creator" "Install Dia – diagram creator – easy and powerful" \
FALSE "Graphics - Install Gnome Paint - replacement for MSPaint." "Install Gnome Paint - Linux alternative for MSPaint." \
FALSE "Graphics - Install Inkscape – vector graphic editor" "Install vector graphic editor – Inkscape" \
FALSE "Hardware - Install better laptop's battery support" "Install better laptop's battery support. Recommended on laptops." \
FALSE "Hardware - Install scanner support" "Install utilties to support scanner in Ubuntu." \
FALSE "Hardware - Install webcam application" "Install webcam application – cheese" \
FALSE "IDE - Install Atom.io IDE" "Install easy to customize IDE – Atom.io" \
FALSE "IDE - Install Powerful HEX editor – bless" "Install hex editor - bless - more powerful, but needs more dependencies. – bless." \
FALSE "IDE - Install qtCreator IDE" "Install IDE for qt programs" \
FALSE "IDE - Install Simple HEX editor - ghex" "Install simple Gnome hex editor." \
FALSE "Multimedia - Install Amarok" "Install powerful music player – Amarok" \
FALSE "Multimedia - Install Audacity audio editor" "Install Audacity audio editor" \
FALSE "Network - Install sysadmin network utilties" "Install utilties to monitor network traffic e.g. nethogs, nmap, iftop, whois, net-tools etc." \
FALSE "Performance - Enable tmp folder in RAM" "Increase efficiency of your system and enable tmp folder in RAM. Recommended if more than 8GB of RAM" \
FALSE "Performance - Remove swapfile" "Removing of swapfile is recommended when using ssd drive - to increase it's life. When swap is off hibernation is disabled!" \
FALSE "Photos - Install batch photos utilties" "Install utilties to batch modify your photos and metadata e.g. aaphoto, exiv2" \
FALSE "Photos - Install Digikam" "Install Powerful tool for photos managment" \
FALSE "Storage - Install Dropbox client" "Install official Dropbox client with nemo support. Headless moder – run as user which will be using dropbox." \
FALSE "Storage - Install Nextcloud client" "Install Nextcloud client." \
FALSE "Storage - Install Owncloud client" "Install Owncloud client." \
FALSE "System - Install Cinnamon desktop manager" "Install Cinnamon desktop manager" \
FALSE "Useful - Install Chromium browser" "Install open-source Chromium browser. Open-source Chrome." \
FALSE "Useful - Install ClamAV Antivirus" "Install and configure ClamAV Antivirus" \
FALSE "Useful - Install Kazam desktop recorder" "Install Kazam - simple desktop recorder" \
FALSE "Useful - Install Qalculate scientific calculator" "Install Qalculate scientific calculator" \
FALSE "Useful - Install Slack" "Install Slack team collaboration tool from snap package." \
FALSE "Useful - Install task manager – TaskCoach (using AppImage)" "Install powerful task manager TaskCoach (using AppImage)" \
FALSE "Useful - Install Tellico – collections manager" "Install Tellico – collections manager – books, movies, coins etc." \
FALSE "Useful - Install Thunderbird" "Install Thunderbird mail client" \
FALSE "Utilties - Install AMD-Nvidia graphics drivers" "Install Install AMD-Nvidia graphics drivers" \
FALSE "Utilties - Install bootable live USB creator – mkusb" "Install bootable live USB creator – mkusb" \
FALSE "Utilties - Install CD-DVD burner" "Install CD-DVD burner – if you have disk drive" \
FALSE "Utilties - Install fzf – CLI fuzzy finder" "Install fzf – CLI fuzzy finder. Git clone installation – run as user which will be using script" \
FALSE "Utilties - Install Guake – gnome dropdown terminal" "Install Guake – gnome dropdown terminal" \
FALSE "Utilties - Install ISO images tool" "Install ISO images tool, mount, unmount, modify. - acetoneiso" \
FALSE "Utilties - Install sandboxing app – Firejail" "Install sandboxing app Firejail." \
FALSE "Utilties - Install Solaar for Logitech devices" "Install Solaar - Logitech Unifying,Bolt companion tool." \
FALSE "Utilties - Install Synaptic package manager" "Install Synaptic package manager" \
FALSE "System - Replace filemanager Nautilus with Nemo" "Replace file manager Nautilus with more powerful Nemo" \
FALSE "System - Replace notepad gedit with pluma" "Replace default gedit with powerful pluma notepad." \
FALSE "System - Set Grub Timeout to 1 second" "Set Grub Timeout to 1 second" \
FALSE "System - Show hidden autostart system entries" "Show hidden autostart system entries" \
FALSE "Cleanup - Uninstall Ubuntu 16.04 old dependencies." "Uninstall 16.04 garbage dependencies after upgrade to 18.04." \
--separator=":")
# Case function
IFS=":"
for word in $response ; do
case $word in
"0Upgrade - Upgrade packages")
SUMMARY+="`cat $DIR/scripts/perform-upgrade`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/perform-upgrade; "
;;
"0Upgrade - Set upgrade notifications for all users")
SUMMARY+="`cat $DIR/scripts/enable-upgrade-notifications`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/enable-upgrade-notifications; "
;;
"Cleanup - Clean packages")
SUMMARY+="`cat $DIR/scripts/perform-cleanup`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/perform-cleanup; "
;;
"Cleanup - Uninstall garbage Gnome and Ubuntu packages")
SUMMARY+="`cat $DIR/scripts/uninstall-garbage-packages`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/uninstall-garbage-packages; "
;;
"Documents - Install Libreoffice")
SUMMARY+="`cat $DIR/scripts/install-libreoffice`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-libreoffice; "
;;
"IDE - Install Visual Studio Code IDE")
SUMMARY+="`cat $DIR/scripts/install-vs-code`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-vs-code; "
;;
"Multimedia - Install VLC")
SUMMARY+="`cat $DIR/scripts/install-vlc`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-vlc; "
;;
"Photos - Install GIMP")
SUMMARY+="`cat $DIR/scripts/install-gimp`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-gimp; "
;;
"Useful - Install password manager")
SUMMARY+="`cat $DIR/scripts/install-password-manager`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-password-manager; "
;;
"Utilties - Install archives tools")
SUMMARY+="`cat $DIR/scripts/install-archives-tools`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-archives-tools; "
;;
"Utilties - Install codecs")
SUMMARY+="`cat $DIR/scripts/install-codecs`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-codecs; "
;;
"Utilties - Install Gnome tools")
SUMMARY+="`cat $DIR/scripts/install-gnome-tools`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-gnome-tools; "
;;
"Utilties - Install language packages")
SUMMARY+="`cat $DIR/scripts/install-language-packages`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-language-packages; "
;;
"Utilties - Install useful system utilties")
SUMMARY+="`cat $DIR/scripts/install-system-utilties`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-system-utilties; "
;;
"Utilties - Install backup tools.")
SUMMARY+="`cat $DIR/scripts/install-backup-tools`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-backup-tools; "
;;
"Utilties - Replace default snap packages with native Gnome apps.")
SUMMARY+="`cat $DIR/scripts/replace-snap-packages`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/replace-snap-packages; "
;;
"Utilties - Replace firefox snap package with native apt.")
SUMMARY+="`cat $DIR/scripts/replace-snap-firefox`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/replace-snap-firefox; "
;;
"Utilties - Install duplicate finder czkawka. (using AppImage)")
SUMMARY+="`cat $DIR/scripts/install-czkawka`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-czkawka; "
;;
"Utilties - Install Bleachbit cleaner.")
SUMMARY+="`cat $DIR/scripts/install-bleachbit`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-bleachbit; "
;;
"Cleanup - Uninstall Ubuntu dock")
SUMMARY+="`cat $DIR/scripts/uninstall-ubuntu-dock`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/uninstall-ubuntu-dock; "
;;
"Developer - Install Docker")
SUMMARY+="`cat $DIR/scripts/install-docker`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-docker; "
;;
"Developer - Install VirtualBox")
SUMMARY+="`cat $DIR/scripts/install-virtualbox`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-virtualbox; "
;;
"Documents - Install ebook reader")
SUMMARY+="`cat $DIR/scripts/install-calibre`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-calibre; "
;;
"Documents - Install OCR Reader")
SUMMARY+="`cat $DIR/scripts/install-ocr`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-ocr; "
;;
"Documents - Install PDF tools")
SUMMARY+="`cat $DIR/scripts/install-pdf-tools`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-pdf-tools; "
;;
"Documents - Install QownNotes")
SUMMARY+="`cat $DIR/scripts/install-qownnotes`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-qownnotes; "
;;
"Fixes - Fix top panel icons")
SUMMARY+="`cat $DIR/scripts/fix-top-panel-icons`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/fix-top-panel-icons; "
;;
"Graphics - Install Dia – diagram creator")
SUMMARY+="`cat $DIR/scripts/install-dia`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-dia; "
;;
"Graphics - Install Gnome Paint - replacement for MSPaint.")
SUMMARY+="`cat $DIR/scripts/install-gnome-paint`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-gnome-paint; "
;;
"Graphics - Install Inkscape – vector graphic editor")
SUMMARY+="`cat $DIR/scripts/install-inkscape`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-inkscape; "
;;
"Hardware - Install better laptop's battery support")
SUMMARY+="`cat $DIR/scripts/install-battery-support`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-battery-support; "
;;
"Hardware - Install scanner support")
SUMMARY+="`cat $DIR/scripts/install-scanner-support`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-scanner-support; "
;;
"Hardware - Install webcam application")
SUMMARY+="`cat $DIR/scripts/install-webcam-cheese`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-webcam-cheese; "
;;
"IDE - Install Atom.io IDE")
SUMMARY+="`cat $DIR/scripts/install-atom`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-atom; "
;;
"IDE - Install Powerful HEX editor – bless")
SUMMARY+="`cat $DIR/scripts/install-hex-bless-editor`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-hex-bless-editor; "
;;
"IDE - Install qtCreator IDE")
SUMMARY+="`cat $DIR/scripts/install-qtcreator`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-qtcreator; "
;;
"IDE - Install Simple HEX editor - ghex")
SUMMARY+="`cat $DIR/scripts/install-hex-gnome-editor`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-hex-gnome-editor; "
;;
"Multimedia - Install Amarok")
SUMMARY+="`cat $DIR/scripts/install-amarok`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-amarok; "
;;
"Multimedia - Install Audacity audio editor")
SUMMARY+="`cat $DIR/scripts/install-audacity`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-audacity; "
;;
"Network - Install sysadmin network utilties")
SUMMARY+="`cat $DIR/scripts/install-sysadmin-network-tools`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-sysadmin-network-tools; "
;;
"Performance - Enable tmp folder in RAM")
SUMMARY+="`cat $DIR/scripts/enable-tmp-ram`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/enable-tmp-ram; "
;;
"Performance - Remove swapfile")
SUMMARY+="`cat $DIR/scripts/remove-swapfile`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/remove-swapfile; "
;;
"Photos - Install batch photos utilties")
SUMMARY+="`cat $DIR/scripts/install-photo-utils`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-photo-utils; "
;;
"Photos - Install Digikam")
SUMMARY+="`cat $DIR/scripts/install-digikam`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-digikam; "
;;
"Storage - Install Dropbox client")
SUMMARY+="`cat $DIR/scripts/install-dropbox`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-dropbox; "
;;
"Storage - Install Nextcloud client")
SUMMARY+="`cat $DIR/scripts/install-nextcloud`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-nextcloud; "
;;
"Storage - Install Owncloud client")
SUMMARY+="`cat $DIR/scripts/install-owncloud`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-owncloud; "
;;
"System - Install Cinnamon desktop manager")
SUMMARY+="`cat $DIR/scripts/install-cinnamon`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-cinnamon; "
;;
"Useful - Install Chromium browser")
SUMMARY+="`cat $DIR/scripts/install-chromium`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-chromium; "
;;
"Useful - Install ClamAV Antivirus")
SUMMARY+="`cat $DIR/scripts/install-antivir`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-antivir; "
;;
"Useful - Install Kazam desktop recorder")
SUMMARY+="`cat $DIR/scripts/install-desktop-recorder`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-desktop-recorder; "
;;
"Useful - Install Qalculate scientific calculator")
SUMMARY+="`cat $DIR/scripts/install-qalculate`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-qalculate; "
;;
"Useful - Install Slack")
SUMMARY+="`cat $DIR/scripts/install-slack`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-slack; "
;;
"Useful - Install task manager – TaskCoach (using AppImage)")
SUMMARY+="`cat $DIR/scripts/install-taskcoach`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-taskcoach; "
;;
"Useful - Install Tellico – collections manager")
SUMMARY+="`cat $DIR/scripts/install-tellico`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-tellico; "
;;
"Useful - Install Thunderbird")
SUMMARY+="`cat $DIR/scripts/install-thunderbird`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-thunderbird; "
;;
"Utilties - Install AMD-Nvidia graphics drivers")
SUMMARY+="`cat $DIR/scripts/install-amd-nvidia-drivers`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-amd-nvidia-drivers; "
;;
"Utilties - Install bootable live USB creator – mkusb")
SUMMARY+="`cat $DIR/scripts/install-mkusb`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-mkusb; "
;;
"Utilties - Install CD-DVD burner")
SUMMARY+="`cat $DIR/scripts/install-cd-dvd-burner`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-cd-dvd-burner; "
;;
"Utilties - Install fzf – CLI fuzzy finder")
SUMMARY+="`cat $DIR/scripts/install-fzf`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-fzf; "
;;
"Utilties - Install Guake – gnome dropdown terminal")
SUMMARY+="`cat $DIR/scripts/install-guake`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-guake; "
;;
"Utilties - Install ISO images tool")
SUMMARY+="`cat $DIR/scripts/install-acetoneiso`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-acetoneiso; "
;;
"Utilties - Install sandboxing app – Firejail")
SUMMARY+="`cat $DIR/scripts/install-firejail`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-firejail; "
;;
"Utilties - Install Solaar for Logitech devices")
SUMMARY+="`cat $DIR/scripts/install-solaar`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-solaar; "
;;
"Utilties - Install Synaptic package manager")
SUMMARY+="`cat $DIR/scripts/install-synaptic`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/install-synaptic; "
;;
"System - Replace filemanager Nautilus with Nemo")
SUMMARY+="`cat $DIR/scripts/replace-nautilus-nemo`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/replace-nautilus-nemo; "
;;
"System - Replace notepad gedit with pluma")
SUMMARY+="`cat $DIR/scripts/replace-gedit-pluma`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/replace-gedit-pluma; "
;;
"System - Set Grub Timeout to 1 second")
SUMMARY+="`cat $DIR/scripts/set-grub`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/set-grub; "
;;
"System - Show hidden autostart system entries")
SUMMARY+="`cat $DIR/scripts/show-hidden-autostart-entries`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/show-hidden-autostart-entries; "
;;
"Cleanup - Uninstall Ubuntu 16.04 old dependencies.")
SUMMARY+="`cat $DIR/scripts/uninstall-old-1604-dependencies`\n\n"
COMMAND_TO_RUN+="bash $DIR/scripts/uninstall-old-1604-dependencies; "
;;
esac
done
unset IFS
# Check if variable SUMMARY was set ('! -n' = not null variable)
if [ ! -n "$SUMMARY" ]; then
zenity --error --title="Installation aborted!" --text "Installation aborted!"
else
echo -e "$SUMMARY" | zenity --height=700 --width=1200 --text-info --title="Summary - commands to run" --text="$SUMMARY"
# Check if OK was pressed
if [ $? = 0 ] ; then
# OK pressed
(pkexec -u `whoami` bash -c "cd $PWD; $COMMAND_TO_RUN") 2>&1 | tee -a "$LOG_FILE"
zenity --info --text "All done!\nPress OK to quit."
else
# Cancel pressed
zenity --error --text "Cancel pressed!"
fi
fi