In your question, there are some misconceptions. Firstly, this behavior is not limited to Gtk commands. Secondly, the notification is not send after the "next command" but on the next prompt (say, as soon as you type the Enter key).
What you are doing is called Job Control. In bash you can send commands to the "background" so that they don't block the command line. For example, try running gedit
on the terminal. Gedit's window should appear and the command line should be "blocked", that is, you cannot type any new command unless you close Gedit.
A solution to this blocking behavior of "long running" processes is to send their commands to the background on invocation. This way the command won't block and you will be able to continue working on the command line.
A way to send a command to the background is by using the &
after the command. Continuing with the Gedit example, you can start it on the background by running
gedit &
You will now notice that the command prompt is printed immediately and you can run new commands (contrast this with simply running gedit
without ampersand). You'll also notice the extra information about the new "job" you just created: the job number in brackets, and its PID.
When the job ends (either normally or because you killed it), bash will notify you with something similar to:
[1]+ Done gedit &
(The 1
is the job number and on the right you have the command with which you created this job, just in case you forgot :-)
If you have several jobs on the background you can use the command jobs
to get a list with their statuses.
In conclusion, you don't need to add the ampersand unless you want to run another command immediately.
For references and other interesting aspects about job control read:
&
sends the job to the background, you can run the commandjobs
to see the jobs on the background andfg N
to send the N-th job to the foreground.[jobNumber] PID
: first part of the question solved :)wget http://my.download.com/file &
and when it's finished bash will notify you so with something like[N]+ Done <command + parameters you used>
.