How do i keep apps running after closing the terminal window?
For instance, i ssh -Y into a remote box, launched a program and expected it to run after i closed the terminal window. Well, it won’t.
How do i do that? How to run apps in the background, via ssh?
For instance, PrivateInternetAcces has this functionality. I can manage the box withe the vpn remote. Start a connection etc…
Thanks for the help!
So I use ssh -X not -Y, don’t know if that makes a difference. I also have Yakuake, so I can run the command, then hide my Yakuake window and the program will run, even with terminal ‘closed’. I just tried inside of Konsole and when I close SSH section it also closes the GUI app I had launched as well, which I believe is the expected behavior of SSH.
I think Noah has covered an app on his show that covered a situation like this, where you can run the program and close the SSH connection, but the program will continue to run. I don’t think it was this, but maybe look at Mosh, which appears to have the functionality you’re looking for. AlternativeTo also has Eternal Terminal listed as something similar to Mosh.
tmux can do that, as well as providing a tiling window feature.
There is also screen, another terminal multiplexer.
The X server is running through the SSH connection. If you close the terminal, the SSH connection closes and there’s no pathway for the X server to deliver the GUI through. Definitely going to check out Mosh and tmux myself for this though!
I mentioned this before but for those people following this thread
-X enables X11 security extension restrictions by default.
-Y runs X11 forwarding in “trusted” mode, disabling the security extension restrictions.
Thank you all for the help! Tmux, Screen, Mosh and Yakuake will be tried and tested in the coming days.
If you end a command with
& it’ll run it in the background and if you use
disown afterward it’ll detach that process from your terminal session so you can close the terminal window and keep using the app.
xcalc & # (Or your ssh command)
# Close terminal, xcalc remains open