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

learn more… | top users | synonyms

3
votes
3answers
87 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
0answers
13 views

How to invoke cvlc so that closing the video window ends the process?

I am trying to write a script to run a video using cvlc (command below). However, when I close the video, I can hear the sound still playing in the background, and I need to run killall vlc to stop ...
2
votes
2answers
313 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
46 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
31 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 ...
0
votes
0answers
13 views

nohup cancelling every x hours

I'm running a script and every x amount of hours it decides to randomly stop working. Any ideas? The script is: #!/bin/bash while true do php -q /var/www/pv/cronjobs/limiters.php sleep 10 done
4
votes
1answer
190 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 ...
2
votes
1answer
199 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 ...
1
vote
0answers
112 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
0answers
78 views

How to do input redirection with nohup?

I want to run python argument1.txt argument2.txt >logfile.log with nohup, but I get no output because it is redirecting the input to null. I want it to accept command line arguments at first and ...
3
votes
1answer
12k 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 ...
1
vote
1answer
2k 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
212 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?
3
votes
2answers
2k 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
205 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
3k 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 ...
3
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 ...
2
votes
3answers
2k 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 ...