08 Nov 2003
p. This is one for the UNIX geeks:
p. Many moons ago, when I had a PC laptop running Linux, my shell of choice was bash. Well, to be truthful, it would probably be more accurate to say that the default shell was bash, and I never figured out how to change it. I became reasonably proficient with it and customized it with aliases, scripts, a custom prompt and so on. When I moved to MacOSX, I used tcsh, as that was the default shell at the time, but I missed the features of bash. I did have it installed, but again, I could never be bothered to switch the default login shell. Well, I finally got around to sorting it out.
p. It was a bit more complicated than I had anticipated, because I had forgotten most of what I knew about bash. In particular, I forgot that bash can't take command line variables in aliases--you have to put them into functions instead. That took a long time, and a lot of searching of the "macosxhints forum":http://forums.macosxhints.com/ to sort out. But now that I've got it working, I remember why I liked bash so much--even more so now that I've learned to use vim, and can exploit the joys of set -o vi properly.
p. In the course of trying to find information about bash, I discovered a great little command line utility called ["screen":http://www.math.fu-berlin.de/~guckes/screen/]. It allows you to set up multiple virtual terminals within one terminal window, switch between them easily (leaving the processes running in each), and even copy and paste text between them. It works rather nicely, and means that you don't need to have scores of terminal windows littering your desktop. I found that I already had it installed, which means either that I installed it unknowingly, or that it's installed by default in Panther.
2
I've been using screen for some time (err, blimey, 10+ years), but I haven't read the manual anytime recently - there are a couple of neat new features I didn't know about (tell you when a screen goes 'quiet'). My original reason for using it was to be able to leave my session running while I moved from one lab to another, and to save problems with dodgy network connections to the big unix system. Cut & Paste on a VT100 was really very handy too!
Nowadays I just use it to keep my downloads running on remote systems
It's definitely one of the first things I install on a new BSD system though, along with a current versionof perl.
by Howard Jones @ 08/11/2003 9:11 pm • Permalink •
3
Kai: Yes, I've tried iTerm, and quite like it. But the overheads seem to be a fair bit lower with screen, and it does what I want. iTerm crashed on me a few times.
Georg and Howard: Heh, I know I'm a bit late to the party with screen! I don't know why I haven't come across it before. Still, it's a great tool, and has no end of useful facilities, now that I've RTFM properly.
1
My tool of choice to cut down on Terminal windows is iTerm, an open-source replacement for Apple's Terminal program. It does tabs a la Safari etc. Homepage: http://iterm.sourceforge.net/----- Screen seems to be installed with Jaguar, too. It's quite funny to read about "discoveries" of screen, because screen was what we used in days before linux virtual consoles or graphic user interaces with lots of xterms were available
Screen is like an old friend you forget about but are reminded everytime when they pop up to lend a hand with some task.
by Georg Bauer @ 08/11/2003 7:11 pm • Permalink •