Run a command immune to hangups, with output to a non-tty.

learn more… | top users | synonyms

0
votes
1answer
44 views

Some confusion about nohup

Situation1 command find / -name "*.conf" Ctrl+Z to pause the process Situation2 --- hello.sh --- #!/bin/bash /bin/sleep 5000 command ./hello.sh & Situation3 command ...
13
votes
3answers
58k views

Run a nohup command over SSH, then disconnect

I want to execute a script, start.sh on a remote server which runs this: nohup node server.js & Naively, I call SSH like this: ssh myserver <<EOF ./start.sh & EOF This starts the ...
11
votes
2answers
4k views

Differences between “<command> & disown” and “nohup <command> & disown”

This is my understanding about the usage of &, disown and nohup: <command>: runs the process within the Terminal's current bash instance, in the foreground (i.e. the process is listed as a ...
0
votes
0answers
90 views

Sudo, nohup and spewing detached processes

I have a jar file that I need to routinely kick start from the terminal, and needs to be run as root. I'd also like to leave that terminal open for use, so I'm using this bash script: $ cat /usr/...
4
votes
4answers
5k views

Bring nohup job to foreground

Consider the following nohup execution: nohup script.sh > script.out & Is there a way to log off the terminal, reconnect, bring the process back to foreground and interact with it using the ...
1
vote
0answers
25 views

How to run a script at startup and access it later [duplicate]

I want to run a script at startup that I will need to interact with later. I could find ways to run a script at startup, but no ways to come back to it after it has run. The script never ends. I ...
2
votes
1answer
70 views

predefined input in a nohup shell script

I am trying to write a shell script that I can then nohup as it is supposed to run for hours. I am a shell novice so I'm struggling with this a lot. The script should first open some software (ACE ...
0
votes
0answers
82 views

If I use the nohup command to run a background process how do I return to it?

Is there a command to return output to a console from the running process working in background? Here is the script I use. #!/bin/bash cd /launch/server nohup java -Xms512M -Xmx1024M -XX:...
3
votes
1answer
317 views

Where can i get nohup.out, if script starts at startup

test.sh in /root/folder #!/bin/bash echo "Hello" #Sample Code Now in th same folder(/root/folder). I have created nohup_test.sh #!/bin/bash while true do sh /root/folder/test.sh sleep 1 ...
4
votes
1answer
434 views

How to run a nohup script with upstart?

I'm porting some SysV-style service scripts for HBase (a java service) to upstart. The sysv scripts don't call java directly, but instead call hbase-daemon.sh. This is a start-stop-daemon-like tool ...
0
votes
2answers
166 views

Run application nohup-like

Currently I have command pycharm to start Pycharm IDE. I use it like sudo pycharm and this launches Pycharm, but I have to keep terminal from where I've launched it open, because if I close it Pycharm ...
1
vote
1answer
73 views

Get GUI back from background application

I started an app (minecraft server) with ssh like this: nohup java -jar minecraftserver.jar & and then logged out. Now that I am next to my computer I can't access the server's terminal. How ...
2
votes
2answers
878 views

Rotate nohup output

I'm working with weblogic 10.3.5 under ubuntu 12.04. Weblogic is started using nohup ./startWebLogic.sh >Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/logs/AdminServer....
1
vote
1answer
470 views

How do I get nohup to execute [double-]quoted inner commands?

Let's say I want to run echo nested into watch nested into nohup. Starting from the bottom of the stack: echo test No problems with that. watch -n 1 'echo test' watch -n 1 "echo test" No ...
2
votes
4answers
2k views

Alternatives to nohup?

I've got an init.d script which I want it to work in the background, even when I quit from the terminal. However I've tried making it run in the background with nohup but had "no hope", becasue when I ...
1
vote
3answers
6k views

Nohup with mysql command

I need to run in background mode some mysql-query... But how can i do this with nohup? Standartly i do: musql -uroot -p use SomeDb; Select * from blablalba; But how can i do this with launching ...
1
vote
0answers
67 views

Hide Terminal and still receive input

I want to run a python script that basically uses the terminal for certain commands, but I don't want it to show the terminal. I've tried running the script as nohup file.py & - this works and I ...
3
votes
3answers
2k views

How can I start a script in a minimised Gnome Terminal?

I can start a command in a new Gnome Terminal as follows: nohup gnome-terminal --window-with-profile=Background --command ls >/dev/null 2>&1& (Based on http://askubuntu.com/a/46630/...
2
votes
2answers
813 views

How to hit Ctrl + C on a terminal so that child terminals do not be closed?

This script opens three terminals, but if I hit Ctrl + C where I run this script, all three child terminals will close too! File testChildDetach.sh #!/bin/bash echo $$ while true; do nohup xterm ...
0
votes
1answer
634 views

Run scripts in background in TTY

There are quite a few questions asking what you can do to run a shell script in the background while not running the terminal. Most have advised to use nohup or disown. This might be a stupid ...
2
votes
1answer
4k views

Is there a way to append nohup output file?

I run my script with this command nohup python a.py > /var/log/a.log 2>&1& This is okay but every time I run this command /var/log/a.log file is truncated. Is there a way to append ...
4
votes
1answer
202 views

Is there a utility for hopping in and out of a CLI?

Lets say I've got a bit of server software. I start it up and it provides an interface on stdin/stdout that I can use to enter commands during runtime. I want to be able to start it up over SSH, exit ...
3
votes
1answer
719 views

Running a graphical application through ssh and keeping it alive

I want to run a GUI application from a remote client via ssh and keep it alive (and eventually reconnect to it) after the connection is closed. As an example: I want, from my home pc, to open a ...
2
votes
4answers
490 views

How to short this command?

Every time I need to use sublime to open a project from terminal, I have to do this: nohup sublime . & Is there a way to short it?
4
votes
2answers
4k views

Background process (nohup &) suspends/resumes when user logs out/logs in

Ubuntu Server 11.10 When a normal (non-root) user starts a process with nohup (nohup java ... &), when the user disconnects from the terminal (ssh) the process stops responding. When the user ...
0
votes
2answers
229 views

the relationship between terminal and the process

Mostly, if I closed the current terminal, the sub_process are also closed. Of course, if I use suspend the process and use `bg JobID wakeup it, the process is divided with the terminal and run in ...
6
votes
4answers
3k views

Keep a program running in terminal

So I am well aware of nohup and suffixing commands with & to ensure that they go into the background. However if I run a graphical application - sometimes using neither seems to do the job. So ...
2
votes
3answers
5k views

Prevent an application from being closed on terminal exit

I have created a bash script that starts an application. Since I wanted the terminal window to close when the application is started, I used this line: firefox & 2> /dev/null; exit; It works ...
4
votes
1answer
4k views

Launch application via ssh

I am new to SSH. So now I can connect to a remote computer. I also can launch an application on a remote computer and see it's GUI on my screen. But I do not know how to launch an application without ...