Stop receiving signals when running music from terminal
I can play music in my music collection by typing:
'vlc somefile.mp3 &'
Which works great except that I always start receiving some signals from the execution of playing that song.
In the following image the signals I dont want to be receiving is the heapload of information that starts running down the screen after the "play_all" command has been run here:

I don't want to receive those signals, they are irrelevant.
I have already tried adding > /dev/null at the end of the command which I thought would redirect the STDOUT away, but to no avail.
How do I stop receiving signals when running music from the terminal?
terminal
add a comment |
I can play music in my music collection by typing:
'vlc somefile.mp3 &'
Which works great except that I always start receiving some signals from the execution of playing that song.
In the following image the signals I dont want to be receiving is the heapload of information that starts running down the screen after the "play_all" command has been run here:

I don't want to receive those signals, they are irrelevant.
I have already tried adding > /dev/null at the end of the command which I thought would redirect the STDOUT away, but to no avail.
How do I stop receiving signals when running music from the terminal?
terminal
1
What do you mean with signals?
– Ulrich Dangel
Nov 24 '12 at 14:43
I've updated the question now.
– Hermann Ingjaldsson
Nov 24 '12 at 14:58
add a comment |
I can play music in my music collection by typing:
'vlc somefile.mp3 &'
Which works great except that I always start receiving some signals from the execution of playing that song.
In the following image the signals I dont want to be receiving is the heapload of information that starts running down the screen after the "play_all" command has been run here:

I don't want to receive those signals, they are irrelevant.
I have already tried adding > /dev/null at the end of the command which I thought would redirect the STDOUT away, but to no avail.
How do I stop receiving signals when running music from the terminal?
terminal
I can play music in my music collection by typing:
'vlc somefile.mp3 &'
Which works great except that I always start receiving some signals from the execution of playing that song.
In the following image the signals I dont want to be receiving is the heapload of information that starts running down the screen after the "play_all" command has been run here:

I don't want to receive those signals, they are irrelevant.
I have already tried adding > /dev/null at the end of the command which I thought would redirect the STDOUT away, but to no avail.
How do I stop receiving signals when running music from the terminal?
terminal
terminal
edited Feb 22 at 20:56
Glorfindel
3051411
3051411
asked Nov 24 '12 at 14:28
Hermann IngjaldssonHermann Ingjaldsson
77531429
77531429
1
What do you mean with signals?
– Ulrich Dangel
Nov 24 '12 at 14:43
I've updated the question now.
– Hermann Ingjaldsson
Nov 24 '12 at 14:58
add a comment |
1
What do you mean with signals?
– Ulrich Dangel
Nov 24 '12 at 14:43
I've updated the question now.
– Hermann Ingjaldsson
Nov 24 '12 at 14:58
1
1
What do you mean with signals?
– Ulrich Dangel
Nov 24 '12 at 14:43
What do you mean with signals?
– Ulrich Dangel
Nov 24 '12 at 14:43
I've updated the question now.
– Hermann Ingjaldsson
Nov 24 '12 at 14:58
I've updated the question now.
– Hermann Ingjaldsson
Nov 24 '12 at 14:58
add a comment |
2 Answers
2
active
oldest
votes
You can stop receiving the HUP (hang up) signal by using nohup before your execution command, or you can use bash disown command to disable HUP effect for currently running job.
nohup vlc somefile.mp3 &
add a comment |
As nohup will always generate a file with the output to stdout/stderr you should combine it with output redirection.
The output you see in the terminal is the output to stderr.
When you use vlc somefile.mp3 > /dev/null & you only redirect the output of stdout, so you still see the stderr output in the terminal.
To redirect both stdout and stderr and have no file written by nohup you can use nohup vlc somefile.mp3 &> /dev/null &.
That works when I type it directly but not when I run it through Perl's system() command.
– Hermann Ingjaldsson
Nov 24 '12 at 16:32
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f56553%2fstop-receiving-signals-when-running-music-from-terminal%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can stop receiving the HUP (hang up) signal by using nohup before your execution command, or you can use bash disown command to disable HUP effect for currently running job.
nohup vlc somefile.mp3 &
add a comment |
You can stop receiving the HUP (hang up) signal by using nohup before your execution command, or you can use bash disown command to disable HUP effect for currently running job.
nohup vlc somefile.mp3 &
add a comment |
You can stop receiving the HUP (hang up) signal by using nohup before your execution command, or you can use bash disown command to disable HUP effect for currently running job.
nohup vlc somefile.mp3 &
You can stop receiving the HUP (hang up) signal by using nohup before your execution command, or you can use bash disown command to disable HUP effect for currently running job.
nohup vlc somefile.mp3 &
answered Nov 24 '12 at 15:06
Amir NaghizadehAmir Naghizadeh
1545
1545
add a comment |
add a comment |
As nohup will always generate a file with the output to stdout/stderr you should combine it with output redirection.
The output you see in the terminal is the output to stderr.
When you use vlc somefile.mp3 > /dev/null & you only redirect the output of stdout, so you still see the stderr output in the terminal.
To redirect both stdout and stderr and have no file written by nohup you can use nohup vlc somefile.mp3 &> /dev/null &.
That works when I type it directly but not when I run it through Perl's system() command.
– Hermann Ingjaldsson
Nov 24 '12 at 16:32
add a comment |
As nohup will always generate a file with the output to stdout/stderr you should combine it with output redirection.
The output you see in the terminal is the output to stderr.
When you use vlc somefile.mp3 > /dev/null & you only redirect the output of stdout, so you still see the stderr output in the terminal.
To redirect both stdout and stderr and have no file written by nohup you can use nohup vlc somefile.mp3 &> /dev/null &.
That works when I type it directly but not when I run it through Perl's system() command.
– Hermann Ingjaldsson
Nov 24 '12 at 16:32
add a comment |
As nohup will always generate a file with the output to stdout/stderr you should combine it with output redirection.
The output you see in the terminal is the output to stderr.
When you use vlc somefile.mp3 > /dev/null & you only redirect the output of stdout, so you still see the stderr output in the terminal.
To redirect both stdout and stderr and have no file written by nohup you can use nohup vlc somefile.mp3 &> /dev/null &.
As nohup will always generate a file with the output to stdout/stderr you should combine it with output redirection.
The output you see in the terminal is the output to stderr.
When you use vlc somefile.mp3 > /dev/null & you only redirect the output of stdout, so you still see the stderr output in the terminal.
To redirect both stdout and stderr and have no file written by nohup you can use nohup vlc somefile.mp3 &> /dev/null &.
edited Nov 24 '12 at 16:17
answered Nov 24 '12 at 16:10
tongputongpu
29614
29614
That works when I type it directly but not when I run it through Perl's system() command.
– Hermann Ingjaldsson
Nov 24 '12 at 16:32
add a comment |
That works when I type it directly but not when I run it through Perl's system() command.
– Hermann Ingjaldsson
Nov 24 '12 at 16:32
That works when I type it directly but not when I run it through Perl's system() command.
– Hermann Ingjaldsson
Nov 24 '12 at 16:32
That works when I type it directly but not when I run it through Perl's system() command.
– Hermann Ingjaldsson
Nov 24 '12 at 16:32
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f56553%2fstop-receiving-signals-when-running-music-from-terminal%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
What do you mean with signals?
– Ulrich Dangel
Nov 24 '12 at 14:43
I've updated the question now.
– Hermann Ingjaldsson
Nov 24 '12 at 14:58