Source Code Update: So far this provides a very basic gui for the Linux terminal. Written in PERL.

#!/usr/bin/perl
use Tk;

#DR App Store 1.0 10-11-2015 Start Program


my $mw = MainWindow->new;
$mw->geometry("500x500");
$mw->resizable(0,0);
$mw->title("DragonRed App Store");


my $lbl1 = $mw->Label(-text => "Select or Search for a Program", -font => "{Arial} 14 {bold underline}")->place(-x => 30, -y => 5);

my $button1 = $mw->Button(-text => "Execute", -command => sub { &shellroute; })->place(-x => 400, -y => 30);
my $button2 = $mw->Button(-text => "Install", -command => sub { exit })->place(-x => 400, -y => 80);

my $pid1 = $mw->Entry(-textvariable => \$text1, -width => 50)->place(-x => 20, -y => 30);
my $pid2 = $mw->Entry(-textvariable => \$text2, -width => 50)->place(-x => 20, -y => 80);

my $results1 = $mw->Scrolled("Text", -scrollbars => 'ose', -height => 23, -width => 63)->place(-x => 15, -y => 150);

#tie all output from perl only to the $results1 box
#tie *STDOUT, 'Tk::Text', $results1;


MainLoop;


sub shellroute(){


#$results1->insert("1.0", "Running Shellroute\n");
$who=system $text1;

#############################
#THIS REDIRECTS TERMINAL OUTPUT TO THE WIDGET
my $out1 =  `$text1`;
$results1->insert('end',"$out1\n");
$results1->see('end');
###########################




print "complete shellroute\n";
}

Comments

Popular Posts