forked from Jacksaur/NoFoxGiven
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NoFoxGiven.sh
56 lines (53 loc) · 2.28 KB
/
NoFoxGiven.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
#!/bin/bash
echo "NoFoxGiven Snap removal and replacement script for Firefox."
sleep 2
echo "Remember that this script is made for single user systems. Other users on this system will need to run the Install Only script afterwards."
echo "WARNING: If you have not backed up your Firefox profile, **EVERYTHING WILL BE LOST**. Close this command prompt and check the Github page for instructions on how to do so. Otherwise, press Enter to continue."
read
echo "Now downloading latest Standalone Firefox build"
#Direct download link to latest Firefox version from Mozilla
wget -O firefox.tar.bz2 "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-US"
echo "Extracting..."
tar xjf firefox.tar.bz2
rm -r ./firefox.tar.bz2
echo "Moving files and adding Launcher entry. You will be asked for your sudo pass."
sleep 5
mv ./firefox ~/.local/share/Firefox
#Create /bin file to allow launching through Terminal, whilst still applying KDE Filepicker tweak
mkdir -p ~/.local/bin
touch ~/.local/bin/firefox
echo "#!/bin/bash" > ~/.local/bin/firefox
echo "GTK_USE_PORTAL=1 ~/.local/share/Firefox/firefox" >> ~/.local/bin/firefox
chmod +x ~/.local/bin/firefox
#Copy Icons and .desktop file to their proper places
sudo rsync -a ./icons /usr/share
mkdir -p ~/.local/share/applications/
mv ./Firefox.desktop ~/.local/share/applications/
rm -r ./icons
chmod +x ~/.local/share/applications/Firefox.desktop
echo
echo "Installation complete! Firefox can be located in your home directory, inside .local/share."
echo "Your desktop may refresh at some point once KDE notices the change in application entries."
echo
echo "Proceeding to remove Snap..."
sleep 7
sudo snap remove firefox
sudo snap remove gnome-3-38-2004
sudo snap remove gtk-common-themes
sudo snap remove bare
sudo snap remove core20
sudo snap remove snapd
sudo apt remove --autoremove -y snapd
sudo apt remove --purge -y plasma-discover-backend-snap
rm -rf ~/snap
sudo rm -rf /snap
sudo rm -rf /var/snap
sudo rm -rf /var/cache/snapd/
sudo rm -rf /var/lib/snapd
sudo apt-mark hold snapd
echo
echo "Removal complete! Snap has also been marked to be held back."
echo "Due to how Kubuntu handles .local, You won't be able to run Firefox through Terminal until you reload your profile by logging out."
echo "Script complete. You can now close this terminal."
read
exit