RE: [SLE] commands through SSH - nohup
![](https://seccdn.libravatar.org/avatar/b5c5e490baabe2a25a6a11b61eabc1ec.jpg?s=120&d=mm&r=g)
Here's what I tried: xhost +10.XXX.XXX.XXX (the REMOTE ip address that I am ssh'ing to) ssh -l <username> -X 10.XXX.XXX.XXX enter password for username export DISPLAY=XXX.XXX.XXX.XXX:0 cd ./bin/crushftp /usr/bin/nohup java -jar CrushFTP.jar then I see: "appending output to nohup.out" on the REMOTE pc, I see the app (CrushFTP) start up. NOW ... on my local machine, I close Konsole but the remote app dies with it. Am I using 'nohup' wrong? (I also tried the following): java -jar CrushFTP.jar -display remotehost:0 but I got the same result (i.e. when I closed Konsole on the local machine, the remote app died with it) :( --------------------------- Eric Carbone -----Original Message----- From: Christopher Mahmood [mailto:ckm@suse.com] Sent: Tuesday, March 26, 2002 1:53 PM To: suse-linux-e@suse.com Subject: Re: [SLE] commands through SSH - SOLVED (kinda) * Eric Carbone (ERIC@morprinting.com) [020326 10:43]:
I have one small problem though ... if I close the Konsole window on my local machine, I see my app shuts down on my REMOTE machine!
Then start it with nohup if you don't want it to die when it's parent does or use a shell (like zsh) that supports nohup automatically.
... boy ... if someone can just port over pcAnywhere to linux, that would make me very happy ... ;-p
Use vnc if X doesn't do what you need. -- -ckm -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com
![](https://seccdn.libravatar.org/avatar/5a1ff996671b3bbad16acab9a1723a8b.jpg?s=120&d=mm&r=g)
Eric Carbone wrote:
Here's what I tried:
xhost +10.XXX.XXX.XXX (the REMOTE ip address that I am ssh'ing to)
ssh -l <username> -X 10.XXX.XXX.XXX enter password for username export DISPLAY=XXX.XXX.XXX.XXX:0 cd ./bin/crushftp /usr/bin/nohup java -jar CrushFTP.jar
Try /usr/bin/nohup java -jar CrushFTP.jar & Mark
![](https://seccdn.libravatar.org/avatar/d70f8a8240c69007852b9d1bf27e170b.jpg?s=120&d=mm&r=g)
* Mark Hounschell (markh@compro.net) [020326 13:22]:
cd ./bin/crushftp /usr/bin/nohup java -jar CrushFTP.jar
Try /usr/bin/nohup java -jar CrushFTP.jar &
No, that won't work. Sorry, I didn't realize he was trying to run an X client...You need to do ssh -X -f remotehost '/path/to/java -jar CrushFTP.jar' -f forces ssh to background itself before exec'ing the command and will keep the connection alive when the shell it was spawned from dies. -- -ckm
![](https://seccdn.libravatar.org/avatar/4970a690d65f0be504bf05853e742d20.jpg?s=120&d=mm&r=g)
Christopher Mahmood wrote:
* Mark Hounschell (markh@compro.net) [020326 13:22]:
cd ./bin/crushftp /usr/bin/nohup java -jar CrushFTP.jar
Try /usr/bin/nohup java -jar CrushFTP.jar &
No, that won't work. Sorry, I didn't realize he was trying to run an X client...You need to do ssh -X -f remotehost '/path/to/java -jar CrushFTP.jar' -f forces ssh to background itself before exec'ing the command and will keep the connection alive when the shell it was spawned from dies.
But he is actually loging on the the remote box acording to his command sequence:
ssh -l <username> -X 10.XXX.XXX.XXX enter password for username export DISPLAY=XXX.XXX.XXX.XXX:0 cd ./bin/crushftp /usr/bin/nohup java -jar CrushFTP.jar
In which case /usr/bin/nohup java -jar CrushFTP.jar & should work right??? Although you are correct that ssh -X -f remotehost '/path/to/java -jar CrushFTP.jar' should also work from the local machine so he won't have to log in to the remote. -- Mark Hounschell dmarkh@cfl.rr.com
![](https://seccdn.libravatar.org/avatar/d70f8a8240c69007852b9d1bf27e170b.jpg?s=120&d=mm&r=g)
* Mark Hounschell (dmarkh@cfl.rr.com) [020326 14:20]:
But he is actually loging on the the remote box acording to his command sequence:
ssh -l <username> -X 10.XXX.XXX.XXX enter password for username export DISPLAY=XXX.XXX.XXX.XXX:0 cd ./bin/crushftp /usr/bin/nohup java -jar CrushFTP.jar
That's not going to work since the ftp thingy is an X client.
In which case /usr/bin/nohup java -jar CrushFTP.jar & should work right???
No, the Xserver will kill the connection to the X client which will cause the client to die.
ssh -X -f remotehost '/path/to/java -jar CrushFTP.jar'
should also work from the local machine so he won't have to log in to the remote.
He's still logging in, he's just not requesting a login shell. -- -ckm
participants (4)
-
Christopher Mahmood
-
Eric Carbone
-
Mark Hounschell
-
Mark Hounschell