How to compile Textual (open source IRC client) on Mac OS X

Textual is a heavily modified fork of LimeChat and looks and feels more native and light-weight than most other IRC clients for Mac OS X. Further, it doesn’t seem to have problems with window refreshing as observed with XChat Aqua/Azure (App Store link) and XChat for X11 (installed/compiled using ‘brew install xchat’).

Though Textual is also available in the App Store for 4.99 USD, I wanted to compile it from sources myself.

Here’s how to build Textual from sources (tested on Mac OS X Mountain Lion):

  1. Download and install Xcode 4 from the App Store.
  2. Download/checkout the latest Textual sources from https://github.com/Codeux/Textual
  3. Open the file Main Project (Textual).xcodeproj in Xcode.
  4. In Xcode’s Preferences -> Downloads -> Components, install the Command Line Tools.
  5. In the opened project in Xcode, disable code signing:
    For the target Textual, navigate to the tab Build Settings. In the “Code Signing” section, set “Don’t Code Sign” for “Debug” and “Release”.
  6. On the top left of the Xcode IDE window, select the scheme Textual (Standard Release) -> My Mac 64-bit
  7. Click on the “Run” button to start building the project
  8. The “Textual” app will be built in the subfolder “./Build Results/Release/” of your Textual source directory

iTerm2 – Mac OS Terminal Replacement

iTerm2, the successor of iTerm, seems to be quite a bit better then the default Mac OS X terminal app:

iTerm2 – Mac OS Terminal Replacement.

If only every Mac OS X app (i.e. Quartz) would also support copy on select, middle button paste and the other X11-like features! [1] Further, I’d love to see a terminal app that disallows pasting (cmd-v) from the keyboard-controlled clipboard completely as this is potentially a very dangerous thing.

[1] Note: It’s possible to emulate X11’s behaviour to some degree using BetterTouchTool. It’s still not the same though as X11 distinguishes between the mouse-controlled buffer and the keyboard-controlled buffer and doesn’t just “paste from the clipboard”. For reference, see:

Mac OS X Snow Leopard Server: Configuring outgoing SMTP authentication for postfix

More and more ISPs require customers to use the ISP’s own SMTP server for sending mail (to effectively block spam coming from hijacked customer workstations). Or you simply might want to send outgoing mail using your own SMTP mail server somewhere in the Internet, which  should only accept encrypted, authenticated connection requests.

If you’re lucky, you can configure postfix on your Snow Leopard Server (and later) using the supplied ‘Server Admin’ GUI tool and enter your authentication credentials and the name of your (or your ISP’s) SMTP server there. This is explained in the following Youtube video: Using Your ISPs Mail Server in Snow Leopard Server.

In my case, this wasn’t sufficient, i.e. didn’t work and hence I had to use the CLI tool instead (which appears to be buggy, see later). The configuration of outgoing SMTP authentication for postfix on Mac OS X Snow Leopard Server is analogous to my quite old post about configuring SMTP auth for postfix on Linux, only the commands slightly differ.

Here are the commands I had to use:

# serveradmin settings mail:postfix:smtp_sasl_mechanism_filter = "plain"

mail:postfix:smtp_sasl_mechanism_filter = “plain”

# serveradmin settings mail:postfix:smtp_sasl_security_options = "noanonymous"

mail:postfix:smtp_sasl_security_options = “noanonymous”

# serveradmin settings mail:postfix:smtp_use_tls = "yes"

mail:postfix:smtp_use_tls = “1”

 

The last command reveals a bug in the ‘serveradmin’ tool which will prevent postfix from working correctly as the value is set to “1” instead of “yes”! As a workaround, you need to manually set the value to “yes” in /etc/postfix/main.cf:

 

# vi /etc/postfix/main.cf

smtp_use_tls = yes

 

# vi /etc/postfix/sasl/passwd

# cat /etc/postfix/sasl/passwd

smtp.mydomain.com login:password

# postmap hash:/etc/postfix/sasl/passwd

# serveradmin stop mail

mail:state = “STOPPED”

# serveradmin start mail

mail:state = “RUNNING”

Done that, you can test the new settings by composing and sending a message using the ‘mail’ command:

# mail -s "a test message" myaddress@mydomain.com

(enter the body text and finish editing the message by entering a dot on an empty line)

Check the mail queue with

# mailq

Requeue messages that couldn’t be delivered using

# postqueue -f

[Edit 20130401: Fixed some typos, clarified the phrasing, anonymized data]

Essential Mac OS X tools: Scroll Reverser

Scroll Reverser is a free app for Mac OS X that reverses the direction of scrolling. You can use it with OS X Tiger, Leopard and Snow Leopard to make your scrolling match the ‘natural scrolling’ in Lion.

via Scroll Reverser for Mac OS X.

I use it on Mac OS X Lion in order to use natural scrolling with the trackpad of my MacBook Air and unnatural scrolling with the attached mouse.

(kudos to @romeroabelleira for the hint) 

Less is more: colordiff and more or less

In the Unix/Linux/Mac OS X world, less is more. Literally, in that ‘less‘ fully emulates ‘more‘, and figuratively, as it provides useful additional functionality like backwards scrolling. So, you really want to use ‘less’ instead of ‘more’ for paging another command’s output, e.g.

cat a_long_document.txt|less

When used to page the output of colordiff however, ‘less’ displays a mess instead of properly displaying colored output like ‘more’.
The trick is to use ‘less’ with either the -r or -R option (which both repaint the screen), i.e.

colordiff -u file_old.py file_new.py|less -r

or

colordiff -u file_old.py file_new.py|less -R

(try which one works better with your system and terminal)

Erase/wipe free space using Mac OS X

When deleting a file, most operating systems just delete the reference to this file, not its actual content. For illustration, that’s like removing a chapter from a book’s table of contents without actually removing (and shredding) the according pages in the book.

So, in order to really (securely) delete a file on a hard disk, there are basically two methods (simplified; from a technical point of view it’s both the same):

  • Overwrite the file content (i.e. its clusters) with random data
  • Delete the file as usual, empty the trash and overwrite the whole free space on the according hard disk with random data

For the second method, here’s how to do it using Mac OS X:

  1. Delete the file(s) and empty the trash
  2. Find out the device name of the according hard disk by opening a new ‘Terminal’ window and executing the “df” command. For example, for a RAID 1 disk, the path of the disk might be something like “/dev/disk2”
  3. In the opened ‘Terminal’ window, execute:
    diskutil secureErase freespace 1 /dev/disk2
    where “1” stands for “single-pass random-fill erase” and “/dev/disk2” is the disk device  (adjust this to match your disk). When prompted, enter the admin’s credentials.

Note that overwriting free space like this takes quite some time depending on the amount of free space there is and how many passes you need (e.g. use “2” for a US DoD 7-pass secure erase or “3” for a Gutmann 35-pass secure erase). For more information about diskutil and its options, see “man diskutils”.

Jingproject, screencast.com and Logitech G9 Laser Mouse SetPoint 5.0

I’ve just installed the free (as in ‘free beer’) Jingproject client by that allows to capture screenshots or screen videos and store or upload and share them (e.g. on screencast.com). It’s amazing, how easy and convenient it is to use – good job! There are clients for both Windows and Mac OS X (which will likely be important for me very soon as I intend to buy a new MacBook Pro with LED backlit display and a Penryn Core 2 Duo processor). The only thing missing is a Linux client (but we’re used to that, aren’t we? ;). Jingproject is provided by TechSmith, the creators of the well-known (and also great) SnagIt screen capture application.

Here’s an example of a screencast I just recorded (no sound, though):

Logitech G9 Laser Mouse SetPoint 5.0 German

It shows the great variety of configuration options you have for customizing your Logitech G9 Laser Mouse using SetPoint 5.0. The Logitech G9 Laser Mouse is Logitech’s latest “gamer” mouse and the best and most accurate mouse I ever used. I bought it though I’m not much of a “gamer” actually, but the form factor, features and its high quality convinced me. It’s quite a small mouse compared to other mice, but that’s intentional as you move it with your fingers rather than with your wrist or arm. This makes it a very user friendly (and particularly gamer friendly) pointing device as you’re much quicker in pointing and clicking while using less energy. The small form factor however might be a problem for you if you have really big hands (check it out in the next hardware store before you buy!).

Further, it’s a mouse with a cord, so you don’t need to worry about batteries, lag or interferences. So in short, I highly recommend the Logitech G9 Laser Mouse. For me, the only minuses are its rather high price and the fact that there is no SetPoint for Mac OS X (let’s hope Logitech will port it soon).

9 out of 10 points from me.