Saturday, January 26, 2008

Calendar App

Having an easily accessible calendar is extremely helpful. Some people use widgets/gadgets/PIMs/Outlook, etc. I generally like to have a small calendar on my desktop showing the current and following month.

With Geektools, I went with the classic Unix program 'cal'. I have Geektool call 'cal' to show the current month and a second call to show the next month.

geektool to display calendar

Feelings on the Macbook and OSX

I'm getting more used to using OSX/Macbook although a few things still nags at me. I'm still more used to having the application's menu within the frame of the application instead of at the top of the OS (especially noticeable when I'm using a dual monitor setup), and I wish Apple would allow the screen to tilt back more, and why are they so unwilling to provide a docking station?!?

The keyboard is nice and comfortable, but a two button mouse is still preferable. Overall the system runs well, but I don't feel it's a speed demon. For those running Windows on OSX, 4 gig is recommended. Running with 2 gig is ok, but it's like running Windows on 1 gig while also slowing down OSX.

I like Quicksilver and Geektools and I love the UNIX underlying. The support for external display kick the butts of my windows notebooks (especially ones by HP). The dimensions of the 15" Macbook and the weight balance is excellent. The 17" model is too big to travel around with and the Airbook just isn't that compelling to me. Personally, I feel the 15" is the sweet spot in Apple's notebook line.

Fedora 8 Update

Now that I've been using Fedora 8 for a few days, I can comment a little more on it. I've been regularly running "yum update" and I can see that the packages are being very actively updated. The issue of the kernel-header was resolved as I predicted as f8 caught up with the kernel in f7.

Unlike my experience with f7, once I got the system up I did not have to do much reconfiguring. The services are all working as they should and some of the apps feels like they're running a little more robust then f7. The small visual changes to the Gnome desktop is a noticeable improvement to my eyes, but this is all subjective.

F8 feels more "modern" then its predecessors. It might not be as hip as Ubuntu, but for all practical purposes it's on-par. I still like Fedora and while the upgrade path is not as smooth as I would've liked it, for those looking to perform a clean Linux install I wouldn't hesitate to suggest that they look at Fedora.

Monday, January 21, 2008

Upgrading to Fedora 8

Here are my note from upgrading Fedora 7 to Fedora 8 on a x86_64 system. The existing system is not very customized, but does pull some things from the Livna repo. It runs a nvidia video card and one of the video output is connected to a LCD TV to be used as a secondary monitor.

Following the recommendation of some of the posts online, I first did a yum update on fc7 to make sure I got the latest packages. In hindsight, I'm not sure if this was the best thing to do since it might have pulled a kernel version that is more current then the Fedora 8 version.

Right off the bat, I encountered the Upgrade Hang bug. The fix is listed in the link. When booting from the DVD, at the first menu when it asks you whether you want graphic or text installer, hit "TAB" and append the line to what is shown.

Once it finishes installing, it then reboots.

The video setting changed to using the open source nvidia driver which looks crappy on my monitor, but I figure I can always changes after I get the latest update from Livna.

Just like last time, I did a "yum upgrade" and just like last time it failed due to dependency issues from Livna packages. The upgrade is suppose to recognize third party repos, but never fully does. I had to remove them. vlc and xine to get past the dependency problem.

I noticed that there are a lot of fc7 packages still hanging around. The update didn't have that many new packages (suspicious) and it kept trying to grab the fc7 kernel. I had to reboot the machine before yum started to grab updated Fedora 8 packages. No where did it ever ask me to reboot, so it took a while before I was able to get this to work.

Still, after the update, Livna's Nvidia package still didn't work. Gnome's Display applet didn't show the right monitor or video card and it was missing the native resolution. I was able to select my monitor manually, but it still didn't give me the right resolution option. I finally removed kmod-nvidia so I can re-install it.

Fedora simply wouldn't let me sett the correct resolution even after I rebooted and re-installed kmod-nvidia. This time I first to the Display applet and changed to using the vendor supplied Nvidia driver. Then I used Nividia's (nvidia-settings, and make sure you run it as root or it'll just tell you that you don't have permission) app to change the display settings. Another reboot showed me an login screen that was working, but whenver I log in the resolution messes up. Finally, I just deleted all my Gnome settings and finally got things working! (I should've backed it up since my terminal fonts don't look quite as good now. It's possible I made a change but forgotten about it in the pre-F8 days).

Fedora 8 upgrade leaves a lot of fc7 packages hanging around. Most of them are orphaned packages since they either got moved to another package or no longer maintained in f8. The one remaining is kernel-headers which is fc7 but most of the dependency issues were caused by f8 packages when I tried to remove it or upgrade it. The version of the kernel header is newer then the f8 kernel that is installed... Maybe when the kernel gets above the f7 version on f8 then I'll be able to upgrade it.

Like F7, I faced enough trouble that I wished I didn't try to do an upgrade so soon especially since Fedora 7 was working fine for me. The upgrade process is still not as mature and it probably would've been easier if I just installed a fresh new copy instead of trying to upgrade.

Saturday, January 19, 2008

I don't get the Apple Nation...

Truth be told, I never paid too much attention to the Apple Nation. Sure, I kept up-to-date on many of the products they release, but not because they were from Apple. It was more that I wanted to see what's the latest mp3 player and the iPod is one of the top choices, etc. This is just to say that I never paid much attention to Macworld other then read a news article here and there after the fact.

Since I got the Macbook Pro, I've been finding out a little more about Apple stuff mainly because I've been looking for software and utilities and since you can't go to any Apple-related site without hearing about Macworld, I actually paid some attention to Steve Jobs' announcements. This year there doesn't seem to be much revolutionary new products coming from Apple as compared to last year when they announced the iPhone. At the same time, though, the Apple fanbois made everything sound like Apple has just invented fire.

Macbook Air? It's a pretty neat product and while it might be something new in the Mac universe, sub-notebooks are hardly a new thing here in the rest of the world. Almost as soon as it was announced, Gizmodo did a comparison of Apple's sub-notebook with 5 other sub-notebooks. At most in the sub-notebook category, it has some evolutionary refinements, but the Apple Nation was cheering as if they've never seen a light portable notebook before...

Monday, January 14, 2008

Customizing my work environment.

I'm continuing to get more familiar with working with a Macbook Pro and am starting to customize it to suit my working style. The first thing was to get some parity with what I was used to in Windows. At work, I have two machines (Macbook Pro notebook and a Linux workstation) and two monitors (24" LCD and 17" LCD). I previously had a Windows notebook instead of the Macbook and had configured my system to be a three monitor system. The Windows notebook was on the far left and connected into a docking station. I used the notebook's LCD for Thunderbird, IM buddies, etc.

To the right of the notebook, I had the large monitor which is the extension of the Windows desktop and what I'm staring at most of the day (when I'm at my desk that is). Next to large monitor is the 17" monitor that is connected to my Linux work station.

There is only a single keyboard and mouse, and both are connected to the Linux workstation. By running a VNC Server on the Windows machine and a program call x2vnc on the Linux machine, I can move the mouse/keyboard cursor across all three monitors as if they were one and even copy-and-paste between UNIX-Windows apps. The only limitation is that Linux apps can't be moved off the the 17" screen and Windows apps can't be on the 17" screen, but effectively my one keyboard and mouse controls both computers.

Being so used to VNC, I tried to do the same thing with OSX. Imagine the above system except with the Macbook instead of the Windows notebook. At first I tried using Apple's Remote Desktop which is suppose to be basically a VNC Server. The problem is that x2vnc or any other vnc client I tried could connect to OSX. I then downloaded a VNC Server for OSX, but that didn't recognize the dual monitor display of the notebook+external monitor.

Fortunately, the solution was the open-source Synergy tool which does much of the same thing as x2vnc and has both a server and client for Linux and OSX. Basically, on the Linux workstation, I run the Synergy "server". On the Macbook, I run the Synergy "client" and now I can do what exactly the same thing as before with one mouse and keyboard.

Installing Synergy was a snap. On Linux, use whatever your app management tool might be (i.e. "yum install synergy") and on OSX use Macports (i.e. sudo port install synergy). The Synergy site has instruction on what the configuration file should be and then it's just a matter of running the programs on each machine.

With my physical environment ready, I started to tackle trying to get a good ToDo app for OSX. For me, a todo utility must be easy to access. I'm too lazy to have to move my hands from the keyboard to the mouse. ^^; I also want the data to be presented simply and non-obtrusively. It's surprisingly hard to find this combo. Even on Windows, I didn't have a great solution: I used Google Desktop's todo widget which required that I use the mouse to select the widget before I can type into it, but the look was simple and basic.

I tried a few Mac Todo lists and was going to go with DoIt since it had Quicksilver integration that allowed me to write items to the list with keyboard strokes... almost. The problem was that DoIt also requires you select a category from a drop down list before it adds the todo item, and for the life of me I couldn't figure out how to select the category without using the mouse.

I finally came across a mixed low-tech/high-tech solution. Quicksilver has an action called "Append to text file". Using a simple text file (i.e. todo.txt), I created a trigger and keyboard shortcut that when hit, let's me type a todo item that gets appended directly into the text file. To see my changes, I used a very neat little app called Geektool that display a transparent window containing the text output of anything log file, script output or image.

Todo List

One limitation of this setup was that I used Geektool's file type to handle the display of the todo file. This only works when the file is appended to at the end like typical log files. This means that if you edit the file with another application, the change doesn't show up. The solution is to not use "file" but use a Geektool "command" with a refresh timer. By using the command, "curl " every 30 seconds, it'll regularly update the window with whatever is in the text file. Not as good as detecting a change automatically, but works well.

Saturday, January 5, 2008

Eclipse IDE

I've looked at Eclipse on-and-off since the very beginning, but I was never compelled to use it for a variety of reasons. The last time I made a attempt to use Eclipse was a couple of years ago and it wouldn't start up for me for reasons I was never able to determine, so I just left it at that.

I decided to take another look at Eclipse again because 1) I've been hearing a lot of good things about it so I figure a lot of issues have been resolved, 2) I don't have any software for the Mac so the free open-source nature of Eclipse is a plus, and 3) I'm thinking I'm going to be doing some Java coding.

I went to the Eclipse site and downloaded the the J2EE package. The different packages just means they come with different sets of plug-ins. You can always download the most basic package and install each plug-in your want manually. I didn't want the hassle of doing something and then finding out in the middle of it that I was missing a plug-in so I grabbed the full J2EE version.

Installing and running it was as simple of uncompressing the archive and clicking on the Eclipse icon. While Java has made a lot of progress addressing performance issues especially on the server side, I wanted to see how it does on a desktop application that is stopped and started frequently. While I didn't do any real benchmarking, the IDE started up faster then I remember it is still no speed demon. Once started, though, the performance seems pretty good.

Eclipse has it's own set of terminology like perspectives, Team, etc. which takes a bit getting used to, but the features you'd expect in a modern IDE is all there such as code completion, syntax highlighting, code navigation, etc. One thing I really like is that it checks your code for you even as you type. When you open up a project, you can immediately see which directory/file/line has potential errors through the explorer pane. You can do a lot more with templates code assists that will help with some coding tasks.

Before I did too much with Eclipse, I found out about PDT (PHP Developer Tool) plug-in. This adds PHP support to Eclipse and was a project that originated from the makers of the Zend IDE. Since my current projects tends to be PHP-based, it peaked my interests to see if I can use this IDE to handle my projects.

Installing the plug-in is super easy with Eclipse now. Just go to the plug-in manager and add the PDT repository to it's list and tell it to install. A few clicks later, I had PDT in Eclipse that recognizes PHP files and my project directory. Unfortunately, I haven't had much more time to get beyond that. I still want to test the debugging tool, etc. but I'll have to do that later.

Thursday, January 3, 2008

OSX Networking

Setting up wireless connection was surprisingly easy and I was able to get it up in minutes, so points there for Apple. I connected the machine through the built-in ethernet at work and the performance was dog slow! I saw packet loss of about 70 percent so definite negative points. Initially I thought that there might have problem with the ethernet hardware but then I read online that Macbook Pros have problem if they are on a LAN that has 802.1q/vLAN. The problem is discussed here.

I hook the notebook on another network and it performed fine so it seems like I got bit by this same bug. I'm surprised that Apple still haven't fixed it, but I suspect this mainly effect corporate users which might still not be a big customer base for Apple to pay attention to.

Tuesday, January 1, 2008

Dev environment on OSX

I feel like I'm behind at work recently so I didn't want to start the new year at the office spending time configuring the new notebook. The baby was nice to me tonight and went to bed early so it allowed me to have the chance to get my development environment on the new Macbook Pro with OSX Tiger configured. Thanks to M in Ohio who saved me hours of time by pointing me to the right solution.

The nice thing about the OSX is that it is build on top of UNIX which is a developer's OS. You'll find that most open source tools are available and if not then getting it compiled from source is usually possible. I used compile everything from source including the kernel, but now that I am a lazy old man, I tend to prefer using some sort of package management solution that has the dependencies resolved. For Linux, I like the yum package management tool that sits on top of RPM. It beats the hell out of downloading the source and figuring out all the dependencies.

M pointed me to MacPorts as a similar repository/package management solution for OSX open source packages. It's really easy to use. Simply download the install package from the site, run it and you're ready to go. I did ran into one bug where it didn't create a .profile file for me so the path to "port" couldn't be found. I'm not sure why, but a quick look on the site and I knew which directories to add to my $PATH variable.

export PATH=/opt/local/bin:/opt/local/sbin:$PATH

Don't forget to "source ~/.profile" to pick up the change.

With MacPorts installed, it was only a matter of grabbing the programs I needed for a web development environment: Apache2, MySQL, PostgreSQL, PHP5.

Installing Apache2:

  • sudo port install apache2

  • cp /opt/local/apache2/conf/httpd.conf.sample /opt/local/apache2/conf/httpd.conf

  • sudo /opt/local/apache2/bin/apachectl start

  • point your browser to http://localhost to see that everything is running.

If you want to automatically start apache at boot-up then do then:

sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist

Installing MySQL and PostgreSQL:

  • sudo port install mysql5 mysql5-server; sudo -u mysql mysql_install_db5 (to start the daemon: cd /opt/local ; /opt/local/lib/mysql5/bin/mysqld_safe &)
  • To automatically have mysql start: sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
  • sudo port install postgresql84 postgresql84-server
    To create a database instance, after install do
    sudo mkdir -p /opt/local/var/db/postgresql84/defaultdb
    sudo chown postgres:postgres /opt/local/var/db/postgresql84/defaultdb
    sudo su postgres -c '/opt/local/lib/postgresql84/bin/initdb -D /opt/local/var/db/postgresql84/defaultdb'
    (to start: /opt/local/lib/postgresql84/bin/postgres -D /opt/local/var/db/postgresql84/defaultdb)

Installing PHP5 with support for MySQL, PostgreSQL:

  • sudo /opt/local/apache2/bin/apachectl stop
  • sudo port install php5 +apache2 +postgresql +pear
  • sudo port install php5-mysql php5-sqlite
  • sudo cp /opt/local/etc/php5/php.ini-development /opt/local/etc/php5/php.ini
  • sudo vi /opt/local/apache2/conf/httpd.conf
    • add "Include conf/extras-conf/*.conf" to /opt/local/apache2/conf/httpd.conf

  • sudo /opt/local/apache2/bin/apachectl start

Installing Eclipse IDE:

  • Download the IDE from Eclipse.
  • unarchive it to whichever location you want to run it from (I put it in /Applications/eclipse).

With that, the an Unix development environment capable of doing web development with PHP, MySQL and/or PostgreSQL as well as Java/C/C++ development is all ready!

For a little more detail about the set up process, I stumbled on this nice post.

Using OSX... a few days later.

I've now had a few more days to use the MacBook and OSX 10.4. The first day was mostly getting familiar with the environment and it wasn't until the second day that I started to migrate data from my Windows XP notebook.

The migration turned out to be simpler then I expected. Part of the reason is that I tend to use open source applications which are often developed for multi-platforms so the data transfers easily.

For example, you can copy Thunderbird mail, settings and extensions directly from the Windows location (C:\Documents and Settings\\Application Data\Thunderbird\Profiles\) to it's OSX equivalent (~/Library/Thunderbird/Profiles/. The same can be said for Firefox.

Users of GAIM/Pidgin will most likely use Adium on OSX and since they share the same foundation, their IM archive share the same structure so just copy the "logs" directory over.

I then copied over "My Documents" to "~/Documents" where by default it is recognized by Parallel's XP instance.

All-in-all, getting everything over to the Mac has been pretty easy. I've found most of the apps I needed to have an OSX versions although I've still not found a good note taking program like Evernote (I'll give Yojimbo a try). I'm also still trying to understand how to configure the system to give me some of what I'm used to in Windows (such as displaying image thumbnails for graphic files).

Some annoyances with OSX include the sensitivity of the track pad. I tend to use my right hand fingers to move the pointer around, but my left hand stays near the keyboard. The track pad often senses my left hand and gets confused.

The keyboard on the Macbook Pro is pretty good, but I'm more used to where the CTRL (in the case of Macs, the Apple key) so there is some finger gymnastic action. The lack of a second mouse button is also annoying to a Windows/Linux user spoiled by the convenience of it. I've always wondered if Apple is just too proud to admit someone else could come up with good interface ideas and that's why they've stuck with the one button mouse.

The biggest annoyance is the screen and font! OSX's font rendering especially its anti-alias/font smoothing is plain fuzzy to my eyes and the Macbook screen makes it worst when you're not looking at it from a specific angle. This is a controversial topic as can be seen here and here, so I won't talk about it much here. A lot of it is personal preference, of course, but I've always had a hard time with the softness around some of the anti-alias text. I wish they just soften curves instead of everything. I don't understand why a solid dash line isn't just a solid black, for example.

I figured what I can do is just turn off anti-aliasing (Apple calls it font smoothing) or select a different system font. Then I found out that Apple seems to be to headed down the road of less user customization by restricting what fonts the system uses, etc. I read it was to make sure that users don't confuse the brand by customizing the UI to not look like OSX... I'm not sure if that is true, but I was surprised by the lack of customization available to the user.

My eventual solution was to download a small app called TinkerTool which exposes many of the hidden settings available but not exposed by Apple in the preferences tool. I was able to tell OSX to not use font smoothing for text greater then 12pt, to change the default fonts (not all parts of OSX respects this setting nor do all OSX apps, but so far it's been ok), and to use the Tahoma font instead of the default OSX font:

TinkerTool > Font Smoothing: "Turn off font smoothing for font sizes 16 pt and smaller"
TinkerTool > Fonts:
System: Tahoma, 13pt
Application: Tahoma, 12pt
Messages: Tahoma, 13pt
Labels: Tahoma, 10pt
Help Tags: Tahoma, 11pt

So now that I got my data over, my most essential apps installed, and the UI is not giving a headache to look at , it's on to the fun part of customizing the environment to suit my working habits!