1

Can you help me with this problem?

I want to detach a process I start in a server. This process is an application with one window/widget (similar to gedit, kate...). I access to the server by means of ssh -X, and run the binary process in a terminal. I have used screen and tmux, but the problem is that once I run the process, the window is oppened remotely from the server to my computer. Then, I would like to let the process openned, so I close the screen/tmux, and once I exit the ssh connection, the terminal waits till I close the process window, thus killing the process in the server.

Is there any way to let the process detached even with the process X windows?

Thank you, James

2
  • use background forking. eg command & Oct 9, 2015 at 17:02
  • @AizuddinZali this will not help, because the program needs to communicate with the X server.
    – Jakuje
    Oct 9, 2015 at 17:25

2 Answers 2

0

From the question on SO:

I don't think it is possible over ssh. When you have such process, it needs to communicate with the X server (which is running on your client). You can't just take it away from the process.

If you need to run processes with X detached, you need to use X server on that remote machine. For this use case, VNC is probably better solution, since it can create virtual displays that are available even after disconnect.

2
  • Take a closer look at ssh, options, and tunnels =) calomel.org/firefox_ssh_proxy.html Also the OP does not want to run the app on the server, well X is forwarded.
    – Panther
    Oct 9, 2015 at 17:52
  • yes, after installing it, I have been able to access the server from my client. Despite the installation can be a little bit confusing, using VNC with VNC viewer (vinagre) gives good results! Thank you!!
    – james.G
    Oct 9, 2015 at 23:14
0

Use better ssh options

nohup ssh -p xxxx -i ~/.ssh/key -X -C -c blowfish -N user@server <command> &

-p port (if you are not using the default 22) -x = allows X forwarding -C -c = compression and compression protocol (IMO blowfish is fastest) -N = no console nophu - allows you to close the terminal if you wish

= command to run (gedit, etc)

Depending on what you want, you can port forward (better of apps such as firefox).

1
  • I didn't succeed to solve the problem with nohup. Same error. VNC was a good solution for it. Thank you anyway
    – james.G
    Oct 9, 2015 at 23:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .