I have made some modifications to the perl script to allow for simple gui integration.
Props to @gpled for showing me zenity a couple of months ago.
Change this:
#!usr/bin/perl -w
#script by @robots_unix
{
print "Are you at CCC?";
$name = ;
chomp ($name);
if ($name eq "yes"){
To this:
#!usr/bin/perl -w
#script by @robots_unix
system('zenity --title "Apt-Cacher-NG" --text "Are you at CCC?" --list --radiolist --column "ACNG" --column "Toggle" False no True yes> aptyesno');
{
open(APT, "Location of aptyesno");
$name =
if ($name eq "yes\n"){
Then right-click on gnome-panel, click add to panel, click create custom application launcher, then for the command type: sudo perl location of your perl script.
Now you can change the hosts file by just clicking an icon on your gnome-panel.
Have fun.
No comments:
Post a Comment