The easy way is to use the most underutilized program in *nix.
Screen, it lets you have a terminal you can detach and reattach later to the same terminal or another. You could for instance open it on a console and then detach it and logout. Come back 2 hours later via ssh and reattach to the screen session and pick up like you never logged off.
I wrote a blog post about Screen
-- the basic use of it and what not. I'm not going to c&p (because all the html would need reformatted and I don't wanna spend 30m reformatting it.)
It will be part of the standard distribution you use... just emerge it and you should be good to go. Just remember you have to be the same user who started the screen session to reattach it.