Terminal: clear yields “terminals database is inaccessible”…

I just noticed that suddenly MacHg started producing something like the following when trying to open up a terminal from MacHg:

That not clearing of the terminal commands happens due to clear no longer working. If you do some googling it turns out the culprit seems to be an XCode 4 update for me. It handily blew away some of the files in /usr/share/terminfo/78 specifically it removed the configuration file xterm-256color. Restoring this file from time machine or another Lion install will restore the clear command and will stop some other funkiness I was seeing in the terminal.

Or if you have pacifist and the Lion Installer application you can open the specific package and extract the file:

  1. Find the Install Mac OS X Lion application and Right click it and choose Show Package Contents
  2. Inside the package contents mount the .dmg located at Install Mac OS X Lion.app/Contents/SharedSupport/InstallESD.dmg
  3. From the disk image open Mac OS X Install ESD/Packages/BaseSystemResources.pkg in pacifist
  4. In pacifist navigate to and extract the file /usr/share/terminfo/78/xterm-256color to the same place on your hard drive.

All fixed!

2 Comments »

  1. Christoph Said,

    January 7, 2012 @ 6:09 pm

    Dear Jason, I have downloaded your MacHg app. By the way you have made a great job. You have developed a nice ui and a good working functionality.

    Thanx, Christoph

  2. Raghav Said,

    October 5, 2012 @ 8:11 pm

    replacing …./usr/share/terminfo/78 ….. works fine for me… everything is restored as usual and terminal is back to it’s normal functionality…I just copied the directory from my imac to my macbook. 🙂 Thank you guys 🙂

Leave a Comment