When I launch certain programs from the command line like eclipse and document viewer in 11.10 it spews a load of information that seems inconsequential.
Also when they are run in the background they sometimes continue to produce output to the terminal which I am currently working on, which is irritating.
I would like them just launch and keep the background stuff in the background. My reasoning is that if you launch these programs through the GUI (eg double clicking on an icon) these messages are never shown to me, so I don't need them in the command line.
If you can avoid writing stuff in the console, it depends on how output from the program is created. If it is streamed to standard output, then it is just enough to do
and no output should be made.
To suppress error messages as well:
Or in bash, simply:
But if they do it somehow differently then it might be a problem to stop it from writing in the console.
if possible use the solution given by MuffinStateWide
You can create a bash function that will alias a command name and add some extra functionality to achieve what you are asking for.
For example: let's say you want to launch
gvim
(a gui text editor) from the command line.you could write a function like this:
(add this function to your
.bashrc
or.bash_aliases
file so it is always loaded)Explanation:
this will alias the
gvim
command with a bash function also namedgvim
(so when you typegvim
at a bash prompt, it will call yourgvim
function, rather than executing the realgvim
command. Your function then calls the realgvim
command (and accepts its regular args), with some added features:/dev/null
(suppresses output to the terminal)&
to run the command in the background (so your shell isn't blocked)disown
to remove the background job from the shell (so it won't appear in the list of active jobs)nohup
to detach the process from the terminal (so you can end your shell session or close your terminal without killing the process)try adding --help as a command switch and look for "quiet" this should suppress the output , or just launch from GUI. and launch with the switch or find a way to suppress it via script
personally i launch from cli to get that output so im not sure its possible for all GUI apps.