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

learn more… | top users | synonyms

0
votes
0answers
14 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 ...
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
40 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
46 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 ...
3
votes
1answer
155 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 ...
1
vote
1answer
54 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
438 views

Rotate nohup output

I'm working with weblogic 10.3.5 under ubuntu 12.04. Weblogic is started using nohup ./startWebLogic.sh ...
10
votes
2answers
2k 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 ...
1
vote
1answer
296 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
827 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 ...
0
votes
2answers
116 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
0answers
61 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 ...
0
votes
1answer
538 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
2k 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 ...
4
votes
1answer
353 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 ...
3
votes
1answer
632 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 ...
11
votes
2answers
46k 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 ...
2
votes
2answers
738 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 ...
1
vote
3answers
5k 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 ...
2
votes
4answers
433 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?
0
votes
2answers
227 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
2k 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
4k 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
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 ...
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 ...
4
votes
4answers
4k 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 ...