Results 1 to 3 of 3
I have this weird program: dns2tcpc (creates a dns tunnel). I would like it to run at startup. However, I found that the program doesn't work when backgrounded!
EX: dns2tcpc ...
- 10-10-2010 #1Just Joined!
- Join Date
- Oct 2010
- Posts
- 3
Trick program into running in foreground?
I have this weird program: dns2tcpc (creates a dns tunnel). I would like it to run at startup. However, I found that the program doesn't work when backgrounded!
EX: dns2tcpc -z dns.domain.com -l 8888 208.67.222.222
Works, and I can use SSH to port 8888.
However, if I try to background it, like: dns2tcpc -z dns.domain.com -l 8888 208.67.222.222 &
Then trying to connect to SSH won't get any response
Now, I know this is a bug in dns2tcpc, and I really don't feel like compiling it or anything (I may have to), so is there any way to "trick" an application into thinking it's running in the foreground (like typing the command from the terminal window)? (Bonus if no addition installation is required)
- 10-10-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,952
Use the shell command fg [jobspec] where the optional jobspec argument would be the particular job that you want to run in the foreground. Normally you would not need a jobspec argument unless you started other background processes after the one you want to move to the foreground.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 10-10-2010 #3Just Joined!
- Join Date
- Oct 2010
- Posts
- 3
Thanks for the reply. Unfortunately, it didn't work. Nevertheless, I found the solution. It's pretty hacky, but it works:
It creates a screen session, launches the command, and detaches.Code:screen -dmS dnstunnel dns2tcpc -f /etc/dns2tcpc.conf 208.67.222.222


Reply With Quote
