Remove console messages of background programs

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Remove console messages of background programs
# 1  
Old 09-02-2011
Remove console messages of background programs

Hi all !
If I run Xterm in backgprund mode &, when it stops I get this annoying messages on console:

[1] Exit 15 xterm ...

[2] Exit 15 xterm ...

How do can I remove this kind of ?

Thanks !
# 2  
Old 09-06-2011
You should run things like this with nohup, which ensures the parent does not kill the child if it dies/is killed, and redirects all output to the nohup.out file.

I had a problem with my wm getting killed by ctrl-c int on my xterm, the parent. One solution was to kill the parent and let the nohup wm keep running.

The wm, xterm and any x apps will die if the x server is not connected. I use a local Xvnc x service so if I disconnect, all my x is still running on that host. I do this for every host. Keystrokes and clicks are precious, so do not waste.
# 3  
Old 09-06-2011
For bash and zsh this works:
(xterm &>/dev/null &)

# 4  
Old 09-08-2011
Yes, a subshell makes the background job the child of a dead process, so you do not gt the job messages, but it is still killed with the grandparent by SIGHUP.

The subshell is great for wait, as it waits only for bg jobs inside subshell, not those of your interactive shell spawned long ago.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Difference between inbuilt suid programs and user defined root suid programs under bash shell?

Hey guys, Suppose i run passwd via bash shell. It is a suid program, which temporarily runs as root(owner) and modifies the user entries. However, when i write a C file and give 4755 permission and root ownership to the 'a.out' file , it doesn't run as root in bash shell. I verified this by... (2 Replies)
Discussion started by: syncmaster
2 Replies

2. Shell Programming and Scripting

How to redirect the messages from the script to console in Linux? #!/bin/bash if then echo "starting service" else echo " service not started" echo " Please check the file or manuly start the service" fi if i login with root credentials @ with passwd username:root passwd:abc once i login into linux pc... (6 Replies)
Discussion started by: saku
6 Replies

3. Shell Programming and Scripting

How to print warning messages on console when we use exec command?

I am having script in which for logging I am using exec command. I am calling another script/program through this script which is designed for another user id. So, After running script it is giving warning message as "This program has been designed for another user id. Please press Enter to... (6 Replies)
Discussion started by: VSom007
6 Replies

4. Shell Programming and Scripting

Remove duplicates, tried several programs not working

Hi all I tried to remove duplicates using all code mentione dbelow but its not wroking it's seems busy please check it sort -u filename.txt perl -lne 'chomp; if(!defined $x{$_}){$x{$_}=1;print}' inputfile out of attached files log file(input) log2file(output) (9 Replies)
Discussion started by: manigrover
9 Replies

5. Shell Programming and Scripting

Remove Script still running in background

HI I have by mistaken delete my script but its still running in background and giving me output and cretaed ..nfsB5DC2 file. I have kill all my prosses still it running.... How can i stop this script. i have unix solaris systems. (8 Replies)
Discussion started by: asavaliya
8 Replies

6. Shell Programming and Scripting

printing messages on the screen when background process is going on!

hello all, In my script i have written some messages which should come in screen while some background process is going on.. Like for example: if i want to add 2 numbers a and b ...when the addition is going on in the background i should get "ADDING TWO NUMBERS>>PLEASE WAIT " message on... (3 Replies)
Discussion started by: smarty86
3 Replies

7. UNIX for Dummies Questions & Answers

Are programs like sys_open( ) ,sys_read( ) et al examples of system level programs ?

Are the programs written on schedulers ,thread library , process management, memory management, et al called systems programs ? How are they different from the programs that implement functions like open() , printf() , scanf() , read() .. they have a prefix sys_open, sys_close, sys_read etc , right... (1 Reply)
Discussion started by: vishwamitra
1 Replies

8. UNIX for Advanced & Expert Users

How to set background colours for a cygwin console

Hi, I need to set the background colors for cygwin console, when I do ssh to production boxes. This should be done through commands.. Please suggest me asap. Thanks in advance. (3 Replies)
Discussion started by: praveen_b744
3 Replies

9. UNIX for Dummies Questions & Answers

disable background messages

Hi!!, is there any way to stop background processes from writting onto the terminal window?? I have opened a session into a server1. From this server1, I rlogin to Server2. Now all the "wall" messages of server1 are appearing on myscreen. Any way to stop "wall" messages coming from... (3 Replies)
Discussion started by: jyotipg
3 Replies

10. UNIX for Dummies Questions & Answers

console output messages

could someone please tell me how to stop error messages being displayed to the console port. Currently, error messages are streaming to the console and I ant do anything. many thanks..... (2 Replies)
Discussion started by: boristhespider
2 Replies
Login or Register to Ask a Question