-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstallGnome.sh
82 lines (59 loc) · 1.39 KB
/
installGnome.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
#! /bin/bash
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m'
function printQuestion {
echo -e "$1(${GREEN}y${NC}/${GREEN}n${NC})"
}
function printInColor {
echo -e "${$1} $2"
}
function installGnome {
sudo apt-get dist-upgrade
sudo add-apt-repository ppa:gnome3-team/gnome3-staging
sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt update
sudo apt install gnome gnome-shell ubuntu-gnome-desktop ubuntu-session gdm3
sudo apt autoremove
wait
}
function uninstallUnity {
sudo apt purge unity-session unity
sudo apt autoremove
}
function uninstallLightDM {
sudo apt-get purge lightdm
sudo rm -rf /var/lib/lightdm-data
sudo rm -rf /etc/lightdm
sudo apt autoremove
}
function rebootComputer {
sleep 3
sudo reboot
}
if [[ $(id -u) -ne 0 ]]; then
printInColor "RED" "Please run this script as sudo."
exit
else
installGnome
printQuestion "Do you want to remove untiy completely?"
read removeUnity
if [ "$removeUnity" == "y" ]
then
fi
printQuestion "Do you want to remove 'lightdm'?"
read removeLightDM
if [ "$removeLightDM" == "y" || "$removeLightDM" == "" ]
then
uninstallLightDM
fi
printQuestion "To apply these changes, you have to restart your computer. Should I do that for you?"
read rebootNow
if [ "$rebootNow" == "y" ]
then
echo "Good luck with your new gnome system."
rebootComputer
else
echo "Good luck with your new gnome system."
fi
fi