Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm using ssh to log in to a server and I run programs like bittorrent on it to save my own resources.
I'd like to leave the program up and running while turning off my home box.
The first problem I ran into is:
How to switch the X display the application is using so that the application starts/stops showing up on my screen while it's running? I will need it to "resume" viewing the app.
Another problem:
How to prevent it from stopping after I close the ssh session (daemonize it)? I guess it has to be disconnected from the sshd together with the shell, but how to do it?
An easy way to do this is to run a vncserver on your server. Mine starts one when it boots, so it's always sitting there, waiting for me to connect.
You could ssh to the server and start a vncserver: user@localhost$ ssh remoteserver user@remoteserver$ vncserver :1 -geometry 1024x768 -depth 24
then logout of the server, and reconnect with vnc: user@localhost$ vncviewer remoteserver:1
Your remote desktop appears in a window on your local machine.
Start any programs you like
You can close this vncserver window at any time, and the connection will be lost, but the server will continue to run your remote desktop and programs.
To reconnect at any time just user@localhost$ vncviewer remoteserver:1
as before.
If the server is running all the time, you'll only need to restart the vncserver if it is rebooted.
I've been considering running a vnc server, but I think it's not flexible enough and takes up too much bandwidth, especially when I'm goin to log in from outside the internal network.
It's going to be a multi-user service, so I want this to be as easy to manage and lightweight as possible, so vnc is out of competition.
Thanks, anyway.
I've just read the screen docs and this would look like the solution, but it doesn't work quite well with X apps - it closes my testing application together with the ssh connection.
I suppose I have to open a temporary X session on the server to "park" those running processes until I reattach them.
I know that altering DISPLAY is possible in screen, but I don't know how to do it. I don't know how to get the X display number (gdm running constantly on the server) or how to create another X display...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.