Michel Pollet
Software since... wow.

GLterm 1.2 - Accelerated Terminal Emulator

Software
Folder Compare
Ericsson Melody Maker

ClanLord Tune Helper

GLterm

Friend's Cabal Essentials
Alessandro Levi Montalcini
USB Overdrive
Icon Archiver
DragAnyWindow


Marc Moini
Startup Doubler
Smart Scroll


Florent Pillet
PowerGlot


My Deceased Oldies
Vamp
Zilot
LinuxDisks
DieBlo
Black Beauty
MyTerm

Please, do not ask me where you can find my oldies, I no longer provide them.

"Innovative like Quartz Extremez, just 6 months earlier!"
GLterm © 2001-2002 Michel Pollet

GLterm is a replacement for the Terminal application which ships with MacOS X. It's made to be faster, and to support more common terminal features. It supports full ANSI colors, all vt102 protocol, all DEC function keys, and a selection of useful xterm sequences.

The Big Thing is that GLterm uses X11 .bdf fonts and renders them using..OpenGL. So it's very fast... as long as you have a working 3D accelerator. It should work as intended on B&W G3 and up for desktops and on White iBook and up for laptops: ie a machine whose 3D accelerator is handled properly in OSX. To this date (April 2002) Rage II, II+, Pro are not accelerated.

My extensive tests on:

  • iMac DV/400 (ATI Rage 128/8Mb)
  • 2*G4@450 (nVidia GeForce 2 MX/64Mb)
  • 2*G4@1Ghz (nVidia GeForce 4 MX/64Mb)

Show that it's incredibly fast and very stable on all of these machines.

Be sure to read the "Q&A" section, and the release notes!

Example screenshot


GLterm is a $10 shareware. Registered users will get:

  • Support. Requests for support from non-registered users will have a near-zero priority.
  • Early notifications and updates. Registered users get the pre-releases, and do help setting the lists of new features, and their priorities.
  • My gratitude.

Please register to help me continue making quality programming for you!

You can register using
Kagi Secure Online Payment
Kagi Secure Online Registration

You can also register using

Download

Download GLterm 1.2

Q&A

Q:

Using OpenGL to draw text? Are you nuts?

A:

Well, OpenGL uses the graphic hardware in your mac, graphic hardware that is both vastly oversized for and vastly underused by most users, most of the time. So instead of letting it become obsolete peacefully, why not use it for something useful? Beside, it keeps your computer room warm when in use, isn't that an argument?
New! Apparently it was not such a silly idea after all, since Apple has had that wonderful innovation to speedup Laggua, into Jaguar, the next major version of MacOS X.

Q:

Why not use normal Mac fonts?

A:

Mac fonts don't have all the nifty graphic characters that a terminal emulator needs. Beside, drawing text with those fonts is slow. And the last thing I want in a terminal is antialiasing or kerning. I want a fast terminal, not one that looks like a word processor. Lastly, the "Fixed" fonts GLterm uses comes with a very small size that can't be matched by Mac fonts.

Q:

Can I make GLterm window transparent, too?

A:

No, GLterm view is made by OpenGL, outside of Quartz drawing context. So there is no transparency support. This is also why your window appears blank when collapsed in the dock.

Q:

Why aren't the page up and down key working?

A:

They work, they are normal keys used by many terminal programs. If you want to scroll in the saved lines, use shift page up/down.

Q:

How can I change the terminal window title from zsh?

A:

GLterm allows a terminal program to change the title of the window, here is what I use in my own .zshrc:

    export PS1="[%n@%m %U%~%u]%# "
    case $TERM in
    xterm*)
    precmd () {print -Pn "\e]0;%m: %~\a"}
    ;;
    esac

Q:

How can I change the terminal window title from bash?

A:

Add something like this to your .bashrc: [Thanks Michael!]

case "$TERM_PROGRAM" in
Apple_Terminal)
GLterm)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
export PS1='\!\$ '
;;
*)
export PS1='\u@\h:\W:\!\$ '
;;
esac

Q:

How can I change the terminal window title from csh/tcsh etc?

A:

You don't. You shouldn't use csh anyway. Have a look at Csh Programming Considered Harmful ... then use zsh.

Q:

Why doesn't 'ls' shows files with colors like in linux?

A:

You need GNU fileutils compiled for it to work, AFAIK, BSD(OSX) 'ls' doesn't support colors. Refers yourself to GNU repositories to get color-ls

Q:

Why a "Refresh Rate" Preference?

A:

The Refresh rate is the frequency at which GLterm checks to see if there's anything new to draw in the terminal. Smaller values will mean less frequent updates but potentially faster overall performance; bigger values will mean more updates, hence more drawing, so potentially slower performance, overall. The "Refresh Rate" Preference defaults to 15 frames per seconds. Note that it doesn't mean 15 frames will be drawn per second it just means the display is checked for dirty bits at that rate.

Q:

Why is the text all fuzzy?

A:

"Pixels" in the OpenGL coordinate system have a very remote correspondence to screen pixels. In fact, attempting to have a 1:1 ratio between OpenGL coordinates and screen pixels for texture boundaries (believe it or not, GLterm is drawing textured rectangles for each letter it draws) proves to be very hard. For example, ATI and nVidia have shown completely different results.

As an attempt to help control the problem, you can try using a few key combinations to nudge the 'convergence' of the texture on the screen. Note you might not get a perfect result, it depends on the card you have. A good idea is to use Pixie (in /Developer/Applications) to have a closer look. The goal when fixing the convergence is to have black pixels without 'shadows'.

  • Control-Arrow keys will nudge the texture by .005 pixels in the direction of the arrow. Pressing shift with control will nudge by .05 pixels instead - ten times as much.
  • Control-Home key will save your settings in the preferences.

Update: The fuzzyness problem has vanished for nVidia cards with MacOSX 10.1.2. It still exists on ATI cards.

Q:

I'm using two screens, and GLterm appears all garbled on the second screen, why?

A:

It' s a known 'feature' of MacOS X, I have no idea when they'll fix that.

Q:

Why is it slow on my super <insert a mac model here> ?

A:

Sorry, GLterm is proven to be fast on a number of graphic cards, provided that the card has a driver supporting hardware acceleration for 3D on MacOS X.

Q:

My <insert the same mac model here> HAS a graphic accelerator, it's written on the box!

A:

Having a graphic accelerator is not enough, you also need it to be supported by MacOS X. Not only in 2D (aqua drawing etc) but also in 3D.

Q:

When I try to type a <accented letter> it doesn't work, why ?

A:

GLterm handles Latin-1 translation for keyboard input and rendering. This allows for most european languages. GLterm doesn't support Unicode nor non-roman scripts.

Q:

Why can't I find your email address?

A:

Because it is hidden in plain sight . I am a freelance developer, you can contact me directly if you have any need of quality development on OSX.

Warranty

GLterm doesn't come with any warranty whatsoever. Use it at your own risk. I cannot be held responsible for anything happening to you as a result of installing, possessing and/or using this software.
All trademarks mentioned are the property of their respective owners.
I know that to be trendy and all I should type this section in capital letters, but I hate my capslock key and typing all that whilst holding the shift key would tire my poor left pinky.

Acknowledgments

  • Paul Williams, for hosting an online version of the original vt102 manual, and letting me use his version of the original vt100 picture.
  • Seb/Sor, for being a nice dwarf and being so much better at photoshopping.
  • Whoever made the Fixed font family in X11/Free86.
  • Richard Buckle for CLiveResizeAttachment.
  • Melchior for debugging the read-me.

Revision History

Version 1.2

Changes:

  • Added 8 bits clean support, Latin-1 translation keyboard input and rendering (ANSI & ISO8855-1 fonts supported)
    • BitchX, pine, mutt and other strictly ANSI applications now render perfectly.
  • Added Printing, you can print:
    • A screen copy, in full colors with all the gizmos currently visible. This one can be slow to print, but it's exactly what's on the screen, with cursor, double sized text etc included.
    • A text selection (screen/selected/all) with text style (bold & underline) and/or text face color (no back color). This one doesn't even have the graphic characters, but it's really fast (uses Courier font) and reasonably accurate.
  • Added a preference checkbox to prevent use of 'fat' boldface (it was reported it looks ugly with some fonts)
  • Changed the way the 'bold' colors are rendered.
  • Added a preference to use 'copy-on-select' to emulate X11 clipboard behavior.
    • You will need to configure your multi-button mouse yourself to have Paste linked to the middle button.
  • Renamed the font to differentiate those with DEC or ANSI graphic characters.
    • GLterm 1.1 will fail to run once you have launched GLterm 1.2. Delete GLterm preferences if you need to restore 1.1.
  • No longer create the first terminal window strictly in top left corner of screen.
  • Fixed the infamous 'copy-the-wrong-line' bug.
  • Fixed the nearly-as-infamous 'resize' bug.
  • Fixed the color inversion problem (especially using pine/mutt)
  • Fixed a problem that was preventing 'less' to work on some platforms.
  • Fixed a problem with some obscure xterm-specific sequences (set icon title etc)
  • Fixed the problem that was preventing large fonts to display properly (I added 2 fonts to the distribution)

Version 1.1

Changes:

  • Added support for "Reopening" GLterm. Clicking it's icon in the dock can automaticaly open a terminal if none are already open.
  • You can select not to open a new terminal when GLterm is launched.
  • Added support for rectangular selections: Option-click & drag.
  • Rewrote the keyboard handling. All the keyboard equivalents are described into Key.txt and Keymap.txt (in GLterm.app package). You can change and add your own keyboard macros there if needed.
  • Changed the default ALT key equivalent to be Option-Command instead of just Option. This solves MOST problems for non-US keyboard layouts.
  • The keys numlock, =, / and * on the keypad now send the PF1-PF4 sequences.
  • To toggle numlock, use command-numlock.
  • Added FAT Bold text.
  • Fixed a potential crash when Copying text (thanks to Sam Maloney!)
  • Fixed a problem that could leave 'zombie' shells after GLterm had quitted.
  • Keyboard input now autoscrolls back to bottom of the buffer.
  • Cursor no longer diseapear when quitting vi in debian or redhat.
  • Tweaked the preference dialog self-documentation.

Version 1.01

Interface Changes:

  • Fixed a potential crash when creating several windows.
  • Added support for DEC function keys and keypad key sequences.
  • Added support for custom colors for foreground/background/cursor/selection.
  • Added support for audible terminal beeps.
  • Added support for 'login' shells; executes your .profile or equivalent.
  • Added support for automatic closing of windows when shell exits.
  • Added support for using a shell different from your default shell.
  • Redesigned the preference window using a list instead of tabs.
  • Added a 'Reset terminal' menu item.
  • Added a preference to have a confirmation before quitting.
  • Added a preference to allow the use of a text mouse cursor if your card supports it (nVidia).

Version 1.0b5

Interface Changes:

  • Fixed a potential crash when displaying lots of text.
  • Delete key sends ^?. Control-delete sends ^H
  • Control-space works again (for emacs mark).
  • Fixed the window title problem.
  • Select-All + Copy works reliably now.
  • Sometime creating a new shell created a black window instead, it's now fixed.

Emulation Changes:

  • Re-did most of the cursor positioning sequences. Reported to fix all the remaining problems.

Known Issues:

  • Arrow keys do not seem to work in OSX's vi, while they work everywhere else. I blame Apple on that one...
  • The ANSI colors do not match exactly how xterm handles them, especialy on black background.

Version 1.0b4

  • Internal.

Version 1.0b3

Interface Changes:

  • Removed all the extra output that was ending up in the Console.
  • No need to type return to get the shell prompt when opening a new terminal.
  • Option key acts as the "Meta" key like in xterm.

Emulation Changes:

  • Fixed a cursor positioning problem involving scrolling region. [thanks James!]

Known Issues:

  • Preference window is drawn weirdly at first, change tab to refresh it.
  • Window titles can get confused on new windows.
  • Sometime, a new window's shell is not responding; close it and open another one.
  • Rarely, I had crashes when receiving lots of text to draw at once. I will be able to fix that one once Metrowerks and Apple get us a working debugger. Right now gdb crashes on that one. Bloody helpful.
  • Arrow keys do not seem to work in OSX's vi, while they work everywhere else. I blame Apple on that one...

Version 1.0b2

Interface Changes:

  • Added a text-cursor for selection, then removed it. It garbles the display on ATI Rage 128.
  • Fixed the default preferences when launching the first time.
  • Properly closes the sessions when quitting a shell.
  • Checks for a valid shell at startup, gives a (maybe) helpful message if a problem is detected.
  • Returns a proper error message if the OpenGL context couldn't be created.
  • Made the "previous/next terminal" work.

Emulation Changes:

  • None. Appears to work properly

Version 1.0b1

Interface Changes:

  • Input/Output/Display/Scrollback subthreads now lock themselves to prevent races.
  • Child processes are properly killed when windows are closed (doh).
  • Added a Preferences dialog, kinda.
  • Cursor becomes outlined when window is not frontmost.
  • Can select text in the window. Double and triple clicks selections are supported.
  • Can copy/paste text.
  • Added Services menu support.
  • Fixed the stupid scrollbar.
  • Can drag & drop text and files from the finder to the terminal window.
  • Smart enough to replace pathnames starting with the user's home directory with "~"

Emulation Changes:

  • Added support for ISO-6429 (ECMA-48) sequences (save the lock region one) This fixes remaining known emulation problem.
  • Support for show/hide cursor sequences.
  • Support for xterm alternate text page (most full screen programs use that).
  • Text/Mouse support like xterm. (click the menus in Midnight Commander, vim etc!)
  • Support for app/generic arrow keys.
  • Dirties/redraw lines only if visible text is to be drawn.

Version 1.0d2

  • Fixed the line wrapping problem.
  • Added scrollback. Use shift with page-up, page-down, arrow-up, arrow-down, end, and home to move around in the buffer from the keyboard. (like Linux & X11)
  • All movement keys and F1-F11 send xterm sequences (which emacs, mc, etc. understand)
  • Fixed the crash when quitting.
  • Nice Seb/Sor nicely nicerified the nice icon.
  • The scrollbar thumb works, but not the arrows or page region, no idea why.
  • Added the carbon event for key repeat.
  • Added the carbon event to enable/disable menus. (not perfect)
  • Performances are better. Draw & flush only changed lines. Uses 0.0% (!) most of the time running 'top'
  • Added a few preferences (no HI, xml only) for default refresh rate, max number of lines in scrollback etc.
  • Added 'Control' menu with scrolling keys, clear buffer etc.
  • Added a 'standard' Carbon windows menu.
  • Added Next/Previous terminal commands like in Konsole (shift right/left)
  • Added margins around terminal.
  • Make all windows share the same GL resources (fonts textures & display lists) to have optimum memory footprint.
  • Added special key combo to work on the convergence problems: Control-arrows move the 'virtual origin' of pixels. The goal is to have black pixels completely black without a 'gray shadow'. If you find a good setting, hit control-home to save it in the preference file.
  • There's some preliminary support for the service menu in the app, which does absolutely nothing for now :-)

Version 1.0d1

  • The terminal works, but there's no mouse support nor scrollback.
  • The arrow keys don't work.
  • The black-on-white default mode is antialiased, which makes text a bit hard to read. You can edit GLterm default preference (com.buserror.GLterm.plist) and reverse the colors if you want.
  • It sometime crashes when you quit.
  • It might also crash doing other things :->
  • The vt102 passes 'vttest' but I know there is a small issue with line wrapping.
  • Supports double-width and double-height characters (even xterm doesn't!)
  • Supports the 'set window title' sequence. The sequence is ESC-]-0;<some text>CONTROL-G aka "\033]0;some text\007". You can incorporate the sequence in your shell prompt.