Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi everybody,

the search function of perldoc is down and even here I
couldn't find how to do it, I only found Win.. solutions, but I need Linux-KDE-version.

I want a child-process (after fork) to start its own (new) console and
to redirect the STDOUT to this konsole. I need to create a new console:
cmd from a KDE-console: user:>konsole but system("konsole") returns -1 (failed).
After this I need to get the handels to redirect the STDOUT and STDIN to this console.
This konsole should die together with the child. Maybe that this doesn't need an extra cmd.

So far I have no idea how this should work,
Carl

Replies are listed 'Best First'.
Re: create a new (Linux) console and redir. STDIN & STDOUT
by grantm (Parson) on Nov 27, 2002 at 11:49 UTC

    I'm not a Konsole kind of guy, but this should spawn a script in an Xterm:

    system("xterm -e $command");

    After your 'system' failed, did you check $! for error details?

      The sane hacker will, of course, avoid shell and so prefer system "xterm", -e => $command; :-)

      Makeshifts last the longest.

Re: create a new (Linux) console and redir. STDIN & STDOUT
by zentara (Cardinal) on Nov 27, 2002 at 16:36 UTC
    Maybe the IO-Tty module would give you some help.