Starting gnome-terminal in foreground?

Nils Kassube kassube at gmx.net
Fri Aug 12 09:28:06 UTC 2016


Josef Wolf wrote:
> How would I start gnome-terminal so that it don't automatically
> background itself?
> 
> For example, I'd like to have something like that:
> 
>    #!/bin/sh
>    gnome-terminal -e wget http://some-host/some-large-tarball.tar.gz
>    echo "Done"
> 
> The problem is, that gnome-terminal hands over the command to
> gnome-terminal-server and exits immediately. This effectively behaves
> as if gnome-termial would background itself and the echo command is
> executed immediately instead of waiting until the download is done

Sorry, I'm not familiar with gnome-terminal, but you could use xterm
instead, I think it is installed by default. Something like

xterm -e "wget http://some-host/some-large-tarball.tar.gz;echo done;read"

should do the job.


Nils





More information about the ubuntu-users mailing list