Re: Detach Icedove from xterm itself called from terminal.
Paul Isambert wrote:
> Hello there,
>
>
> When started from gnome-terminal, Icedove stays attached to it. I can
> detach it by executing "icedove &". The problem is, I can't seem to do
> that recursively, i.e. from the terminal call another terminal which
> calls "icedove &". The following works: "xterm -e 'icedove'" (with
> Icedove attached to xterm), but "xterm -e 'icedove &'" doesn't (xterm
> starts and closes immediately).
>
> Any idea?
Hi Paul,
First, about the error. Given the -e option, xterm runs the next
argument instead of the shell that it would run by default. So it's
trying to run an executable called 'icedove &', can't find it, and
exits.
The '&' is shell syntax; you need to run a shell in the xterm. The
shell would need to both run the icedove command in the background,
and produce an interactive prompt. I don't know if there is a
straightforward way of doing that. The best I can think of is
xterm -e bash --rcfile <(echo icedove \&)
or if you want the usual initialisation files to run, you could do
xterm -e bash --rcfile <(cat /etc/bash.bashrc ~/.bashrc; echo icedove \&)
or use a dedicated rcfile:
xterm -e bash --rcfile ~/.my-icedove-rcfile
where ~/.my-icedove-rcfile contains
. /etc/bash.bashrc
. ~/.bashrc
icedove &
There are a couple of things I haven't figured out:
This does not to allow you to bring the icedove to the foreground.
Nor does it seem to show stdout/stderr from icedove in the xterm, which
I guess you want.
Hopefully someone will provide a better answer.
--
Cheers,
Clive
Reply to: