MetaSkills.net

Visor Terminal on Snow Leopard

Posted On: August 18th, 2009 by kencollins

UPDATE: Hacks no longer needed, latest Visor/SIMBL is 64-bit Snow Leopard happy! This is a similar process that I had to go through back in the day when I had to hack visor terminal in Leopard. Basically the steps are pretty easy. First you just install SIMBL and the Visor.bundle as a SIMBL plugin in ~/Library/Application Support/SIMBL/Plugins/Visor.bundle. Once that is done here is the process to get this working in Snow Leopard.

First, you are going to need a copy of the Terminal.app from Leopard. I have provided a copy in the resources section below. This copy has a few key things changed in the app's Info.plist file. First I have changed the bundle identifiers and display names to VisorTerminal. This is how we are going to scope visor to use this particular app. It also allows us to set things like the LSUIElement to 1 so that this app does not show in the dock. A summary of the changes I made are below, all these are done already in the download file I provide. If you want to do these on your own copy of Leopard's Terminal.app then just right click on the app, show package contents, and edit the Info.plist file. Remember to rename the app to VisorTerminal.app.

1
2
3
4
5
6
7
8
9
10
11
12

<key>CFBundleDisplayName</key>
<string>VisorTerminal</string>
...
<key>CFBundleIdentifier</key>
<string>com.apple.VisorTerminal</string>
...
<key>CFBundleName</key>
<string>VisorTerminal</string>
...
<key>LSUIElement</key>
<string>1</string>

Now we need to edit the installed ~/Library/Application Support/SIMBL/Plugins/Visor.bundle so that it focuses on the old Leopard's terminal app (now VisorTerminal.app). Again right click on it and show the package contents, here is the complete plist below. You can see where I changed 3 places to VisorTerminal.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>CFBundleDevelopmentRegion</key>
  <string>English</string>
  <key>CFBundleExecutable</key>
  <string>Visor</string>
  <key>CFBundleIdentifier</key>
  <string>com.blacktree.visor</string>
  <key>CFBundleInfoDictionaryVersion</key>
  <string>6.0</string>
  <key>CFBundleName</key>
  <string>Visor</string>
  <key>CFBundlePackageType</key>
  <string>BNDL</string>
  <key>CFBundleSignature</key>
  <string>????</string>
  <key>CFBundleVersion</key>
  <string>Custom</string>
  <key>GoogleML</key>
  <dict>
    <key>TargetApplications</key>
    <array>
      <dict>
        <key>BundleIdentifier</key>
        <string>com.apple.VisorTerminal</string>
        <key>BundleVersionsRE</key>
        <array>
          <string>.*</string>
        </array>
        <key>ExecPattern</key>
        <string>*/VisorTerminal.app/Contents/MacOS/Terminal</string>
      </dict>
    </array>
  </dict>
  <key>NSPrincipalClass</key>
  <string>Visor</string>
  <key>SIMBLTargetApplications</key>
  <array>
    <dict>
      <key>BundleIdentifier</key>
      <string>com.apple.VisorTerminal</string>
    </dict>
  </array>
</dict>
</plist>

Now when you launch VisorTerminal, it will be hidden from the dock and be the app that Visor.bundle focuses on. I really like how this app is removed from the doc too. More so I am just stoked it is working in Snow Leopard. As a last step, yoyou can add this to your login items so that it opens up automatically. I have found that it is a bit sticky when it first launches, but a few clicks in and out on first launch fixes that. One last note, I found it is easier to edit the custom properties for this terminal window like it's default color, font size, etc, if I turn off the LSUIElement.

UPDATE: Thanks to Raptor007 for reminding us that if you want to get a head start on your terminal preferences looking the same for your VisorTerminal, you should copy ~/Library/Preferences/com.apple.Terminal.plist to ~/Library/Preferences/com.apple.VisorTerminal.plist. Thanks!

Resources

Carwin Young

  HOMEPAGE  | August 20th, 2009 at 11:54 AM
Carwin Young Amazing! Thanks so much, it's such a good idea -- I can't believe I didn't think of it. I've been dying to get my visor back.

Ken Collins

  HOMEPAGE  | August 22nd, 2009 at 09:08 AM
Ken Collins No problem! I took a good few hours out of my day last week to get this done and I'm glad others are finding it useful.

Matt

  HOMEPAGE  | August 25th, 2009 at 08:32 PM
Matt Thanks for this! I have been dying without it since WWDC.

Tanja

  HOMEPAGE  | August 28th, 2009 at 07:02 AM
Tanja There's an easier way: go to Applications -> Utilities, do a 'get info' on Terminal.app (or press ⌘-i) and check 'Open in 32-bit mode'. Start Terminal.app.

dave

  HOMEPAGE  | August 28th, 2009 at 02:44 PM
dave @tanja, this way does not work 100%. terminal is starting (incl. visor) but i see no window.... do you know something about that problem?

Ken Collins

  HOMEPAGE  | August 28th, 2009 at 03:18 PM
Ken Collins @Tanja yea... but your missing the point. This solution creates a separate app that does two important things. (1) You do not have to force your primary terminal app to be 32-bit. (2) You can have a visor terminal that seems part of the core OS by not having a dock icon, etc and can be launched in the background on login. Much much cleaner IMHO.

Stefan Jaeger

  HOMEPAGE  | August 29th, 2009 at 07:14 AM
Stefan Jaeger Thanks a lot. Works perfect for me with Snow Leopard. :-)

Tanja

  HOMEPAGE  | August 29th, 2009 at 08:28 AM
Tanja @Ken: ah, you're absolutely right! I did miss those excellent points, at first. I do like your approach more in terms of cleanliness. I especially like the missing dock icon, it's not like I don't already have 20 or so of them *cough*. Thanks for your solution!

Craig Williams

  HOMEPAGE  | August 29th, 2009 at 01:07 PM
Craig Williams @Ken - Thanks so much for posting this! Very elegant implementation. Love it!

Patrick Walsh

  HOMEPAGE  | August 29th, 2009 at 07:18 PM
Patrick Walsh This might be easier: http://aralbalkan.com/2366 In short, run Terminal in 32bit mode and Visor should work.

wasman

  HOMEPAGE  | August 30th, 2009 at 08:51 AM
wasman please, could you describe how to change font size, etc.

Chip Hayner

  HOMEPAGE  | August 30th, 2009 at 11:30 AM
Chip Hayner How do you edit the colors of the new visor terminal window? I'm used to the white-on-black that I have with my other terminal, and would like to get those back. I can't find any preferences area to change these after using the directions above.

Chip Hayner

  HOMEPAGE  | August 30th, 2009 at 11:35 AM
Chip Hayner Ahhh.... nevermind. I changed the LSUIElement value to "0" temporarily to allow me to select the app itself, made the changes, and swapped it back to "1". One thing to note -- you will have to close the app through the activity monitor (or something similar) in order to restart it after making this settings change, as there is no easy way to close the program when LSUIElement is set to 1. Great work, Ken!

Glenn Sidney

  HOMEPAGE  | August 30th, 2009 at 02:55 PM
Glenn Sidney The VisorTerminal.app you provide zipped works great, but it doesn't have the split-pane feature of the new Terminal.app, and is twice the size of the original. I tried following your instructions to create a new one, but the steps didn't work for me. I'm guessing the Terminal.app you worked with was slightly different since you made it on the 18th and not after SL was released on the 28th. Have you found a way to do this again with the latest release?

Ken Collins

  HOMEPAGE  | August 30th, 2009 at 09:02 PM
Ken Collins

@Chip The easiest way to edit preferences for the VisorTerminal is to just bring it into scope, open it and click on it, then hit Command-,. That is "Command" plus "comma". That's the default keyboard shortcut for any Mac app's preferences. I have found that I even have to edit the "columns" to match my monitor width.

@Glenn The VisorTerminal that I have provided for download is the Terminal.app from "Leopard" not "Snow Leopard". The reason for that is so that you have the 32-bit compatibility. Yea, I've heard you can make your 64-bt "Snow Leopard" terminal 32-bit too. But I've already described why I do not like that. If your keen on the split pane, etc or features only available in the Snow Leopard's Terminal.app, then you may have to find a different solution.

James Garfield

  HOMEPAGE  | August 30th, 2009 at 11:08 PM
James Garfield Hey this is a great article and thank you very much for the download and exact plist copy. Definitely saved me a bunch of time. I know visor is visor and a replacement is hard to find but the great app Dterm has now become free and works under snow leopard. The app was updated and made free for snow leopard. I am using your method so thank you!! Still Dterm is a good solution. http://www.decimus.net/dterm.php

Aaron

  HOMEPAGE  | August 31st, 2009 at 11:32 AM
Aaron Brilliant, works like a charm. Wish I'd had Visor set up like this months ago

Sergey

  HOMEPAGE  | August 31st, 2009 at 11:47 AM
Sergey *Almost* works perfectly for me. I can't get it to actually give VisorTerminal.app focus, so I can't change the preferences (like the background and fonts and such). Even if I look in the list of running programs via Force Quit, it's not there. Any ideas?

Ken Collins

  HOMEPAGE  | August 31st, 2009 at 12:34 PM
Ken Collins @Sergey I covered this already, to give VisorTerminal focus so you can hit the Command-Comma keyboard shortcut, just bring it into view like any other app (or use the toolbar icon "show visor") and hit the keyboard shortcut. Remember, you will never see VisorTerminal in your dock normal app list (my preferred implementation) but just trust the fact that if you have it in front of you, and you click on the window and hit Command-Comma, you will get the prefs window.

Leo

  HOMEPAGE  | August 31st, 2009 at 01:47 PM
Leo My Visor always crashes on since I've updated it to 1.9.1, on either Leopard and Snow Leopard. 1.5 is much more stable but on Leopard it does not look right (cannot cover the whole screen). Have you guys experiencing similar crash problem, and how you avoid it? Thanks in advance.

leo

  HOMEPAGE  | August 31st, 2009 at 01:50 PM
leo I mean "1.5 does not look correctly on Snow Leopard", not Leopard. I've tried to disable both effects and it does nothing, FYI.

Afrajag

  HOMEPAGE  | September 1st, 2009 at 05:26 AM
Afrajag I just copy the Terminal.app to VisorTerminal.app and make VisorTerminal (Get Info) to run in 32-bit mode. Now visor works fine.

Alex Hoggett

  HOMEPAGE  | September 1st, 2009 at 10:50 AM
Alex Hoggett I'm having the 1.9.1 crashing (on Leopard) and so is a friend. So you're not alone. After reading this article, pondering the behavior on Leopard, and discovering the split screen functionality, I'm thinking I'm going to give Visor a miss until they fix those things and it works with the 64 bit SL terminal natively. I just don't want to do hacks on my super fast new install just yet. Sigh.

Raptor007

  HOMEPAGE  | September 1st, 2009 at 03:54 PM
Raptor007 Worked great for me! Before doing this, you should go to ~/Library/Preferences and copy com.apple.Terminal.plist to com.apple.VisorTerminal.plist so your new VisorTerminal retains your settings.

NicZak

  HOMEPAGE  | September 1st, 2009 at 05:09 PM
NicZak Worked like a charm. @Rapotor007's comment (copy ~/Library/Preferences/com.apple.Terminal.plist to com.apple.VisorTerminal.plis) was also very helpful.

Glenn Sidney

  HOMEPAGE  | September 3rd, 2009 at 03:03 AM
Glenn Sidney I'm also getting the crashes all too frequently now. You said there was trouble getting the new version to work because it's 64bit, but my processor actually doesn't support 64bit so all my stuff is 32. I don't have the option to toggled to anything after clicking Get Info like described by others. Is there something else I can try to get my Snow Leopard terminal working with Visor?

Ken Collins

  HOMEPAGE  | September 3rd, 2009 at 07:38 AM
Ken Collins @Glenn, this article is all about getting the old "Leopard" version of terminal working as the VisorTerminal in "Snow Leopard". IE, using a 32-bit app that is known to work for SIMBL/Visor and changing it a bit for what I call usability. Did you make sure to follow all the directions and download the supplied app?

victor piscue

  HOMEPAGE  | September 4th, 2009 at 02:12 PM
victor piscue Thanks so much! I was addicted to visor on leopard

David Reese

  HOMEPAGE  | September 5th, 2009 at 10:27 PM
David Reese Thanks Ken, this is terrific. @Sergey and others who had trouble setting the fonts, colors, etc, in the preferences -- I had the same issue. Command-comma just didn't do anything, and I couldn't make VisorTerminal take focus (I had the Visor menubar icon disabled.) The trick: enable Visor, and hit Command-N to get a new terminal window. For some reason this enables Command-comma, and you can edit the font, etc for the visor window.

Yuriy Makhin

  HOMEPAGE  | September 6th, 2009 at 01:00 PM
Yuriy Makhin I'm getting odd results with this: with LSUIElement=1 the app launches but does not react to the key, and Visor icon is not present in the toolbar - as if the bundle was not loaded into the app. With LSUIElement=0 it works, but on launch it opens a usual window with Visor settings and the Visor icon in menubar is grey; to get drop-down console window I have to close this one and open another - then Visor icon in menubar highlights, and console opens on key press. I use SIMBL 0.9.1b and Visor 2.0.

Antonin Hildebrand

  HOMEPAGE  | September 7th, 2009 at 02:25 PM
Antonin Hildebrand Yuriy: You are using a brand new SIMBL beta. Injection mechanism changed and Visor bundle is injected into Terminal.app slightly after launch. That is why visor does not capture the first window being opened.

Brian Wigginton

  HOMEPAGE  | September 9th, 2009 at 10:40 PM
Brian Wigginton I saw the same thing as Yuriy... Antonin was correct. I had the beta simbl installed and it was causing problems with visor. Installing the leopard/tiger version fixed it.

Matth L

  HOMEPAGE  | September 18th, 2009 at 10:32 AM
Matth L I tried this with the current version (2.1) of SL Terminal.app, it works great. However visor won't load when I set LSUIElement to 1, and even when I don't, Terminal.app won't open Visor as the default window. Any ideas?

Ben R

  HOMEPAGE  | September 19th, 2009 at 08:34 PM
Ben R I actually found that it was easier to use a copy of Terminal.app (named VisorTerminal.app). I have it set to run in 32-bit mode, but then if there are any new features to Terminal, VisorTerminal will have them, too. Plus, I was having strange errors with the Visor with the VisorTerminal you provided. Every time I opened the visor, the last line visible would be removed and the cursor would appear in the middle of the visor window.

Michael D

  HOMEPAGE  | September 21st, 2009 at 01:09 AM
Michael D I too am seeing strange behavior with both a Leopard VisorTerminal and a Snow Leopard modified VisorTerminal. Ben R put it best: "Every time I opened the visor, the last line visible would be removed and the cursor would appear in the middle of the visor window." Any idea on how to fix this? I thought that doing what Ben did would fix the issue, but I'm still having trouble

Chelloveck

  HOMEPAGE  | September 21st, 2009 at 05:59 PM
Chelloveck Visor 2.1 was just released. It works in 64-bit mode with SIMBL 0.9.x, and it seems to correct that problem with the lines disappearing and the cursor jumping around.

Brenden

  HOMEPAGE  | September 22nd, 2009 at 01:54 PM
Brenden Running SL in 32bit and I still can't get this to work. I have downloaded the latest versions of Visor and SIMBL and copied my Terminal.app to create VisorTerminal.app. Everything works great until I go to make it autolaunch and hide from the dock, once I place the LSUIElement entry into Info.plist Visor no longer recognizes VisorTerminal.app and the program launches as a normal terminal window sans dock and menubar. I remove the LSUIElement entry and try launching it again and it still doesn't function and won't until I restart my laptop. Anyone have similar issues or ideas on how to fix it? I really would love Visor, I've become addicted to yakuake on my linux box and keep hitting the hot keys for it :-D

Ken Collins

  HOMEPAGE  | September 23rd, 2009 at 09:09 AM
Ken Collins

@Brenden UPDATE: Hacks no longer needed, latest Visor/SIMBL is 64-bit Snow Leopard happy!

Brenden

  HOMEPAGE  | September 23rd, 2009 at 11:24 AM
Brenden @Ken No hacks needed to get it to run or to get the hidden terminal? I have it running against Terminal.app just fine but it's not hidden and so I always have the app sitting in the dock.

Ken Collins

  HOMEPAGE  | September 23rd, 2009 at 02:42 PM
Ken Collins @Brenden Depends on what you want. I myself have terminal windows open outside my visor terminal. Because of that, I do not mind having the icon in my dock. However, I have confirmed that if you want to, you can open up the Terminal.app that comes with Snow Leopard and add the LSUIElement to 1 and it will still work.

Gerd

  HOMEPAGE  | September 27th, 2009 at 05:33 PM
Gerd @Brenden: I can confirm the odd behaviour of setting LSUIElement to 1 with the current versions of Visor.bundle and SIMBL in Snow Leopard. Tried it with both Leopard's Terminal as well as with SL's, no way of getting to work just yet without the icon/active menu :/

Antonin Hildebrand

  HOMEPAGE  | October 13th, 2009 at 12:50 PM
Antonin Hildebrand LSUIElement issue is explained here: http://github.com/darwin/visor/issues/closed/#issue/32 In short: it is new SIMBL 0.9.x feature and the only way how to get working hidden Terminal.app is to use SIMBL 0.8.x and LSUIElement=1 with Terminal.app forced to 32-bit mode.

Craig Williams

  HOMEPAGE  | October 17th, 2009 at 01:52 PM
Craig Williams You can use AppleScript to inject the 64 bit SIMBL into Terminal with the LSUIElement set to 1. Save this as an application and include it in your startup items. tell application "Terminal" inject SIMBL into Snow Leopard end tell

path

  HOMEPAGE  | November 9th, 2009 at 07:44 AM
path The comments here have been fantastic. I've finally got visor working on startup with the leapord terminal. But I'm still unable to make it larger than the fixed 20 rows. Anyone else figured it out?

Matts

  HOMEPAGE  | November 14th, 2009 at 01:49 PM
Matts @Craig Williams I can confirm your method works great! Thanks for posting it, really helped me out. I love having the terminal hidden from the dock, but still available through Visor! I waited so long since Snow Leopard was released, but finally! Yeay!

Matts

  HOMEPAGE  | November 14th, 2009 at 01:54 PM
Matts @path You can set the size of the window by modifying the number of visible rows of the "visor"-profile. When terminal-visor is visible, type apple+comma-sign simultaneous to bring up the preferences. Navigate to Settings, and choose the "Visor"-profile. There you can edit the rows-textbox!