check out screen - that is a "text mode window manager" ... read the man page, it should be possible to start screen and immediately load your miner.
something like "screen -S mine ./miner.sh" opens a window named "mine" and starts the script "miner.sh" ... you should now be able to ssh and attach to the session with "screen -x mine"
"Ctrl-a d" detaches the session - your shell script continues to run ...
humm i'll give it a try even if my first attempt to use screen was a failure.
From now when i start my session i use gnome-terminal x -sh "my command" or something like that. no way to switch when using this?