Is there a Linux equivalent to RDP?

In the Windows world, I can log into a server using RDS (Remote Desktop Protocol) start a batch process on the server, disconnect from my session, and then log-in again later (maybe from a different computer) and see how things are doing.

Is there a Linux equivalent? I have a Linux server that I log into using Putty, but if I start a shell script, and then disconnect, doesn’t that stop the shell script from executing? Is there a similar thing I can do where I can start a long process, disconnect, and then sign back in later to see how it’s going?

I know about cron jobs, but I guess I was thinking something I could just run ad-hoc on the command line.

Thanks.

IIRC typing ‘bg [process number]’ at the command line will detatch the process from your session so you can log off and it will continue. ‘fg [process number]’ brings it back.

So you don’t need any special program, just anything that gives you access to the command line.

bg will put a command in the background (as if you had started it with an &) but it will still be terminated if you end your session. (In fact it will prevent you from logging out the usual way by complaining about stopped jobs.) To run a command that will survive the end of the shell, you can use nohup.

Alternatively, you can use screen to create a permanent, detachable terminal to which you can reattach on subsequent logins. That’s especially useful if you have a long-running process that you want to keep an eye on over the course of several login sessions.

Sounds like screen is the program you want. You can create multiple sessions in one terminal window, switch between them, and resume sessions after disconnecting.

Excellent, and it looks like screen is already installed on my server (CentOS). Thanks for the advice everyone!!

You’ve got lots of options. Here are some:

[ul]
[li]If the program you want to run will run happily in the background without any need for X or user interaction, you can use ssh with the -f option to run it.[/li][li]Use NoMachine NX – this will allow you to run X programs and disconnect from a running session without terminating it[/li][li]Use VNC – similar to NX, but not as fast or versatile. This will reproduce an entire desktop login session; again, you can disconnect from it without terminating it.[/li][/ul]