The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
32 views

Can I start a background process with a specific working directory?

Say I have this structure /masterscript /a/script1 /a/b/script2 In masterscript I spawn the other scripts as background processes: "/a/script1" & "/a/b/script2" & The problem is that ...
0
votes
0answers
24 views

How to make the process run after closing the session [duplicate]

I have started a process in Linux without a terminal multiplexer like screen or tmux, without nohup. Now I want to logout from my remote ssh session without interrupting the execution of that process. ...
1
vote
2answers
40 views

Call background process back to stdout

Is it possible to "call" a background process output to be shown in the terminal? Example: cron starts apt-get to update the system and I want to see the output of apt-get
4
votes
0answers
65 views

How do I execute in background / return early?

For reference, I'm using phpseclib to control a remote SSH server using the 'root' account. I have to start/stop a java process which is ran in the background. Stopping works fine with killall java ...
2
votes
0answers
56 views

Adding wallpapers in GNOME Shell

When executing Activities → Settings → Background, you can find three background tabs: [Wallpapers] [Pictures] [Colors] In [Wallpapers] you can find backgrounds under /usr/share/backgrounds/, but ...
3
votes
1answer
32 views

Is there an easy way to background a sudo shell?

A bit more details, what I'm looking for is some kind of ^Z for sudo shells. For instance when running a long command I can hit ^Z to suspend the command or when I do ~^Z in ssh after hitting Enter. ...
7
votes
4answers
712 views

I am using `&`: why isn't the process running in the background?

I know that I can append & to a command to run the process in the background. I'm SSH'ing into an Ubuntu 12.04 box and running a python program with $python program.py & -- but when I go to ...
3
votes
3answers
415 views

Permanent background ssh connection to create reverse tunnel: what is correct way?

Related question: initiate ssh connection from server to client Answer from there helped me a lot, this command does what I need: ssh -R 2225:localhost:22 loginOfServerWithPublicIP@publicIP So I ...
1
vote
1answer
58 views

Can't spawn backgrounded process

My team's using Pallet (think Puppet in Clojure) to automate server provisioning, but running into a fairly fundamental problem: Pallet can execute arbitrary scripts directly on target VMs, but if one ...
1
vote
1answer
42 views

getting pid of two last commands executed in background and do stuff

I wrote this bash: #!/bin/bash eval "(a command) &" pid1=$! eval "(while kill -0 $pid1; do .... ; done) &" #It creates file.txt after few seconds pid2=$! if [ -s ...
2
votes
2answers
61 views

What environment and credential is used by startup, background and service processes

Startup scripts (on boot) Processes running in (or sent to) the background (when using SSH -fN for example) Services etc... What $path variable will they be using? What credentials? Anything else I ...
6
votes
2answers
1k views

what will ¬ do in bash?

While wanting to start gitg as backgrounded through writing gitg & I accidentally typed gitg ¬. This did not cause an error, instead I got with a later command in the same terminal (translated): ...
8
votes
4answers
328 views

Terminate every background process

I have a few Stopped background processes. kill $(jobs -p) and kill `jobs -p` have no effect kill %1, kill %2, etc. successfully terminate individual processes How can I kill every background ...
4
votes
2answers
169 views

Opening a file with program in background from shell

The command to launch a program, say evince, from bash shell in background is evince & But what if I want to open some file with evince in background? Nor evince myfile.pdf & neither evince ...
4
votes
2answers
2k views

Shell script wait for background command

I am writing a script, but there is something I need that I can't find a way to do it... I need to make a command in background "command1 &" and then somewhere in the script I need to wait for it ...
1
vote
1answer
71 views

What does ^Z mean?

I tried using ^Z to send and application to the background(to then use fg to restore) but I notice that it says "Stopped" and in another terminal while monitoring htop, everything just freezes. Is ...
1
vote
3answers
276 views

`wait` doesn't wait for `wget --background`

I have gone through several SE posts on the unix wait command and none of the posts resolve my problem. I have a weather forecast model to run. It has first to prepare some folders, then download data ...
3
votes
3answers
109 views

Log to multiple files while process in background (nohoup)

I have bash script that logs to two log files in parallel. echo "$(date) | [STATE] Activating IP forwarding" >> $logsPath$logFileName echo $(date +"%Y-%m-%d %H:%M")","$previousState >> ...
0
votes
3answers
91 views

My ubuntu background is totally black, even after opening programs such as terminal

My Ubuntu background is totally black when I log in. I can open the terminal, write command so that i open other programs, but I am unable to see any of it.
6
votes
3answers
1k views

reliable return code of background process

Let's assume the following piece of bash code: foo > logfile 2>&1 & foo_pid=$! while ps -p$foo_pid do ping -c 1 localhost done wait $foo_pid if [[ $? == 0 ]] then echo "foo ...
1
vote
1answer
108 views

spawning multiple Background processes

I have a file which has 2,000,000 lines in it. I am running some commands for each line. I was trying to achieve some parallelism using GNU-parallel and swift as discussed here. However, I got an ...
0
votes
2answers
606 views

How do I run two ongoing processes at once in linux/bash?

I would like to know how I can run two ongoing processes at the same time in Linux/bash. basically, I have a Node web server, and a MJPG-Streamer server. I want to run both these processes at once, ...
1
vote
1answer
126 views

Alias for redirecting both standard output and standard error, as well as sending to background [duplicate]

I am trying to create an alias for redirecting both standard output and standard error of gedit to /dev/null, whilst sending the command to background. This works: $ alias gedit='gedit $1 > ...
8
votes
3answers
271 views

If you ^Z from a process, it gets “stopped”. How do you switch back in?

I accidentally "stopped" my telnet process. Now I can neither "switch back" into it, nor can I kill it (it won't respond to kill 92929, where 92929 is the processid.) So, my question is, if you have ...
1
vote
2answers
352 views

How to terminate a background process in Linux when the pid is unknown?

I have a job dispatcher bash shell script containing below codes: for (( i=0; i<$toBeDoneNum; i=i+1 )) do while true do processNum=`ps aux | grep Checking | wc -l` ...
16
votes
9answers
1k views

How to make sure that a command is not interrupted, even if terminal is closed? [duplicate]

In Linux. Say I want to run a command and it takes too long. I just want to ensure it's done. How?
2
votes
1answer
433 views

Python script run while screen is locked

I have a python script which seems to be failing to continue running its while True: ... sleep() loop my code is at http://github.com/xdaimon/xdaimonConky What happens is I autostart python on ...
14
votes
3answers
12k views

How to stop a background process?

I have started a wget on remote machine in background using &. Suddenly it stops downloading. I want to stop its process, then start it again. How can I stop it? I haven't close its shell window. ...
5
votes
6answers
1k views

Run a command without making me wait

On the CLI, sometimes a command I type takes a while to complete, and sometimes I know when that's about to happen. I'm a bit confused on "backgrounding" and such in Linux. What is the most common ...
2
votes
1answer
220 views

Dialog - Continue in background

I installed this program: http://invisible-island.net/dialog/dialog.html Now I want to use this dialog: http://invisible-island.net/dialog/dialog-figures.html#demo_gauge dialog --gauge 'Checking ...
0
votes
4answers
1k views

Opening Firefox from terminal [duplicate]

When I type firefox in terminal, it starts Firefox but the terminal "hangs". What is happening behind the scenes? Can I open Firefox from terminal and keep on using the same terminal tab for other ...
7
votes
3answers
231 views

What's the difference between && and ; when forking sleep to background?

I have just asked a question about forking a process to sleep in the backgroud. The notation I came up with myself looks like this: sleep 10 && echo "hello world" & This answer to a ...
2
votes
1answer
362 views

Difference between process in background and daemon [duplicate]

What is technically the difference of a process that started in foreground and was manually put into background and a daemon? Do they have different properties?
3
votes
2answers
404 views

What is “Exit 2” from finished background job status?

I have an exercise to put in a file some data (*conf from some directories) and need to do this in background. I did it and I am wondering what is the meaning of output messages: [A@localhost tests]$ ...
0
votes
4answers
4k views

Can't set background wallpaper in Gnome 3

I am using Debian Testing and Gnome Flashback (but it behaves the same in standard Gnome Shell). It gives me plain white background, and I can't set my own. Also, the settings dialog for background ...
2
votes
5answers
2k views

How to start a program in the background

The program Boblight does not run in background. There is no noticeable difference between executing sudo boblightd and sudo boblightd& How can I solve this problem that the console will ...
1
vote
3answers
89 views

ssh targetHost &; fg - does not work, but why?

I was trying the following combination in order to get the pid of the ssh session (running in the background displays the pid) and than fg to get back to the ssh session and introduce the password: ...
12
votes
3answers
1k views

Wait command usage in Linux?

#!/bin/bash function back() { sleep $1 exit $2 } back $1 $2 & b=$! if `wait $!`;then echo success else echo failure fi bash-3.00# ./back 300 0 failure bash-3.00# ./back 300 1 ...
4
votes
2answers
540 views

“nohup sudo …” does not prompt for passwd and does nothing

When I run nohup sudo myscript.sh & I only get something like [1] 1220 in return and do not get prompted for a password. The process does not start either. I want to run this script in the ...
3
votes
1answer
3k views

bash: Run command in background and capture pid [duplicate]

Am writing a bash 4.1 script... Would like run another script (or internal function) in the background... And capture the pid of that background job in a variable in the foreground script... If the ...
13
votes
2answers
728 views

How to background a command chain?

I want to background a command chain like cp a b && mv b c && rm a. I have tried doing cp a b && mv b c && rm a & but this only backgrounds the last process. How ...
1
vote
1answer
46 views

How to customize a backend running job completion message?

Here is the situation, I am running a command (my own executives), in bash shell (Ubuntu), say something like this: [newbie@office currentCaseAFolder]$ FEMSolver & So that the FEMSolver job is ...
2
votes
2answers
733 views

How to bring back SSH session that was started with the -f option (run in background)

I'm pretty lost on this. From the man page: -f Requests ssh to go to background just before command execution. After starting SSH with the -f option, I have a working tunnel. But after I ...
1
vote
1answer
56 views

How and where can I permanently set $ program file to have extra argument '&'

When I run a program from terminal like so: $ program file For example $ gedit myfile.txt I cannot think of a time when I would not prefer to use '&' so that I can free up my terminal ...
2
votes
3answers
2k views

How to send to background a running process started with sudo?

I have just installed SLC6 (derived from SL6 derived from RHEL6). I can send a running process to the background by hitting Ctrl-Z in the terminal where it was started. However, I can't do it when I ...
0
votes
1answer
57 views

Background Tasks on Multicore machine?

Say I have a dual core cpu running linux. If I start two single threaded processes (nodejs) in the background, how are they scheduled? Can I assume that the OS will as best as it can, attempt to ...
2
votes
0answers
1k views

How to run ssh -t user@remote 'sudo nohup bash -c “comand”' in background

I want to run a script on a remote host with sudo privilege, someone suggests that I should use nohup and ssh -t, like the following command: The script ls; sleep 10; echo finish is crafted here to ...
0
votes
1answer
181 views

RedHat / CentOS 5.5 background process has restricted memory

I run Fisheye that uses Java for Linux. Settings go like this: generate options FISHEYE_OPTS=`$JAVACMD -Xms100m -Xmx200m -cp $FISHEYE_HOME/fisheyeboot.jar com.cenqua.fisheye.boot.OptsSetter` build ...
5
votes
1answer
957 views

background process pipe-input

if i want to display "aaa" on screen: (1)$: echo aaa | cat ... works OK (2)$: echo aaa | ( cat ) ... works OK (3)$: echo aaa | ( cat & ) ... NOT working ...
8
votes
3answers
1k views

How do you send command line apps directly to the background?

I already know that pressing ctrl+z stops the app, then I can send the app to background with the bg command, but that means there is a brief preiod of time that the app is stopped. How do I send the ...