#!/bin/perl -w
# Zach Jablons
# I intend on compiling and maybe even packaging some of the more esoteric browsers and hosting them on mhscc.ath.cx,
# but I would like to have a different and more reliable solution than that.
use strict;
die "Please run this program as root. Use sudo perl icebuntubrowserselect.pl to do this." if $> != 0; # Check for root
my $goodBye1 = "You can launch";
my $goodBye2 = "in the terminal\n";
my $browserlist = <<EOF;
Enter the number corresponding to the browser that you want.
1. Mozilla Firefox
2. Google Chrome
3. Opera
4. Mozilla Seamonkey
5. Epiphany
6. Netsurf
7. links2
8. Midori
9. Dillo
10. Amaya
11. w3m-img
12. Hv3
13. Kazehakase
EOF
my $choice = <>;
# The apt-get install browser-bin is a placeholder for the actual command, which I will research and put in later
if ($choice == 1) {
exec("apt-get install firefox-bin");
print "$goodBye1 Firefox with firefox-bin $goodBye2";
} elsif ($choice == 2) {
exec("apt-get install chromium-bin");
print "$goodBye1 Chrome with chromium-bin $goodBye2";
} elsif ($choice == 3) {
exec("apt-get install opera-bin");
print "$goodBye1 Opera with opera-bin $goodBye2";
} elsif ($choice == 4) {
exec("apt-get install seamonkey-bin");
print "$goodBye1 Seamonkey with seamonkey-bin $goodBye2";
} elsif ($choice == 5) {
exec("apt-get install epiphany-browser");
print "$goodBye1 Epiphany with epiphany-browser $goodBye2";
} elsif ($choice == 6) {
exec("apt-get install netsurf-bin");
print "$goodBye1 Netsurf with netsurf-bin $goodBye2";
} elsif ($choice == 7) {
exec("apt-get install links2");
print "$goodBye1 links2 with links2 -g $goodBye2";
} elsif ($choice == 8) {
exec("apt-get install midori");
print "$goodBye1 Midori with midori $goodBye2";
} elsif ($choice == 9) {
exec("apt-get install dillo2");
print "$goodBye1 Dillo with dillo2 $goodBye2";
} elsif ($choice == 10) {
exec("apt-get install amaya");
print "$goodBye1 Amaya with amaya $goodBye2";
} elsif ($choice == 11) {
exec("apt-get install w3m-img");
print "$goodBye1 w3m-img with w3m-img $goodBye2";
} elsif ($choice == 12) {
exec("apt-get install hv3");
print "$goodBye1 Hv3 with hv3");
} elsif ($choice == 13) {
exec("apt-get install kazehakase");
print "$goodBye1 Kazehakase with kazehakase $goodBye2"
}