09-10-2010
Installing applications by avoiding GUI
Hi Experts,
Now the problem is when I run the install script inside .app folder, it opens a GUI and asks for user input. I want to avoid these GUI. I want to provide input when i run install script e.g.
$ ./install < inputfile
I used to redirect input from input file to install script. But this works only when i am asking user input from command line only. But in this case my install script opens up GUI.
Will you please guide me to achieve this asap?
Regards,
akash mahakode
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi!
What do I need to do to install GTK so I can use Perl GUI's in UNIX? I want to install it in my account. I am not a sys admin or anything.
Thanks in advance,
P. (1 Reply)
Discussion started by: pmcg
1 Replies
2. UNIX for Dummies Questions & Answers
Hello all,
1) I want to have a GUI application that will call Unix shell scripts,
2) that GUI application should be able to reside on windows ( if possible) and then call Unix shell script either directly or through a server residing on unix.
That is for example.
If a is windows gui (... (1 Reply)
Discussion started by: hchivukula
1 Replies
3. BSD
Hi there,
I am a new FreeBSD. I am entirely new to tihs OS, I just have good dos/windows skills. So I am comparing everything with dos/windows.
I have installed FreeBSD with default settings. When FreeBSD starts, the GUI (if there is any ?!?!?) doesn't start; just the command line. So thats... (4 Replies)
Discussion started by: koraykazgan
4 Replies
4. Programming
Hello, I want know about building a product on Sun solaris and Redhat Linux.
Product would contain C,C++, Java, UNIX Shell scripts and so on. It will not be a client server programme.
Thanks!
Shafi (5 Replies)
Discussion started by: shafi2all
5 Replies
5. Shell Programming and Scripting
Hi Experts,
Can anyone suggest me kindly, whether designing some small GUI applications are possible in shell scripting.....
Like a small calculator kind of stuff.......
I fit is possible guide me with some examples.
Thanks,
Newbie....... (0 Replies)
Discussion started by: kritibalu
0 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
I want to put a check in my script to check if the same instance is already running and not finished and if not then does not allow it to run! in which part of my script I should put this? and any idea how I should write it? tx (4 Replies)
Discussion started by: messi777
4 Replies
7. UNIX for Dummies Questions & Answers
In bash shell, how we can avoid the commands getting recorded in history file.
One way i can think of is :
export HISTSIZE=0
Is there any other way to achieve this?
Thanks (1 Reply)
Discussion started by: pandeesh
1 Replies
8. Programming
python gui or c++ gui or java gui?
and when to use etch one? (1 Reply)
Discussion started by: kaja
1 Replies
LEARN ABOUT DEBIAN
wx::thread
Wx::Thread(3pm) User Contributed Perl Documentation Wx::Thread(3pm)
NAME
Thread - using wxPerl with threads
SYNOPSIS
# the order of these use()s is important
use threads;
use threads::shared;
use Wx;
my $DONE_EVENT : shared = Wx::NewEventType;
my $worker = threads->create( &work );
# create frames, etc
my $frame = Wx::Frame->new( ... );
EVT_COMMAND( $frame, -1, $DONE_EVENT, &done );
$app->MainLoop;
sub done {
my( $frame, $event ) = @_;
print $event->GetData;
}
sub work {
# ... do stuff, create a shared $result value
my $threvent = new Wx::PlThreadEvent( -1, $DONE_EVENT, $result );
Wx::PostEvent( $frame, $threvent );
}
# event handler
sub OnCreateThread {
# @_ = () is necessary to avoid "Scalars leaked"
my( $self, $event ) = @_; @_ = ();
threads->create( ... );
}
DESCRIPTION
Threaded GUI application are somewhat different from non-GUI threaded applications in that the main thread (which runs the GUI) must never
block. Also, in wxWidgets, no thread other than the main thread can manipulate GUI objects. This leads to a hybrid model where worker
threads must send events to the main thread in order to change the GUI state or signal their termination.
Order of module loading
It's necessary for "use Wx" to happen after <use threads::shared>.
Sending events from worker threads
"Wx::PlThreadEvent" can be used to communicate between worker and GUI threads. The event can carry a shared value between threads.
my $DONE_EVENT : shared = Wx::NewEventType;
sub work {
# ... do some stuff
my $progress = new Wx::PlThreadEvent( -1, $DONE_EVENT, $progress );
Wx::PostEvent( $frame, $progress );
# ... do stuff, create a shared $result value
my $end = new Wx::PlThreadEvent( -1, $DONE_EVENT, $result );
Wx::PostEvent( $frame, $end );
}
The target of the event can be any "Wx::EvtHandler"
Receiving events from worker threads
"Wx::PlThreadEvent" is a command event and can be handled as such. The "->GetData" method can be used to retrieve the shared data
contained inside the event.
my $DONE_EVENT : shared = Wx::NewEventType;
EVT_COMMAND( $frame, -1, $DONE_EVENT, &done );
sub done {
my( $frame, $event ) = @_;
print $event->GetData;
}
Creating new threads
Creating new threads from event handlers works without problems except from a little snag. In order not to trigger a bug in the Perl
interpreter, all event handler that directly or indirectly cause a thread creation must clean @_ before starting the thread.
For example:
sub OnCreateThread {
my( $self, $event ) = @_; @_ = ();
threads->create( ... );
}
failure to do that will cause "scalars leaked" warnings from the Perl interpreter.
perl v5.14.2 2007-03-16 Wx::Thread(3pm)