I am running a C program in a Cent OS machine. Now, the lab is locked in this weekend, but I have access to another lab of the institute. I can access the files etc. via SSH from a Mac machine in the second lab, but I need to get access to the terminal (to see the output from the C program).


The normal solutions for this would be to have started tmux or screen and start the C program from there. You could have attached to that from your ssh ession as well (and disconnect) without disrupting the program.

As you started this in a (graphical) terminal and not the console, you could use a VNC viewer to try and look at the current screen after running:

x11vnc -noxdamage -display :0 -safer -nopw -once -xrandr

Or if this is a one off, you could try to make a screenshot of the display and download the resulting file.

Next time just start the program under tmux, that is much quicker as it doesn't have to transmit graphical data (transmitting a picture costs you thousands of words).

Not the answer you're looking for? Browse other questions tagged or ask your own question.