I'd like to disable the output I get from VLC when calling it from bash. You can see that output on the following picture:
So, how do I disable that?
Redirecting output to /dev/null like described here doesn't work.
Note that, on the picture, I had to send kill sign twice to kill it, why if there is just one process? Or are there two? Maybe there are actually two processes and with my command only the output of the first one is redirected.?
If I run it in the background, and I send kill singal, first, it looks like process is no longer running in shell but just in a window, but than, soon I get some messages again. Check out the picture:
So anyway, I just want to disable that output.
UPDATE:
And I want to run it in background too.
vlc &> /dev/null
The following should work, but right now I've tried and it didn't work well.
vlc "filename" &> /dev/null &
I play the file, at first it looks okay, then I start changing directories and issuing other commands, and VLC output comes in again
But that was the first time I've tried, now it works, so I guess it'll work in future too.
Best Answer
If you use
vlc > /dev/null
then standard output will be redirected to/dev/null
but standard error will go through to the terminal. You must use the commandvlc &> /dev/null
which will redirect both standard output and standard error. I've tested this and it works. According to the manual,vlc -q
will enable "quiet" mode (suppress output) - I haven't tested this.EDIT I'm not completely sure what you mean by "in the background", but the program screen (
sudo apt install screen
) will allow you to start a command in a terminal, then close the terminal but keep the command running.nohup
can also do this. Or, try pressing Alt-F2 at the desktop, you will probably get a prompt to run a command. You can run vlc from there, but unlike screen, you cannot interact with vlc in a terminal later.ANOTHER EDIT This question looks like just what you need. How to disable VLC output in command-line mode?