Archive for March, 2007

USB Serial Port for Mac OS X

Tuesday, March 20th, 2007

Alright, I went out and bought a USB to RS232 (serial) cable at lunch and got it up and going in Mac OS 10.4.  The hardware’s part number is PL2303.  It cost my employer about $30 from the electronics store around the corner but you can get it cheaper than that online.  The drivers that came with it suck, don’t use them.  They don’t work so there is no point in even trying to install them.  Apple happens to have a driver though.  It will require a restart but once you come back up, your device should be installed.

Using it is simple just do an ‘ls /dev/tty.*’ and you should see the device.   Mine happens to be called:

/dev/tty.PL2303-0000103D

To use it with the hardware I have at work, I need to make sure that flow control is turned off.  To start communicating with the device I use:

screen /dev/tty.PL2303-0000103D 115200 -f off

The 115200 is the baud rate at which the device is configured to communicate at.  This varies per your device.

To detach from the screen (without terminating the connection to the device) you use ‘ctrl-a’ + ‘ctrl-d’.  To close the connection and terminate the screen, you’d use ‘ctrl-a’ + ‘ctrl-\’.

The switch from XP to Mac OS X

Monday, March 19th, 2007

So I said in a previous post that I would talk abut why I switched to Mac OS X.  To be sure, it wasn’t an easy decision.  I’ve never been a big fan of Mac and a large reason for that was the price.  I also don’t like the fact that the OS hides a lot of control from the end user.  Not to mention the fact that everyone talks about how Microsoft stole their UI From Mac but they neglect to mention that Mac stole it from Xerox first.  Add that to the fact that it is becoming trendy to own a Mac and that about sums up the majority of the complains I have against Mac.

So how did I end up with this beast? My manager got a Mac a few months ago (the same laptop that I have).  I  went into his office and told him that I wanted a laptop instead of a desktop and he told me that I should get a Mac.  I wasn’t at all convinced but in all fairness, I decided I would take some time to ponder what would be the most appropriate solution for my circumstance.  I also talked to Scott about it he’s got a Mac as well).  Obviously, I decided that the Mac was the right way to go and for a variety of reasons.

First of all, I did a price comparision with a comparably equiped Lenovo laptop and found that the Macbook Pro was actually a few hundred dollars cheaper.  Since Macs and Windows machines all run on x86 based Intel processors, I could always turn it into a windows box.  Secondly, I found a website that tells you how to chroot a Gentoo environment into your Mac OS X.  I don’t use Gentoo, but I do need to compile all of my work on Linux (and sometimes in Windows too).  This means that without rebooting my machine, I can compile projects under WIN32 and Linux and not have to run a virtual machine to do all of that.  I was also hoping for a bit more stability than I had on my desktop.  It had been running for 2 years without a reinstall of Windows (bad I know), and it was giving me a BSOD 3-4 times a week.  Best of all, the Mac is light, thin, and rather sleek looking.

It has taken a bit of getting used to but there are definitely some aspects of the Mac UI that I prefer.  I also like the look and feel over that of Windows.  I really dislike that I have been unable to alt-tab between web browser windows but perhaps I am missing something? Camino doesn’t map Command-1 or anything like that to any of the windows.  IT seems I have to just use Expose (which is awesome) to find the window I want if they are all buried.

TunnelBlick 2.0 not for Intel Based Mac OS X

Friday, March 16th, 2007

There is nothing on the website indicating that it won’t work, but the tun/tap devices included with the 2.0 package don’t work on Intel based machines. I’ve emailed them to let them know. The 3.0 beta version works just fine (other than crashing on me several times).

Mac OS X + NXClient + Konsole + Asterisk == Good Times

Wednesday, March 14th, 2007

Alright, I got a new laptop at work this week.  It’s a Macbook Pro.  Traditionally, I’ve avoided Macs but there were some compelling advantages to getting one in the current situation I am in.  I’ll talk about that in a future post.

Anyway, when I switched to Mac I also decided to switch from VNCServer on my Linux box to an NXServer.  Setting up NXServer actually proved a bit easier than when I first tried to setup VNC on that box about 2 years ago.  The config file is much easier to understand.  It’s also easier to switch desktops with NXServer.  So, there are many advantages to the switch.  NXServer is also faster than VNC, even when running over the local network.

Anyway, I discovered an interesting problem that Nomachines claimed they had fixed.  What would happen is if I went into Konsole and tried to use the asterisk, it would think that I was using the shortcut to switch between konsole windows (defaults to shift-left/right arrow).  I thought perhaps there was something wrong with my key mapping (I checked using ‘xmodmap -pk’).  Everything checked out fine there.  I tried updating X11, modifying the NXServer settings and anything else I could think of.  I couldn’t figure it out.

At that point, I decided that I would try and just avoid using the asterisk in the first place.  That didn’t last long at all.  The first time I tried to “grep -r ‘i’m a loser’ *” I realized that life as I know it would cease to exist without an asterisk.

As a desparate measure, I went into the Konsole config and just disabled those shortcuts and now I am happy as can be.  If I go into Konsole and try and customize those using ‘shift-left’ it thinks I input ‘shift-+’.  When I use ‘shift-right’ it thinks I typed in ‘shift-*’.  Using ‘shift-<’ and ‘shift->’ seem to work just fine.