The Accidental Rubyist

invalid byte sequence in UTF-8

Archive for October 2011

Still unable to open multiple windows in tmux from tmux.conf

leave a comment »

Made my second attempt to move to tmux (from screen). No matter what I tried, and I checked several blogs and config files, but tmux only opens one window. All calls to neww or new-window are ignored.
However, once inside tmux if I give the "C-b c", or "tmux neww" command, then a new window is created. Even putting these commands in a shell-script does not work. The only way to get multiple windows was to create a shell script with each new-window command and call that after loading tmux.

Edit: I finally accidentally did find a shell script that does open multiple windows — seems it creates them detached and then attaches them. So, i’ve got tmux working but will make the switch a little later.

I am taking inspiration from tmux to allow users to put stuff on the rbcurse statusline using left and right. Also, i was studying tmux’s way of specifying colors for text, and may use that for the statusline and other text. This is still under consideration.

I’ve moved over to iTerm2 yesterday, Loved opening vim in 256 colors.

I am slowly moving over more ports to homebrew. Looks like the days of macports are over for me. I made a local recipe for "tal" (trailer alignment).

Written by totalrecall

October 31, 2011 at 8:38 pm

Posted in ruby

OSX Lion moved to msmtp from postfix

leave a comment »

Ever since upgrading to OSX Lion, postfix stopped working. So i finally installed msmtp which took a minute or two only. Configured sendmail to use it, and now all my scripts that use "mail" are able to send mail through msmtp.

However, mpack still does not work, and attachments look much better when sent through mpack. Unable to find anything on the net regarding configuring mpack for msmtp. uuencoding a file does not help as the file still appears as an attachment which has to be clicked. mpack does MIME encoding.

I tried using mpack to just encode the file "mpack -o out.html in.html" and then attaching the file, and sending it using mail or sendEmail, but the mail shows up as junk.

Are there any alternatives to mpack ? Any other way of MIME encoding a file and sending it using msmtp or any other client ?

Written by totalrecall

October 20, 2011 at 10:39 am

Posted in ruby

OSX Lion and postfix … broken

leave a comment »

Upgrading to Lion has broken postfix completely. Different errors being reported all over the internet but none seems to answer my issue. I rebuilt the password file, rehashed it, created the certs which had vanished, and got the earlier postfix errors to go away, but postfix still complains about gmail’s domain.

status=deferred (Host or domain name not found. Name service error for type=MX: Host not found, try again

I’ve tried all combinations, including or whatever, and they all give the same error. Strangely enough, sometimes alpine is able to send a mail using my gmail account, although mostly it talks about unable to connect. I downloaded something called sendMail (a perl program) and that works fine.
Quite embarassing that a small perl program can send mails and attachments but nothing else should be able to.

XCode requires Apple Store to download. Macports requires the full blown Xcode it seems, not the minimal 273 MB version ( But this was enough to install Homebrew, so maybe I’ll just move over to Homebrew. Hopefully nothing else will ask for Xcode.

It also seems that /etc/hosts is consulted after some delay. I’ve just now added my host name to it, and gethostbyname immediately picks it, whereas getaddrinfo takes 5-7 seconds to hit it. Now alpine and fetchmail are taking 5-7 seconds to load (earlier 30-60 seconds and then a host of errors). Fetchmail is not fetching any mails, though.

"UNIX is basically a simple OS, but you have to be a genius to understand the simplicity." ~ Dennis Ritchie


Written by totalrecall

October 15, 2011 at 4:47 pm

Posted in ruby

Upgraded to OSX Lion: /etc/hosts issues – HELP

leave a comment »

Just upgraded. Most things are going fine. Alpine takes 30-60 seconds to load. fetchmail also takes a minute and then gives the following message:

gethostbyname failed for Awareness
nodename nor servname provided, or not knownCannot find my own host in hosts database to qualify it!
Trying to continue with unqualified hostname.
DO NOT report broken Received: headers, HELO/EHLO lines or similar problems!
DO repair your /etc/hosts, DNS, NIS or LDAP instead.

My /etc/hosts file is the stock one, I’ve not added any lines to it. I don’t use php.

postfix/sendmail was also not working … checked syslog and mail logs and find errors.
fatal: open database /etc/postfix/relay_password.db: No such file or directory
warning: /usr/libexec/postfix/smtp: bad command startup

I googled and found that other people are facing problems with /etc/hosts but not the same one, so don’t know what to do. Help appreciated.

Darn, even the mouse misbehaves. Can’t scroll horizontally with the scrollwheel (okay, that was the reverse scrolling culprit) and trying to select text but it deselects automatically 😦

Written by totalrecall

October 12, 2011 at 5:48 pm

Posted in Mac OS X

rbcurse 1.4.0 released

leave a comment »

Added some more application goodies, tweaked others, done major cleanup, and even deprecated ScrollPane and SplitPane.

Introduced StatusLine, more improvements to App, fixed and redone TabbedPane which had stopped working after moving to ffi-ncurses. There’s still lots more to be done, but I’ll do some more work on demos so as to test 1.4.0, before making more changes.

I’ve also moved from Snow Leopard to OSX Lion. Looking good except for the /etc/hosts issue that is making alpine and fetchmail stall for 30 seconds before running. Can’t seem to find anything on the net that has helped.

Written by totalrecall

October 11, 2011 at 8:54 pm

Posted in ruby