# Developing with GNU Screen

**URL:** <https://www.ruby-forum.com/t/developing-with-gnu-screen/168889>\
**Category:** Rails\
**Created:** [May 27, 2009, 3:58am UTC](https://www.ruby-forum.com/t/developing-with-gnu-screen/168889 "2009-05-27T03:58:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hunt\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b9e5f3/32.png) [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Post date:** [May 27, 2009, 3:58am UTC](https://www.ruby-forum.com/t/developing-with-gnu-screen/168889/1 "2009-05-27T03:58:15Z")

</div>

I hear a lot say GNU Screen is better than Terminal’s tabs.

But I cannot find a real use case. I can understand that ability  
to copy and paste is useful.

But in terms of session attaching/detaching, all the sessions  
are gone if I restart my Mac.

I’m using Terminal with several tabs open (e.g., tail -f  
development.log,  
script/console, irb…)

I can use Command-Shift-] to move between tabs, but in  
GNU Screen, I need to type Control-A n. To me, the latter  
is more memorable and Mac-like.

I mostly develop locally and push the app to the server.  
I never felt the need to sharing the session in GNU Screen.

I think I’m wrong in somewhere because a lot of people prefer  
GNU Screen.

Can anybody explain the usefulness and what’s wrong in my view?

Jon Hunt

---

<div class="post-metadata">

**Author:** ![Hunt\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b9e5f3/32.png) [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Post date:** [May 27, 2009, 4:06am UTC](https://www.ruby-forum.com/t/developing-with-gnu-screen/168889/2 "2009-05-27T04:06:00Z")

</div>

Hunt J. wrote:

> I hear a lot say GNU Screen is better than Terminal’s tabs.
> 
> But I cannot find a real use case.  
> […]

Not that this is a Rails issue, but…

Screen is great if you’re using a text-only environment (for example,  
within an ssh session), or if you’re doing a lot of attaching and  
detaching (ssh again?). I agree with you that for local sessions on a  
graphical box, tabs in Terminal/iTerm/Konsole/whatever are nicer to deal  
with.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![Hunt\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b9e5f3/32.png) [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Post date:** [May 27, 2009, 6:36pm UTC](https://www.ruby-forum.com/t/developing-with-gnu-screen/168889/3 "2009-05-27T18:36:04Z")

</div>

> script/console, irb…)
> 
> Can anybody explain the usefulness and what’s wrong in my view?

I don’t think you’re doing anything wrong… screen loses a lot of  
it’s usefulness when used locally. That said, I still use it on my  
mac for a couple of reasons:

- When I started Terminal didn’t support tabs. I hate having a ton of  
windows open.
- I use iTerm and even then don’t like having a bunch of tabs open 🙂

What I like about using screen is I’ve got an alias setup to read  
a .screenrc file specifically for rails  
([http://pastefree.pjkh.com/pastes/55](http://pastefree.pjkh.com/pastes/55)  
). This sets up 8 windows within screen and names them: controllers,  
views, models, dbconsole, console, misc, javascripts, stylesheets,  
server. The last one runs ./script/server. All the others do what  
they are named. It makes jumping around quite nice. You’ll see in  
the screenrc I don’t like CTRL-A so have remapped it to CTRL-]. That  
doesn’t get in the way of vim as much. Yeah, I know there are plugins  
to vim to make it more project like, but I’ve gotten too used to this  
to change 🙂

What I find useful about running it all locally via screen is that I  
can start up a project with “railsscreen foo” and work on it. Then  
detach it, and start up “railscreen bar” and work on that for awhile.  
Then detach and reattach to foo and work on that. I hardly ever shut  
off my mac so keeping this up and open is convenient. Also I  
sometimes get a little happy with the CMD-Q combo and find I’ve quit  
iTerm. But it doesn’t matter as screen lives on.

If you do end up using screen, on a mac, with vim, and iTerm you might  
find this useful for getting 256 color support.  
[http://pjkh.com/articles/2008/07/09/osx-iterm-screen-vim-256-colors](http://pjkh.com/articles/2008/07/09/osx-iterm-screen-vim-256-colors)

-philip

---

<div class="post-metadata">

**Author:** ![Hunt\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b9e5f3/32.png) [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Post date:** [May 28, 2009, 3:55pm UTC](https://www.ruby-forum.com/t/developing-with-gnu-screen/168889/4 "2009-05-28T15:55:34Z")

</div>

Screen is valuable because you can start a session and then detach for  
any period of time and then resume.

I’ve written about screen here:

[http://www.ibm.com/developerworks/aix/library/au-gnu\_screen/](http://www.ibm.com/developerworks/aix/library/au-gnu_screen/)
