Migrating from Linux to OS X

I’ve been promising to write up my initial reaction to using OS X. This article along with the other one I wrote called Why my Desktop is OS X sum up my initial reaction to OS X. Read on for more.


Introduction

Having recently migrated from Linux to OS X I’ve been spending time getting used to my new environment. Since OS X has a UNIX core I’ve spent the majority of my time making it work and act like my old Debian workstation. So far this hasn’t involved much except changing my shell and few other key things.

Stock UNIX applications

OS X comes with virtually everything you can think of. The long list includes Apache, PERL, vi, ssh, and even PEAR (though PHP is not installed by default). Even the applications such as tr, sort, uniq, cat, and tar are all there. The cool thing that Apple did was use established open source software for such things as web sharing (in reality Apache). There were a few missing applications, like vim, but for the most part OS X is a pretty robust UNIX.


Directory structure

One thing you should take note of is OS X’s file directory structure. There isn’t a /home, instead there is a /User. ~/public_html is replaced with ~/Sites. There are a few other things to note. Aqua doesn’t list directories such as /etc and /usr so if you want to move around in those directories you’ll need to drop down to the shell. Those are the few eccentricities that I’ve found thus far. For the most part everything is where it usually is and if it’s not there it’s easy to find.


XDarwin

Yes you can run your native X applications in OS X. Just download the package, install it, and click on the X in your dock. It basically runs in the background allowing you to run X applications managed by Aqua. A friend of mine has successfully installed all sorts of applications using fink, including the GIMP. You can get XDarwin at http://www.xdarwin.org.


Fink

A must have for any former Linux user is fink (http://fink.sourceforge.net). It works much like apt-get from Debian. Once you have that installed you just need to type “fink install [package]” to have it install one of the many packages in the fink package tree. I’ve installed mysql, rsync, and bash using this program without any problems. You’ll notice that when you first try to install something via fink you need to choose how X is installed. If you have already installed XDarwin just choose the first option saying you have already installed an X environment.


Changing your default shell

The first thing most Linux users will notice is that OS X, being a part of the BSD family, uses tcsh as its standard shell. Since all Linux distros that I know of come stock with bash I decided to go about changing my default shell to bash. To begin with you need to install bash. Since you should already have fink install jut type “fink install bash”. Once that is done, open up your term application and go to preferences to change your default shell to /sw/bin/bash. I would also recommend adding /sw/bin/ and /sbin to your $PATH in your .bashrc file. Note the fink version uses .bash_profile so ln –s that to your .bashrc (or just use that file instead).


Other applications to consider

You might also consider installing some other applications that you usually have on Linux. Apache+PHP is extremely easy to install – OS X comes with PEAR already installed. Another must have upgrade, in my opinion, is VIM – “fink install vim” worked great for me (make sure /sw/bin is in your $PATH).


Some oddities

There are some strange not-quite-UNIX anomalies I’ve found since I started using OS X. First off the familiar chsh command would not change my shell to /sw/bin/bash. Another oddity is that /etc/profile doesn’t work, which isn’t a huge deal since .bash_profile in my $HOME worked fine. Probably the weirdest thing is how it stores and handles users. As far as I can see /etc/passwd doesn’t seem to store username information like Linux does. In fact, I’m not sure where the heck it stores my password information. While BSD users may not have any problem with the init scripts, Linux users used to the System V way of doing things will be a little lost. I haven’t really looked into it, but I’m not sure how one might go about starting MySQL or Apache during startup.


Conclusion

OS X can easily be turned into a Linux type environment. With the quick changes above any Linux user can be fairly comfortable at the prompt in OS X. I don’t spend a whole lot of time at the prompt on my local machine since most of my development is done on various development servers, but when I do work locally I feel right at home.

Why my Desktop is OS X

DISCLAIMER: I still use Linux on all of my servers. This paper is not a position saying OS X should be used in that type of environment. What this paper is is an outline of why my day to day desktop computer runs OS X now instead of Linux.
Read on for the full article.

Introduction

I recently made the decision to ditch my dual 19’’, 1Ghz Athlon, running Debian GNU/Linux in favor of the ultra-portable 700Mhz G3 iBook with tons of RAM and a 40GB hard drive. The main reason behind this decision was Apple’s new operating system, OS X. The short story is that I love OS X and would recommend it to any hardcore UNIX fan.

I’d like to note that when I say I used Linux I really mean it. I spent 4+ years using it both on my desktop and on all of my servers. I’ve configured everything from Samba to Qmail+EZMLM without problems. I’ve used, configured, and ran just about ever application under Linux so I consider myself well versed in Linux’s shortcomings (especially those related to the desktop).

Top 5 Reasons I don’t miss Linux

1.) No kernel recompiles
I must admit that after 4+ years using Linux fulltime on my desktop I was sick and tired of recompiling my kernel. Not only did I have to do it every time I installed new hardware I also had to consult Google, mailing lists, kernel changelogs, etc. when I set out to purchase new hardware.

2.) X Windows
OS X has X Windows. Linux has X Windows. OS X has Aqua. Linux does not have Aqua. I could spend days talking about why Aqua is vastly superior to anything Linux has put on the desktop. I’ll hit some of the sweet spots that I’ve found since beginning my odyssey. First off the dock is very easy to use. You can easily drag and drop newly installed applications into it (or right click after you have started them and click “Keep in Dock”). If you don’t like clutter in your desktop you could add links to your favorite applications in a folder, add the folder to your dock, and then right click on the folder to see its contents and launch those applications. Other than the fact that the interface is just plain beautiful, it is also function. The simple fact is GTK’s file dialog box is the worst and KDE’s isn’t much better. Aqua’s allows for favorites and is simple to navigate. I suppose these aren’t truly a knock against X Windows, but rather the state of the Linux desktop in general.


3.) Office Applications

Where are they? You can preach Open Office all you want and I agree they are making progress, but since applications in Linux don’t really talk to each other (ie. Clicking on a Word file in Mozilla doesn’t launch Open Office without screwing with mime types) it’s not very useful.


4.) Software Installation

I’m sorry, but “./configure && make && make install” is NOT user friendly. Then I have to wait 8 years for it to compile, unless, of course, I’m missing some random library, which then needs to be downloaded and compiled. Sure apt-get is damn cool and there are more and more graphic frontends for such things, but simply put most Linux distributions do not make it easy to install systems. I remember spending tons of time downloading, compiling, and configuring applications, editing config files, etc. Which is another big problem with Linux, many applications require you to edit text files in order to get them to work correctly. I’m sorry, but if I never see another rc file I’ll be a happy camper. Don’t even get me started on RPM …


5.) No fun toys

It took me days to get my old digital camera to work using a serial port (which I sacrificed because I figured it would work better under Linux). Even though Gphoto listed it as a supported camera it didn’t work. After many emails to the list asking for help (all of which went unanswered) I finally got it working with photopc. This meant that I had to use another text based tool AND there wasn’t much of anything, other than some obscure perl scripts, to easily manage my photo albums. My iBook came preinstalled with iPhoto, which works with virtually every camera on the planet. I can even save photo albums as screen savers! Forget about video editing in Linux. Playing DVD’s has only recently become possible and I can’t imagine how hard it is to set that up. Burning CD’s was never really all that easy under Linux either, unless you had somehow figured out XCDRoast or mastered mkisofs.

Top 5 Reasons OS X Rules


1.) It’s UNIX!

Yes that’s right, OS X really is UNIX. OS X is BSD variant to be exact. It has home directories, has true multiuser support, and comes complete with a terminal. In fact my usual ps auxw | grep mozilla to find crashed Mozilla processes works fine as does the kill command that usually follows. Install fink and you basically get apt-get. I’ve installed mysql, rsync, and bash without any incident. My boss has compiled PHP+Apache by following the basic PHP install howto. OS X comes standard with SSH, Perl, and all sorts of all the other goodies you have come to expect in a standard UNIX distribution.


2.) Aqua

What can I say? It’s a pleasure to work in. Enlightenment, GNOME, and KDE haven’t come close to the integration and ease of use that Apple has created in Aqua. Copy and paste works (shocking I know), the file dialog box is useful, drag and drop works (even between Mozilla and IE), and all the mime types work beautifully. It’s fast too! With Jaguar (OS X v10.2) and the introduction of Quartz Extreme it will be OpenGL accelerated, which should make it even faster. Why desktops haven’t been using my spare GPU cycles all along I’ll never know.


3.) “It just works”

Apple is notorious for their “it just works” type of attitude. Everything just plugs in and works. The thought of a driver is completely foreign to most Mac users. OS X is not different. Plug in the USB keyboard and three button mouse with scrollwheel and they work. Unplug your RJ45 and OS X switches to the AirPort card without a hiccup. When I installed my AirPort card all OS X said was “I found an AirPort card – I’m enabling it now.” No restart, no configuration, nothing! And best of all I didn’t have to recompile my kernel. When I put in a blank CDR OS X prompts me to name the volume and then mounts an ISO image as a folder on my desktop. Simply drag the files into the folder and then drag the folder onto the trashcan to burn it!


4.) Microsoft Office X

Say what you want about Open Office, Microsoft Office X is light years ahead. I’m not sure if Open Office will ever be able to catch up. There’s not much really to say here other than having a robust office suite that is the industry standard is pretty nice.


5.) iTunes

I could go on and on about how cool this application is, but it wouldn’t do it any justice. The smart playlists are remarkable to me. They automatically update and adjust after I have updated my library, etc. iTunes comes standard with a ton of radio stations, which have almost replaced my very extensive (30GB+) MP3 archive. It rips a CD in less than ten minutes and allows you to simply click “Burn this playlist” if you want to burn a CD.


Some things OS X could learn from Linux

There are a few things that I wish OS X had. It should come standard with multiple desktops for one thing. Also, my beloved ALT+Click to move windows (hold down ALT then click anywhere in a window to move it) does not work in OS X. I really wish it came standard with bash, but thanks to fink this isn’t a huge issue. There should also be some sort of xkill application to kill frozen applications. These are the biggest things that annoy me about OS X, which isn’t all that bad.


Conclusion

OS X is totally amazing. It runs fast, looks great, and is easy to use. It comes with all sorts of applications. The major software manufacturers support it. The core, Darwin, is open source. It runs and acts like UNIX when you are at the prompt. I’m hooked. The best part is it came bundled with a sexy iBook that is just an amazing little machine. If you get an upgraded version it comes with a PowerBook Titanium. Considering OS X works with native Xfree86 applications and has a valid, but slightly quirky UNIX environment, I would highly recommend it to anyone.

Bourbon St.

I have to say, without a doubt, New Orleans is a fun town that has earned its reputation. Not only is beer cheap, but you can walk from bar to bar with your beer (no open intox laws). Very nice! I’m not sure who’s idea it was to bring 350 fraternity boys here for a big party, but I should hunt them down and thank them.

Depressing

Today is the first time I’ve flown since 9/11. I must say it’s a depressing scene. The people at the ticket counters are unfriendly drones, the searching of bags is borderline rediculous, and the atmosphere of fun in air travel is in the toilet. I’m sitting here on my way to New Orleans with one of my fraternity brothers, Brian Dye.

Changing your default shell in OS X

So I’ve been spending time playing with the UNIX parts of OS X. After spending a few minutes pulling my hair out due to chsh not working I took matters into my own hands. I use GLTerm instead of the default term application that came with OS X. After you “fink install bash” you can change the default shell in GLTerm’s preferencers to “/sw/bin/bash”. Then you’ll want to edit your .bashrc (note: “ln -s .bashrc .bash_profile” once yo uare done editing) and add PATH=$PATH:/sw/bin. You might want to modify your prompt as well. PS1=”[u@h w]n[W] $ ” worked well for me. Hope this helps someone.

Living the Tabbed Life

Mozilla introduced me to “Tabbed Browsing” and my life hasn’t been the same since. Basically you have ONE window with tabs at the top. Each tab is labled with the title of the webpage in that tab. You can easily click through pages without having 50 browser windows open. It’s great! In fact tabbed browsing is SO great I’ve been looking into using MORE tabbed software. For instance, my AIM client, Adium, has a tabbed interface. One small AIM window with tabs at the top for each Buddy. It makes your desktop much less cluttered. If you know of a tabbed terminal for OS X let me know.

AirPort Card r0x0rz

I just got the AirPort installed in the iBook. It’s super fatty – why everyone doesn’t have a wireless network I’ll never know. I bought a wireless router a few months ago in anticipation of getting a wireless computer and I must say it was worth the wait. Plus now that my college finally has wireless internet in the library and Paul has wireless at his house it should reduce one more cord from my life. My only question now is: Do they have Blue Tooth enabled mice?