The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
94 views

why there is random behaviuor for a background job?

going through advanced bash scripting guide example 3.3 running a loop in background, i found this : #!/bin/bash # background-loop.sh for i in 1 2 3 4 5 6 7 8 9 10 # First loop. do echo -n "$i " done ...
23
votes
4answers
1k views

What's the difference between running a program as a daemon and forking it into background with '&'?

What are the practical differences from a sysadmin point of view when deploying services on a unix based system?
9
votes
2answers
760 views

Is there any way to let it snow on my linux mint destkop?

I want snow fall on my desktop really badly. Tried Xsnow (with Mate/Marco, Mate/Compiz and KDE/Kwin) but doesn't work. Snow plugin for Compiz doesn't work anymore either. Snow feature of KDE was ...
0
votes
2answers
377 views

is it possible to run job in foreground after user logout

I have some job to run which need be attached to terminal (or in foreground). The job is run in remote servers, and needs keep running after the users logout. I am aware of vnc server, however, I want ...
5
votes
1answer
177 views

How does sh -e interact with &?

I'm using sh (dash) on Ubuntu (lucid) and the manpage has this to say about -e: -e errexit If not interactive, exit immediately if any untested command fails. ...
3
votes
1answer
2k views

How to recover a backgrounded job from a previous shell? [duplicate]

Possible Duplicate: How can I disown a running process and associate it to a new screen shell? I launched a command that lasts a long time. I had to disconnect so I moved it in the ...
5
votes
1answer
191 views

Hard drive writes freezing up Gnome

I'm currently running Debian 6.0.5 on my white Macbook 2008 (4,1) and have recently noticed that when I download, move, or decompress a file, Gnome freezes up completely for at least 20 seconds. These ...
2
votes
2answers
430 views

Run program after finish ssh connection

How do I connect to ssh debian and running a program and let it continue to run after you finish my connection through ssh.
6
votes
3answers
355 views

is there something like a per-user daemon?

I need to run some background processes that live as long as I am logged in with a certain user. Does there exist something like a per-user daemon? I know only of global daemons that live from ...
1
vote
2answers
591 views

Have bash script wait for password

I want to write a little script which sets up a socks proxy via ssh and then starts a browser using that proxy. #!/bin/bash ssh -D 1234 user@host #& chromium-browser ...
1
vote
3answers
1k views

Bash wait for jobs and limit job count [duplicate]

Possible Duplicate: Four tasks in parallel… how do I do that? Suppose a loop invoking a command grep -v '#' < files.m3u | sed 's/\\\\/\/\//g' | sed 's/\\/\//g' | while read line ...
14
votes
2answers
16k views

How to suspend and bring a background process to foreground

I have a process originally running in the foreground. I suspended by Ctrl+Z, and then resume its running in the background by bg <jobid>. I wonder how to suspend a process running in the ...
21
votes
3answers
3k views

How to do nothing forever in an elegant way?

I have a program which produces useful information on stdout but also reads from stdin. I want to redirect its standard output to a file without providing anything on standard input. So far, so good: ...
6
votes
1answer
541 views

Can I make “There are stopped jobs” harder to kill?

Typical scenario: I temporarily need to access a file that my vhost prevents me from accessing. I fire up vim, edit the settings and background vim to tell apache to reload its configuration. ...
2
votes
1answer
855 views

daemon function in /init.d does not run the program in the background in fedora13

I use Fedora 13 and am trying to create a service for darkice. I put the script in the /etc/init.d directory and if I use the command service darkice start, the darkice is running in the foreground ...
1
vote
2answers
2k views

How to make a program which run from shell still live after close terminal? [duplicate]

Possible Duplicate: How do I prevent a script from terminating when the shell exits? I use gnome-terminal, and I run emacs under the terminal in the background by executing emacs &, but ...
3
votes
2answers
528 views

How to reload a background process?

I have a python script which I would like to run in the background. So I do this: $ nohup python script.py & If I am frequently making changes to the script, I need to terminate the process ...
2
votes
2answers
1k views

Process not working when executed in background inside shell script

I have an application that runs fine, with and without '&' when run directly from the terminal. However, if I try to execute it from a shell script, it works only if the trailing '&' is ...
1
vote
1answer
349 views

Is it possible to customise the prompt to show the if there are any background jobs?

Is it possible to customise the bash prompt to show the if there are any background jobs? I find it easy to forget that there are background jobs. Say if the prompt was... $ Is there a way to ...
5
votes
2answers
2k views

Running piped bash script in background

I'm attempting to build a monitoring script to watch localhost communication using netcat. I have two scripts that I've built, one to start the monitoring loop and one for the loop itself. They are as ...
3
votes
0answers
75 views

any way to un-disown / re-attach an interactive process to the tty? [duplicate]

Possible Duplicate: How can I disown a running process and associate it to a new screen shell? In bash is there an opposite of disown, that is, to re-attach a process I've accidentally ...
12
votes
7answers
23k views

Execute remote commands, completely detaching from the ssh connection

I have 2 computers, localpc and remoteserver. I need localpc to execute some commands on remoteserver. One of the things it needs to do is start a backup script that runs for a number of hours. I ...
3
votes
1answer
443 views

ssh “-f” don't give back hand in bash when listening to stdout/stderr

Please look at these: ## Does NOT return to the shell, but Ctrl-C can exit ssh -S none -fNR 13018:localhost:22 example.com | cat ## Returns to the shell (no "-S none") ssh -fNR ...
3
votes
3answers
548 views

Monitoring progress/liveness of background jobs

I have started a background job. Is there a way to know how it is progressing, and whether it has stopped? My command line is like: java weka.classifiers.trees.J48 -t data.arff J48-data.model ...
2
votes
0answers
263 views

What happens when you background a function which calls another function?

Question says it all on the tin. Can someone explain to me what goes on here ? I'm trying to find out how to background a process in a script that calls another function and reliably terminate it when ...
0
votes
2answers
1k views

ssh + nohup does not work

I'm trying to run a program over SSH that keeps running when I disconnect. This Stack Overflow answer gave me the following command: nohup sleep 30 > foo.out 2> foo.err < /dev/null & ...
0
votes
1answer
374 views

Enter process running in background/bring to foreground [duplicate]

Possible Duplicate: How can I disown it a running process and associate it to a new screen shell? I started a java client using nohup to get it to run in the background (needed to log out ...
4
votes
1answer
830 views

Why do backgrounded processes sometimes stop spontaneously?

Sometimes, some time after I've backgrounded a process with bg in bash, when I press Enter in the same shell to redisplay the prompt (just to check that I'm still in bash when some output from the ...
2
votes
3answers
1k views

Where do background jobs go?

From gnome-terminal I know the ability to suspend a job with C-z, and then send it to the background. When I close the terminal the process does not end. Where is the job being managed from, or is it ...
3
votes
2answers
769 views

Dynamically change desktop background from bash script

Is it possible to change the GNOME desktop background during some period of time by just a random phrase from the list on black screen? Will is seriously load the CPU and consume battery life?
5
votes
4answers
2k views

How can I run `watch` as a background job?

When I run: watch 'cmd >> output.txt' & the job gets suspended by the system: 3569 Stopped (tty output) Is there a workaround?
53
votes
6answers
29k views

How can I close a terminal without killing the command running in it?

Sometimes I want to start a process and forget about it. If I start it from the command line, like this: redshift I can't close the terminal, or it will kill the process. Can I run a command in ...
5
votes
1answer
215 views

Whenever I type some wrong command, my terminal tries to run that command in the background

Something strange started happening to my terminal. Whenever I type some wrong command it tries to run that command in the background. hegeek@colinux: ~# l [9]+ Stopped l thegeek@colinux: ~# ...