Slashdot Mirror


Decent Terminal Emulation on Mac OS X?

Drawoc Suomynona asks: "After settling into Mac OS X over the last four months, I'm generally impressed. However, due to the sort of development work I do, I spend a great deal of my time in a terminal. Unfortunately for me, decent terminal emulation seems to be one area where Mac OS X is quite lacking. What's your answer to the state of terminal emulation on the Mac?" Drawoc summarizes the currently available offerings and their drawbacks, below.

"Take, for instance, the following options:

  • Apple's Terminal is slow (though performance has been better in 10.2.x), doesn't support xterm mousing, and for some reason refuses to send PgUp/PgDn through to any applications running in the terminal (gah!). Sure, transparency is nice, and with some hacking about (when was the last time you had to force "stty erase"?) you can get decent enough color xterm emulation, but... what's with the lack of PgUp/PgDn?
  • The open source iTerm is slightly better, but, it's awfully slow (it grabs as much as 30% of the CPU per terminal instance... now imagine a full-screen vim session at 1600x1200... it's utterly unusable). It also neglects to support xterm mouse reporting.
  • The closed source GLTerm ($10) is probably the best of the three "native" options, from a certain perspective. It manages to sidestep the CPU usage/UI responsiveness issue by rendering the entire terminal using OpenGL (yes, the characters are actually textures on GL primatives). It supports xterm mouse reporting. However, font choices are limited, it works only on supported video cards, and it has a very annoying "fuzzy text bug" if you set your terminal to the wrong size.
  • Finally, you've got xterm :) But, it means you need to run X11 (either XDarwin or Apple's X11) and it doesn't integrate as nicely into the OS X workflow..."
So, is there a secret terminal port from NeXTSTEP lurking in the pocket of some intrepid young hacker, who is, as I write this, poised to lead us to salvation?"

30 of 115 comments (clear)

  1. Gnome term? by m0rph3us0 · · Score: 3, Interesting

    Does Gnome term compile with the OS X version of GTK? I was thinking that might be your best route.

    1. Re:Gnome term? by andfarm · · Score: 2, Informative

      It does -- in fact, the Fink project has it precompiled for you -- but it's really quite slow and suffers from the same workflow diconnectedness as xterm. Stick to xterm if you like OS X X11.

      --

      TANSTAAFI: There Ain't No Such Thing As A Free iPod.

    2. Re:Gnome term? by michaelggreer · · Score: 2, Informative

      I think he meant the native Aqua gtk. I am pretty sure nothing gnome is compiling with this yet. Also, it is only gtk 1.2.x, so no tabbed gnome terminal.

  2. Fink by qlippoth · · Score: 5, Informative

    Fink has a handful of terminals ported to OSX. You've still got the issue of having to run X11 though.

    http://fink.sourceforge.net/pdb/section.php/x11

    --
    Mmmm, -funroll-loops
  3. you could use Rxvt by goombah99 · · Score: 4, Informative
    fink install rxvt

    rxvt 2.7.8-2 VT102 emulator for X11
    rxvt-ml 2.7.8-2 VT102 emulator for X11 with multi-language support
    this too is X windows unfortunately.

    personally I actually like apples terminal with one scarey exception: it runs in a single process so if the terminal app crashes you lose ALL of your terminals! yikes.

    --
    Some drink at the fountain of knowledge. Others just gargle.
    1. Re:you could use Rxvt by bobthemonkey13 · · Score: 5, Informative

      Look into a UNIX utility called screen. I'm not sure if it's included in OS X, but I use it all the time on Debian and OpenBSD and it's wonderful. You can detatch and reattach sessions, so if Terminal crashes, you can just open another one and run screen -R to pick up where you were. It also supports creating multiple windows in the same terminal, and a whole ton of other features that I haven't even tried yet. I've even used it to start a process locally, then ssh in later and automagiclly take control of the process. It should compile without problems on OS X; there might even be binaries available.

    2. Re:you could use Rxvt by Mikey-San · · Score: 3, Informative

      As a matter of fact, Apple included screen in 10.2

      I'd say it was an awesome move. I SSH into a box at work to attach to a screened BitchX session. Can't beat it with a stick.

      --
      Mikey-San
      Karma: +Eleventy billion (mostly affected by watching Celebrity Jeopardy)
  4. iTerm by brianosaurus · · Score: 3, Informative

    I've been using iTerm lately. The version in CVS seems to fix some of the performance issues, though occasionally it gets screwed up and starts using as much CPU as possible. When I notice that, I start closing remote shells until it gives up the CPU. Its pretty annoying.

    Unfortunately, the tabbed interface iTerm has is so compelling to me that I can't switch back to the stock Terminal.app.

    I agree with the original poster about X. Running Gnome term or any other X-based terminals isn't great, since X doesn't quite integrate seamlessly with Aqua.

    For now I'm sticking with iTerm and checking CVS every so often. Maybe I'll even think about looking at the code.

    --
    blog
    1. Re:iTerm by TomorrowPlusX · · Score: 3, Interesting

      You know, when I came over to mac from linux/kde about 6 months ago, the first thing I did was install iTerm so I could have the tabbed terminal interface I had under KDE.

      But, then I discovered cmd-~ will switch between windows; particularly at the time I was debugging an IPC implementation I was working on and as such needed to view two terminal outputs simultaneously -- I discovered that apple's stock terminal works great, for me at least.

      Frankly, who needs tabs when you can command-tilde to switch, and command-m to minimize unneeded windows?

      I would never have believed it but the mac snobs are right: tabs actually *are* a stopgap for an inadequate window management paradigm.

      Learn to love cmd-~

      --

      lorem ipsum, dolor sit amet
  5. rxvt by eibhear · · Score: 3, Informative

    As a heavy user of cygwin on a slow desktop PC, I was delighted to see that someone had ported rxvt to that environment. It gives quite a lot of the top-class features of xterm, and little of the unnecessary bells, whistles and complete brass, woodwind and percussion sections that come with xterm.
    However, for your purposes, it can also be installed and used without X11, as in the case of the cygwin environment.
    What's best about rxvt is it supports what you describe as "xterm mousing". This feature alone is why I always stuck with xterm until I discovered rxvt. That rxvt has it is why I won't use any other terminal emulator for a long time into the future.

    Mind you, none of this is useful if rxvt hasn't been ported to Mac OS X, but it certainly is worth checking to see if it is.

    Ãibhear

  6. NEXTSTEP terminal.app by macmurph · · Score: 4, Interesting

    Here's a screen shot of the NEXTSTEP Terminal.app

    http://www.levenez.com/NeXTSTEP/Terminal.jpg

  7. Eterm by Cecil · · Score: 3, Informative

    If you're a fan of Eterm (I am), you have two options available to you:



    • Pick up an older, but pre-ported copy (this one is version 8.10.0)
    • Grab the CVS sources for the latest Eterm and build it yourself. This is not easy, but it is possible.


    Having the latest Eterm running under Apple's X11 is nice, though I still haven't been able to get it to link with imlib2 successfully (note: I am incompetent at this stuff, YMMV) The only porting really required is to change the typedef for socklen_t to int, or include the appropriate header file (sys/socket.h?). Either works.

    Good luck.
  8. ANSI color customization by Onan · · Score: 3, Interesting

    iTerm has given me the one thing that I've found seriously lacking in Terminal.app: configuration of what colors are used to display ANSI "colors". No more screaming yellow or illegible dark blue for me, thanks.

    Unfortunately, iTerm does have a few limitations and bugs:

    - while the xterm-experienced will like PgUp/PgDown going straight through, and using shift for local scrolling, I'd really like to see this togglable.

    - no Home/End functionality, with our without shift.

    - no local Find.

    - it "helpfully" doesn't include whitespace when copying out of its windows. Actually, I did want that linefeed, thanks.

    - periodically decides it wants to just sit and suck all my cpu until I kill it.

    - font settings don't stick between launches.

    I've also found that Terminal.app's split-window function is surprisingly useful. And unique, in my experience.

    1. Re:ANSI color customization by megabulk3000 · · Score: 3, Informative

      click the little widget on the right hand side, just above the scrollbar and below the title bar, and voila.

  9. PuTTY by zsazsa · · Score: 4, Informative

    Everyone's favorite SSH/Telnet program for Windows, PuTTY, is a possible future option. A MacOS port is forthcoming. If you're brave, preliminary support is in CVS right now.

    (In other Non-MacOS-related PuTTY news, you can also get a PuTTY-based xterm replacement for X if you fancy its emulation better: pterm).

  10. Java Options by kwerle · · Score: 2, Informative

    I've been happy with Apple's Terminal.app since 10.2 (export TERM=xterm-color :-)

    I know that there are a few Java terminal emulators (check sf.net). I alwyas liked mindterm for ssh connectivity. I know they closed source, but there's a fork out there somewhere from the last open version.

    Anyway, could you post a followup to your article when you settle on something - just a comment would be nice.

    I wonder if the editors would let you update the article...

  11. TERM environment variable make a difference by payam · · Score: 5, Interesting

    The TERM environment settings for Terminal.app make a big difference in its behaviour. Normally with Terminal it's useful to have the TERM environment variable be 'xterm-color'. This will enable lots of interesting things, amongst them ANSI color. But, as described, this has it's drawbacks, including the fact that scrollback doesn't work as expected. Sometimes it's useful to launch any apps that need that functionality prefixed with 'TERM=vt100'. I run screen this way( 'TERM=vt100 screen') and it works much better as a result.

    Alas, this doesn't affect speed but it does enable improved functionality.

    1. Re:TERM environment variable make a difference by nosferatu-man · · Score: 2, Informative

      Terminal.app also emulates DEC's tres-cool dtterm. Just set your TERM variable to dtterm. It's a superset of xterm-color functionality, as near as I can tell. As it happens, you can make Terminal.app do all kinds of wacky things with escapes. For instance:

      alias dock='echo -n "[2t"'
      alias lower='echo -n "[6t"'
      alias raise 'echo -n "[5t"'

      Here're some more.

      'jfb

      --
      To spur "enterprise Linux," Big Bang, the distributed two-phase commit.
    2. Re:TERM environment variable make a difference by Anarchitect · · Score: 2, Informative
      dont forget 'Apple_Terminal'
      • /usr/share/terminfo/41/Apple_Terminal
      works great. Arrows and _PROPER_ vim syntax coloring.

      And if you were to use teh One True Edit0r
      :colorscheme elflord r0kkz tha HiZZ0uSE!

      sorry about that. It just sorta came out.
      --
      QA implies some kind of quality to begin with.
  12. Terminal crashes and character encoding by gidds · · Score: 4, Informative
    if the terminal app crashes you lose ALL of your terminals!

    I hit this one a LOT. It's a real annoyance.

    Why, I hear you ask? Well... [fx: takes a deep breath] Most of my text files use the Windows Latin-1 encoding (the same as the default ISO Latin-1, but with curly quotes and other useful control characters in an otherwise-unused range). No problem for the Terminal: you can set the character encoding in Window Settings->Display.

    I use the vi editor; you can tell it the character encoding through the $LC_CTYPE environment variable. The only problem is that although Mac OS X comes with several character encodings (in /usr/share/locale), it doesn't come with one for Windows Latin-1 (aka CP1252). So I've created my own (with the mklocale(1) command. I've even submitted the result to Apple in the hope that they might include it with future versions... though I haven't heard anything back.)

    So, with both Terminal and vi set to use the right encoding, it all works: I can see all the extended characters, and edit them in the usual way. EXCEPT that there's some bug or incompatibility lurking there. Every so often, when I'm editing in vi, the Terminal will suddenly quit for no reason. It happens often enough to be fairly sure that it's related to the extended characters and to vi - it's never happened when editing plain 7-bit ASCII files, nor when using extended characters in the shell. I suspect it may be related to extended characters appearing at the extreme right or bottom of the screen, and/or to the VTwhatever formatting codes (which I don't really understand).

    Since I do a lot of editing, I find Terminal crashes several times a day... MOST annoying. So, if anyone has any idea what might be causing these crashes, or can shed any light on this stuff, please let me know!

    (BTW, since Mac OS X 10.2.5, vi has stopped taking any notice of $LC_CTYPE! I'm not certain why, or what's changed, but it's easy to download the vi source from Apple's Darwin page, and recompile with a one-line fix I found to restore that functionality. I've raised a bug report with Apple about this, but - again - haven't heard anything yet.)

    --

    Ceterum censeo subscriptionem esse delendam.

    1. Re:Terminal crashes and character encoding by zojas · · Score: 3, Informative
      quit using vi :)

      seriously, you can get vim (Vi IMproved) from fink, darwinports, or gentoo soon (console & X11 version).

      even better, you can get gvim with a carbon gui at

      this site

      I primarily use the carbon gvim now in OS X. I only use my fink version when I log in remotely to my OS X machine. Once you try vim, you will shudder at the memory of using 'vanilla' vi

    2. Re:Terminal crashes and character encoding by gidds · · Score: 2, Informative
      True. And it does look nice. But remember that the Apple-supplied vi is really nvi, which already has multiple undo levels* and several other nice features. Buffer splitting isn't something I'd use much; whereas supporting CP1252 is a showstopper for me.

      I guess what I really want is an editor with the power and flexibility of vi (navigation, REs, editing commands), but with full support for character encodings and proportional fonts. (Yes, for code too. I know, I know, I can hear the screams of "Heresy!" already. But if the code is formatted properly, I find it easier to read in a proportional font, just like English text. I'm surprised no-one else seems to find monospaced text ugly and awkward.)

      (* It took me a while to work this out: you hit 'u' for the first undo, but then further 'u's just toggle redo/undo. So what you do is hit 'u' once, and then use '.' (redo) to undo further levels. Probably done that way for backwards compatibility, I guess.)

      --

      Ceterum censeo subscriptionem esse delendam.

    3. Re:Terminal crashes and character encoding by gidds · · Score: 2, Informative
      how can you 'undo an undo'?

      Use undo ('u') again! 'u' toggles between undoing and redoing, and '.' continues undoing or redoing, whatever you last did. It sort of makes sense.

      --

      Ceterum censeo subscriptionem esse delendam.

  13. MacSSH by gozar · · Score: 2, Informative

    I went looking, and the only one that would do decent vt100 emulation was the OS 9 app MacSSH.

    We need it to access a VMS machine, and no other term emulators would work as flawlessly as MacSSH. I would LOVE to be proven wrong, if someone can point me to a term app that allows me to use the function keys and the keypad correctly!

    --
    What, me worry?
  14. GNUStep? by ActiveSX · · Score: 2, Interesting

    Perhaps you could hack the GNUStep Terminal.app to compile with Cocoa. For those who don't know, GNUStep is a GPL'd implementation of the OpenStep Specification of yore.

  15. Re:color xterm emulation is easy in Terminal.app by nosferatu-man · · Score: 2, Interesting

    You're better off with TERM set to dtterm, if'n your application supports it. Just in case you thought progress in computing had been made in the last 25 years, along comes a happy reminder like terminal handling to show you the error of your ways.

    *scowl*

    'jfb

    --
    To spur "enterprise Linux," Big Bang, the distributed two-phase commit.
  16. My two solutions: DataComet and Eterm....[+] by ewwhite · · Score: 5, Informative
    I run Fink and XDarwin on my Powerbook. My company produces a terminal/character-based ERP application for the produce industry. It runs on hardware terminals and also has a home-brewed PC client (with a Linux backend). We use a SCO-ANSI emulation with a few custom termdefs.

    There are very few clients (puTTY and Powerterm) on the PC that can handle our product. The Mac situation is much worse. It took me a few months to find an appropriate solution for working with our clients from my Mac. The winners are:

    Eterm -free- Get version 0.9 through Fink. It's much faster than Apple's terminal application and is much more configurable.
    Here's a shot of a typical Eterm on my machine

    DataComet -not free- but worth it. This program is similar to Powerterm on the PC side. It can handle just about any emulation you throw at it. Powerterm and DataComet both include their own font suites which allow for full PC-ANSI emulation, for example. Very comprehensive package. It integrates with the built-in shell and even handles my company's software.
    Here's a screenshot of DataComet on my system

    Here's a random screenshot.

    Note: There is a Powerterm for Mac OSX, but it's fairly expensive, and DataComet performs as well. Hit me up if you have any questions....

    --
    Edmund White
    http://flickr.com/ewwhite
  17. vttest - VT100 (and more) test suite by Creosote · · Score: 2, Informative
    Sorry to be late with this, but anyone interested in evaluating terminal emulator programs should know about the classic "vttest" program, as updated by Thomas Dickey. It compiles under OS X without any tweaking.

    Of the programs mentioned in this thread that I've looked at, there's not a one that passes all the relevant tests. And Terminal.app does better than most at some of them, like the character set test and Xterm window-modify features.

    My favorite terminal emulation program, PC-compatible only alas, is VanDyke's SecureCRT, which does well on vttest and comes with a nice terminal font set. (Luckily I'm at a school with a site license; regular individual price is $99.)

  18. export TERM=ansi by exp(pi*sqrt(163)) · · Score: 2, Informative

    Full screen vim with PgUp/PgDn now work fine for me.

    --
    Doesn't it make you feel good to know that our freedoms are protected by politicans, lawyers and journalists.