about: twothirds | twothirds on the go (mobile) | Race Checklists

Monday, January 29, 2007

Butler Config File for Improved OS X Shortcut Keys

A bit late, but as a follow up to this post, my "butler" config file can be grabbed here. With this config, I can:
o Use my "windows/*nix" shortcut keys for firefox such as "cntr t" and "cntrl r" (new tab/reload)
o Use "cntrl c/v/z/y/x/a" for copy/paste/undo/redo/cut/select all
o Retain a "break" in terminal for "cntrl c"
o Use "shift cntrl c/v" in terminal for copy/paste (ala gnome-terminal)

Thinking about this from a different mindset, the following might work out well for me and require less remaps:
o Swap the cntrl/cmd key
o Use the butler to remap "cmd" to "cntrl" for a few specific items such as sending a "break" in a terminal

Labels: , , , ,

Thursday, January 25, 2007

iTerm != iCrash?

When I first got my mac, I tried to use iTerm for my terminal needs since it supported desirable features such as:
* Copy on Select
* Middle click paste
* Configurable copy characters
* Tabs
* etc

Whenever I copy/pasted a large buffer, the bloody program would crash. So far, after 1/2 day of usage, the thing has stayed stable. While "gterm" on a mac works, the X11/OS X integration does lack a bit. iTerm might be a keeper!

Update 2/28/2006: iTerm did crash on me the other day. But I guess 1/month is acceptable.

Labels: , , , ,

Monday, May 29, 2006

Opie (otp) on OS X/Mac

I have to use opie to login to various servers that require one time passwords (otp). The Skey DarwinPorts package provides the required client, but I could not copy/paste the opie challenge and invoke the opie client:
jmichno@MacBook:~
> otp-md5 499 ba4826
-bash: otp-md5: command not found

This is easily remedied with a simple shell script:
/usr/local/bin/otp-md5
#!/bin/sh

CMD="skey -md5 $1 $2"
$CMD

And the after...
> otp-md5 499 ba4826
Reminder - Do not use this program while logged
in via telnet or rlogin.
Enter secret password:
SOCK AMES BANE BORN DIN COOK

Labels: , , ,

Saturday, May 27, 2006

Fixing the Mac "Terminal" with gnone-terminal

Update: iTerm may not suck anymore


While I have been happy with my recent switch to OS X for "home" usage, the mac--er OS X has not been as friendly for "work" usage. Since I spend most of my day hooked up to various machines through a command prompt, a quality "terminal" application is of the utmost importance. Some of the good qualities I look for in a terminal app are:
  • Auto copy mouse selection to the clipboard
  • Auto paste clipboard with middle mouse click
  • Tabs
  • Large scroll buffer
  • Focus follows mouse
  • Configure text selection characters (Hint: -A-Za-z0-9,./?%&#:_)
  • Reliability (aka does not crash)

Terminal.app
The "out of the box" option with OS X was pretty unusable. I immediately tossed the default OS X terminal since it could not copy the selection to the clipboard or paste with the middle mouse button.

xterm
After installing X11, the default "xterm" was a viable options, but it is a bit too barebones. Mainly, it lacks a proper scrollback, tabs are lacking and it is difficult to configure.

iCrashTerm
iTerm supported everything I wanted, but it would crash whenever I pasted a larger buffer. Since a crash causes data loss, iTerm was tossed.

gnome-terminal
Taking a look at the Darwin Ports project, I found what I needed--gnome-terminal. Since this has been my default terminal on solaris and linux for the past few years, this would be a welcome addition to the mac. After installing Darwin Ports, I was happily hacking away in my terminal of choice on Linux and Solaris.

gnome-terminal on the dock
I was able to configure gnome-terminal in the X11 menu, but I wanted to launch gnone-terminal from the dock. Below are the steps to get it done.

Assumptions:
  • X11 is installed
  • gnome-terminal is installed

The steps:
  1. Launch AppleScript (Applications > AppleScript > Script Editor)
  2. Create the following script:

    do shell script "/usr/bin/open-x11 /opt/local/bin/gnome-terminal > /dev/null 2> 1 & "

  3. Save the script somewhere using "application" as the file format
  4. 2xClick the new app and gnome-terminal will launch. If X11 has not been launched yet, this should launch X.

With a little luck, you might have gterm running from an icon....


To get gnome-terminal on the doc, drag the new AppleScript icon to the dock. Clicking the icon should launch a new instance of gnome-terminal. Of course, I do recommend using an alternative icon for your new app. The default OS X terminal app is what I use.



Extra Credit
Chances are you will want to launch gnome-terminal with a command line argument or two. The default "open-x11" does not gracefully handle arguments, but using this open-x11 script, you can pass arguments. I recommend dumping it to /usr/local/bin instead of overwriting the default script. With this modified open-x11, you can now update the AppleScript to something like the following:

do shell script "/usr/local/bin/open-x11 /opt/local/bin/gnome-terminal --show-menubar --geometry=80x50 > /dev/null 2> 1 & "

Labels: , , , , ,

Monday, May 22, 2006

Red Pill (Matrix) Screen Saver -- MAC OS X Intel (x86)

I just got a MAC. Yeah? Damn the "open apple" key and its non-Cntrl c/v copy/paste functionality. Anyway, one of the first things I looked for was a "matrix" screensaver. I found "Red Pill", but it was not Intel friendly. Taking some advice from the forum, I grabbed the source and compiled an intel version. Not too difficult, but I have no idea how to properly package the app--I just dumped everything into a zip file. So, with no warranty of any kind, and kudos to the original auther, the Intel Red Pill bits are here.

Update: I recompiled with the "universal" option. This might work on Power PC as well, but since I do not have a PPC box YMMV.

Labels: , ,