|
|
/ Hathaway Weblog / Gentoo Tip: Screen |
Gentoo's emerge command is powerful, but it stops if you attempt to run it in the background, and it often takes a long time. Particularly when compiling stuff on a server, it's useful to have emerge work in the background even after I log out.
Solution: the screen utility. Before starting a long compile, I type screen, which opens a shell session that I can detach and reattach later. I start emerge, wait a little to make sure I typed the command correctly, then push Ctrl-A followed by D. At that point, I can log out while the screen session continues in the background. A few hours later, I type screen -x to reattach the session, often using a different computer than the one I used to start the emerge.
In general, the screen utility makes it easier to perform long running automated tasks, like compiling software, downloading large files, or converting media files.
Comments
Does nohup not work with emerge?
