M-x Kelsin

A Hacking Blog

iPhone is bought

We bought iPhones. We did it only and surprising the process was easy. I selected that we wanted to upgrade both of our phones and chose 8gig Refurbished Black iPhones for both Caitlin and I and it helped us through it. We kept our family plan exactly the same but added the $30/month data plan for each of us. The phones were only $100 each though and came without any scratches. We were very please and probably lucky in this regard.

Now I have the issue of how to sync up everything. So far I’ve only talked Mail, Contacts and Calendar. My main mail accounts (I’m thinking of reworking this) are GMail (which ALL of my personal accounts forward to) and my Berklee account. Luckily both allow IMAP access. Unfortunately this means no pushing so I only get mail every 15 minutes on the phone if I’m not running the mail app. I have a feeling I’m going to be backgrounding the mail app a lot (more on this in a minute).

For Contacts and Calendar I’m using Google. We were using Google Calendar anyway as our main calendar so this just makes sense. Google’s sync for iphone uses an exchange server so contacts / calendar data IS pushed to the phone and the syncs are pretty instant. Google lays out the instructions very clearly which is nice cause this process DOES CLEAR OUT your contacts on the phone.

My process:

  1. Put iPhone sim card in old phone.
  2. Save contacts onto sim card in old phone.
  3. Put sim card back in iPhone.
  4. Use contacts settings menu to load contacts from sim card.
  5. While doing this clean up Google Contacts so everyone I care about is in the "My Contacts" group.
  6. Export (for backup) Google Contacts.
  7. Using iTunes sync contacts with Windows Address Book just for a backup.
  8. Sync.
  9. Switch contact sync to Google Contacts.
  10. Sync.
  11. Turn off contact syncing in iTunes.
  12. Clean up "My Contacts" list again. I had lots of contacts with only emails (from Gmail) and a duplicate named contact with phone numbers (from phone).
  13. Export (for backup) Google Contacts.
  14. Follow Google instructions on enabling their exchange server in iPhone.
  15. Go to http://m.google.com/sync on you iPhone to choose which calendars to sync.

The syncing to Google Contacts from iTunes is very important cause ALL of your phone contacts get removed when you add the exchange server to your iPhone. Please read the Google sync site a lot before doing any of this. Their docs are very clear on the limitations and the process to help you not lose data. It’s worth your time especially if you have a lot of contacts.

My plan with email is probably to run my own imap server so all my mail ends up somewhere that I own. I’m sick of Dreamhost webmail going down and my mail being stored on Google’s servers. Though I feel it’s safe, I just want one place that I own to be my main mail server. We should see if I do this soon.

My plan is to also run my own LDAP server for contacts. If I do this I’m probably going to have to role my own syncing app between my LDAP server and the Google Calendar API. I’m lazy but I do hope I get to this at some point.

There is a Thunderbird extension that syncs your Google Contacts into your Thunderbird database. I’m going to be using that. I also need to figure out how to get Mutt to use Google Contacts. I think the best way will be to use the LDAP GCalDaemon tool but I will have to do more research about this later. Since I largely use GMail and iPhone for personal mail this won’t matter that much. Berklee has a LDAP server I have Mutt using for work contacts.

On a side note, the phone is already jailbroken using the windows version of QuickPwn. It was really easy and works great. I can ssh in, and have installed a number of 3rd party apps to help complete my app collection. The best so far is the backgrounder app. This allows me to keep different apps open in the background and definitely one of the best features of jailbreaking so far!

Emacs as a fast $EDITOR

I’ve been using vim as my $EDITOR setting for quite some time, and recently started using emacsclient. Two things about this setup bothered me. First I would have to switch to my emacs workspace in Xmonad in order to reach the editor, and when working on svn or git commits my cursor would be where it was last time I edited a commit. Not wanting to change the way Xmonad keeps emacs windows appearing on the same workspace or the way emacs saves my cursor position I found a way around both problems.

Slow Firefox - High Xorg CPU usage - Debian and Ubuntu - SOLVED

So the past few days I’ve noticed Firefox (Iceweasel actually) being incredibly slow. I don’t know if it’s more than it was on Ubuntu or not, but it was slow. I’ve also always felt that gtk apps were a bit slow on this machine but never really bothered to understand why.

Install Xmonad on Debian Lenny

I want to install a newer version of Xmonad than packaged with Debian Lenny on my Lenny systems in the cleanest way possible. I tried a bunch of things today and it turned out that the solution is really simple.

It turns out that the Haskell cabal-install program solved all of my problems:

  1. It can install it's packages into my home directory. Binaries in ~/.cabal/bin and all libraries needed.
  2. These libraries take precedence over system installed ghc libraries.
  3. No non-stable packages are needed at all.
  4. Installs the most recent versions of xmonad, xmonad-contrib and xmobar and any libraries they need.
  5. Cabal-install itself builds with the version of ghc in Debian Lenny (this wasn't the case in previous releases and Ubuntu Hardy).

This procedure installs the newest released version of Xmonad in my home directory along with all required libraries, xmonad-contrib and xmobar. My steps I used are as follows (Please check versions for cabal-install so that the wget command is correct):

# First install ghc and the dev libraries that cabal-install needs

sudo aptitude install ghc libghc6-network-dev libghc6-mtl-dev zlib1g-dev



# Goto a temp dir and download cabal

cd ~/tmp

wget http://hackage.haskell.org/packages/archive/cabal-install/0.6.2/cabal-install-0.6.2.tar.gz

tar -xzvf cabal-install-0.6.2.tar.gz

cd cabal-install-0.6.2



# Now run the bootstrap.sh script (as your user)

./bootstrap.sh



# Make sure to add ~/.cabal/bin to your patch

# I do this via this next line in my .bashrc

export PATH="$HOME/.cabal/bin:$PATH"



# Some needed libraries to build Xmonad and Xmobar

sudo aptitude install libx11-dev libxft-dev



# Now we install xmonad!

cabal update

cabal install xmonad

cabal install xmonad-contrib

cabal install xmobar

I’m extremely happy with this setup. All of my non-packaged files are in my home directory safely away from my Debian Stable system. This is due to cabal install being able to seemlessly install into ~/.cabal which really does work great. I’m very excited for this tool to be included in ghc soon!

Switching Linux's Again: Ubuntu -> Debian

Just switched my company laptop from Ubuntu to Debian. I switch Linux’s a lot. Right now I’m doing it cause I ran into some nasty bug’s on Ubuntu. I’m sure I will be installing Ubuntu on lots of machines soon anyway, especially in April.

My work laptop's desktop as of 02-22-2009The first bug came when I first installed Intrepid. I ran into the bug where the kernel fills my logs with errors from the wireless driver. Having your root partition fill up does some weird things. Around this point I installed Hardy again to get on a more stable platform. I recently tried to update to Intrepid again (this bug was solved in a recent kernel) but ran into other issues. Just small ones.

Then I read the Lenny release announcement on Valentines day, so that set this in motion. I can’t read release notes without wanting to install something.

My work laptop is a Lenovo (IBM) Thinkpad X61s. I love this machine for work and the install went smoothly. I havn’t had trouble with installing Linux in a long time. I did hit this bug with ncmpc, but I normally disable ipv6 anyway. A quick edit of /etc/modprobe.d/aliases and /etc/hosts to comment out ipv6 stuff and I’m all set. I really want to get into Debian packaging so I might use Lenny as a reason to do so. I’ve already told myself that I will stick to stable software as much as possible for work, and use my home Desktop and Laptop to experiment with different software.

Drcox Emacs 02-22-2009I’m using my compiled xmonad from my home directory at the moment (Had cabal install everything in .cabal on Ubuntu) but when I get ghc running again I will post about it.

After that I’ve installed the sid version of emacs (along with ttf-bitstream-vera, haskell-mode, ruby-elisp and emacs-goodies-el) so that I can use emacs 23 (I rely on a lot of features from 23, the least of which is nice fonts!). I’ve also installed mpd (with mpc, sonata and ncmpc, my xmonad config relies on this). My XMonad key bindings for audio keys work again (they didn’t on Intrepid, just simple windows manager keybindings that run mpc).

The one other thing I had to do to get my system back was make sure option “XkbOptions” “ctrl:nocaps” was in the keyboard driver section of the xorg.conf file. Can’t live with my Caps-Lock key not being another Left-Control!