Screen for Linux
I use a lot of apps from the command-line, partly because command-line stuff is the same on every system, and partly because I struggle to use a mouse for RSI reasons. Unsurprisingly, the best keyboard-navigable apps are ones that only use the keyboard in the first place! One app that I can’t live without is screen which allows me to have one ssh connection with multiple windows in it. What’s even better is that I can detach and reattach it – so if I’ve got a complicated set of screens open on a server, or even if I’m just using IRC over a dodgy connection, I can run it in screen and go back and re-attach when I need to.
I use a custom .screenrc file, which adds numbered labels so show which screens I have open, so I see something like this at the bottom of my screen (click on it to make it normal size, the thumbnail is somehow tiny):
My .screenrc file looks like this:
termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
termcapinfo xterm ti@:te@
shelltitle '$ |bash'
termcapinfo rxvt 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
termcapinfo rxvt ti@:te@
hardstatus on
hardstatus alwayslastline
hardstatus string "%{wk}%H%{Bk}|%{Mk}%?%-Lw%?%{km}[%n*%f %t]%?(%u)%?%{mk}%?%+Lw%? %=%{Bk}"
Don’t ask me what any of it does, I got it from someone else and just copy it around machines all the time! The tabs create themselves when you create a new screen (ctrl + a, c) and then you can edit the labels with ctrl + a, A. What else can you do with .screenrc? I must confess I’ve never really looked
Ah, just discovered my old one.
hardstatus alwayslastline "%{=}%{g}[ %{W}%H %{g}][%= %{w}%?%-Lw%?%{r}(%{W}%n*%f %t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][ %{B}%D %d/%m%{W} %c:%s %{g}]"
Kinda busy though, I think I may just swap for a while.
My .screenrc:
bq. hardstatus alwayslastline “%w”
shell -$SHELL
* %w just shows the tabs, without any fancy colors.
* shell -$SHELL makes sure all my profile stuff get’s loaded when I create a new window inside my screen (such as aliases, etc)
rowan: let me know how you get on with the new version.
Dynom: I kind of like the colours, makes it obvious which bit belongs to screen and which is on my actual terminal, not rocket science but a nice visual clue all the same
A while ago I posted about screen, and included my .screenrc file. I got some teasing for this, since the tabs show up pink. In fact this .screenrc file is one I stole from somewhere a few years ago and didn’t really think much about the colours. Since
I recently upgraded my kubuntu installation to 9.04 “Jaunty Jackalope”. It turns out that they have added some very cool features to screen in this version. If you don’t use screen its its worth finding out more, certainly its a tool I now can’t live wi