#!/bin/bash ################ #Check for root# ################ if [ ! $USERNAME = "root" ]; then pkexec /usr/share/browser-manager/falkon/uninstall exit 0 fi ########## #Question# ########## zenity --question --title="Continue?" --text "Are you sure you want to remove Falkon?" if [ ! $? -eq 0 ]; then exit fi ################################### #Check if program is not installed# ################################### dpkg --get-selections | grep -P -q "falkon\t*install" if [ $? -ne 0 ]; then if [ ! -e "/usr/bin/falkon" ]; then zenity --info --title="Information" --text="Falkon is not installed!" exit 0 fi fi ################### #Uninstall program# ################### apt-get -y remove falkon | zenity --progress --no-cancel --title="Uninstalling..." --text="Uninstalling..." --pulsate --auto-close ###################### #Double Check Package# ###################### dpkg --get-selections | grep -P -q "falkon\t*install" if [ $? -ne 0 ]; then if [ ! -e "/usr/bin/falkon" ]; then zenity --info --title="Uninstalled Falkon" --text="Falkon uninstalled successfully!" exit 0 fi ####### #Error# ####### zenity --error --text="An error occured." --title="Error" exit 0 fi ####### #Error# ####### zenity --error --text="An error occured." --title="Error" exit 0