Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
When I run this command it freezes terminal so I can't send new commands to the server. Is there a way to send this command and then send new commands while this command continues.
deluge-web
Best Regards
Method 1: You can suffix the command with an & to make the program run in the background.
deluge-web &
Method 2: You can also background a process after you've started like this:
deluge
Ctrl + Z
bg
The Ctrl + Z sends a SIGSTOP signal to the process making the process suspend and you get control over the terminal. The bg command would make the last suspended process go into background and start executing it again.
Method 3: An option specific to your command from this page, which says:
You can also use the --fork option to have the deluge-web process run
in the background and again, you may want to use an InitScript.
deluge-web --fork
So it should automatically make the deluge-web program start in the background and you should be getting control of your terminal.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to write a simple script that will check to see if a program is open every hour using the whenever gem. If that application is not open I want it to start up the application. I can't find out how to launch an application with Ruby. Pardon the ignorance. I am new.
Run an application in various ways:
Kernel#system runs my_program in a subshell and returns true if the subshell exits successfully, false otherwise.
system("my_program")
Kernel#exec replaces the currently executing process with my_program.
exec("my_program")
%x() will run the program and return the output.
%x(my_program)
You can use the Kernal#system method like this:
system 'open -n /Applications/Appname.app'
With #system you'll get a return value of true or false, enabling you to do some flow control incase there's an issue (i.e. maybe the app doesn't exist in the system)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I'm often in the situation that I run a linux task but then I have to leave the computer or shutdown the notebook, and the task I ran from putty has not finished yet.
Is there a way of I can quit putty and leave the process running 'til it's finished?
I know I can use screen etc, but now I already started the command w/o screen.
(please don't bother too much I didnt directly ask on superuser, serverfault or unix SO.)
Press Ctrl-Z to put the command to background.
Run bg to run it from being suspended.
Then run disown to disown the process from the parent.
It actually also depends on how your command works. Some command exits when it loses its terminal. If that's the case, you can really only just run it with screen or use nohup command </dev/null >/dev/null 2>&1 &.
One way to run it with screen could be screen -dm command.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I play some older games that require ending the process explorer.exe. This is fine, except I want a way to start explorer.exe back up when I am done playing. I thought to use this:
^#e::
Run, explorer.exe
Return
The weird thing is that when I run this, it opens one window in the "Libraries". However, when I open the task manager and Start new process --> explorer.exe, then everything comes back (desktop, taskbar, all of it).
Why does autohotkey's run, explorer.exe not do the same thing? How can I make it start explorer.exe so I get everything back, like I did with the task manager?
UPDATE: The solution is to put %windir%\explorer.exe. This is my final code, and it works properly.
#e::
Run, %windir%\explorer.exe
Return
Did you try running it using start.exe? i.e. Run, start explorer.exe
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Does anyone know how to set a scheduled task to run in background using Windows Task Scheduler?
There doesn't seem to be any option to do this.
As noted by Mattias Nordqvist in the comments below, you can also select the radio button option "Run whether user is logged on or not". When saving the task, you will be prompted once for the user password. bambams noted that this wouldn't grant System permissions to the process, and also seems to hide the command window.
It's not an obvious solution, but to make a Scheduled Task run in the background, change the User running the task to "SYSTEM", and nothing will appear on your screen.
Assuming the application you are attempting to run in the background is CLI based, you can try calling the scheduled jobs using Hidden Start
Also see: http://www.howtogeek.com/howto/windows/hide-flashing-command-line-and-batch-file-windows-on-startup/
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
How can I open a symlink without the terminal window popping up? Moreover, when I close the terminal window, the application quits as well. I tried using
nohup open symlink1
without any results. I have made a symlink to the iTunes executable (the one inside the contents package, NOT the iTunes.app) which I want to be able to open by double clicking the link, but without the terminal window popping up.
Why not just make an HFS+ alias? Command-option-drag the iTunes app anywhere you want on your machine, and it should work like you want it to.
I just figured out a solution:
Make an executable (intended as the link)
#!/bin/bash
cd /Applications/iTunes.app/Contents/MacOS
nohup ./iTunesX &
exit
and change under preferences in Terminal
When the shell quits: close if the shell exited cleanly
Change iTunesX and the cd path to any desired target.