Archive for the ‘Tips + Tricks’ Category

Upgrading to Fedora Core 5

Wednesday, June 21st, 2006

After having successsfully upgraded my spared Dell box to Fedora Core 5, I messed up the boot partition and had to do it all over again. So I decided I might as well document it here since the processs wasn’t quite as smooth as one’d hope.

UPGRADING FEDORA CORE 4 TO CORE 5 USING YUM
1. First, make sure yum is up to date. If you are going to upgrade your system with it, you might as well make sure the tool is up to pars.

me@localhost$ yum -y upgrade yum

This is going to download a bunch of other stuff other than yum. So be patient.

2a. Next, make sure sure your kernel is up to date as well. Or else when you upgrade to FC5, it will throw a bunch of errors like this:

Error: Package initscripts needs kernel < 2.6.12, this is not available.
Error: Package kudzu needs kernel < 2.6.13, this is not available.

So here we go:

me@localhost$ yum -y upgrade kernel

For multi-CPU systems, do the following instead:
me@localhost$ yum -y upgrade kernel-smp

2b. Just to be on the safe side, some packages may need to be removed before upgrading. This script should tell you what needs to go:

me@localhost$ perl -ne 'print "$1\n" if ((/Error: Missing Dependency:.*is needed by package (.*)$/) || (/Error: Package (.*?) needs.*, this is not available./))' /tmp/yum_upgrade | sort | uniq

3. Reboot. Make sure you boot into the latest kernel or else you are going to have the same problems as I mentioned before.

4a. Now delete any old kernels you have still on your system. First, let’s see what’s there:

me@localhost$ rpm -q kernel kernel-smp kernel-devel kernel-smp-devel | sort

4b. Delete old kernels:

me@localhost$ rpm -e kernel-version-number

I read somewhere that you should delete kernels by using rpm since it also tidies up your bootloader file for you.

Optional: Update rpm packages:

me@localhost$ rpm --rebuilddb

5. Now we are ready to get the FC5 upgrade package:

me@localhost$ rpm -Uvh http://download.fedora
.redhat.com/pub/fedora/linux/core/5/i386/os
/Fedora/RPMS/fedora-release-5-5.noarch.rpm
(this code wraps for cosmetic reasons. But you should copy/paste this as if it's one unbroken line.)

6. Finally. Show time. Let’s upgrade this puppy…

me@localhost$ yum -y upgrade

Now sit tight and wait. This could take a while depending on your Internet connection. It took me roughly 5-7 hours on a moderately fast DSL.

7. Once everything is downloaded and installed, reboot.

8. It’s probably a good idea to keep your old kernels. But I deleted my FC4 kernels.

INSTALLING VMWARE 5.5.1.x
Nothing is EVER easy on Linux. The same assumption (and proof) goes to updating VMWare after the FC5 upgrade. VMWare complained about not being able to find “the directory of C header files”. To resolve this problem, you must download the vmware-any-any-update101.tar.gz and run it. Everything will hum just fine after this update is applied to VMWare.

Much thanks to: brandonhutchinson.com and LinuxSky.com (Simplified Chinese only)

Remedy to Firefox Memory Leak

Tuesday, February 14th, 2006

I wrote about reclaiming memory from Firefox’s memory leak problem. But apparently this supposedly memory leak is really a feature:

Excerpt from the Slashdot article:

“The Firefox memory leak is not a bug. It’s a feature! The ‘feature’ is how the pages are cached in a tabbed environment.” From the article: “To improve performance when navigating (studies show that 39% of all page navigations are renavigations to pages visited less than 10 pages ago, usually using the back button), Firefox 1.5 implements a Back-Forward cache that retains the rendered document for the last five session history entries for each tab. This is a lot of data. If you have a lot of tabs, Firefox’s memory usage can climb dramatically. It’s a trade-off. What you get out of it is faster performance as you navigate the web.”

Someone on that thread also found a way to remedy this memory leak once and for all…

1. In the Firefox URL box, type about:config
2. Look for browser.sessionhistory.max_total_viewers and set it to “0″ (default should have been “-1″ )

According to Firefox’s online documenation, setting the value to “0″ disables page caching and will damatically increase the time it takes to go back to a page using the back/front buttons (yeah, if you on dialup). But the documentation also gives guidelines on what values to set for the level of page caching you can tolerate (proportion to the memory Firefox will use).

Why Linux Will Never Make It to the Mainstream

Monday, February 13th, 2006

To get ready for a Linux class I am taking, I have to put Linux back on the old Dell I have abandoned ever since moving Grace to the Mac. I decided to try the latest flavors out there — Ubuntu 5.10 and Fedora Core 4.

Linux has been great as a server environment for me. But I have been frustrated with it since the Redhat 8.0 days (precursor to the current Fedora project). Nothing has been intuitive in almost every aspect of the Linux wold. Everything from application naming convention (WTF is “Gimp” if you don’t Google it?), install, setup to the simplest things such as application upgrades. I have picked up quite a bit of Linux just from Googling and learning everything myself with occassional Q&A sessions with Kyung. But it never seems to get any easier.

Ubuntu
Start with Ubuntu, the latest and the greatest and the most recent “king of ease of use”. Sure enough, the entire installation and setup process was seamlessly fast — took less than 3 hours with everything installed and done. It was as easy to install as the Windows installation process, I thought. And all it took was one 700MB disc. Easy! I liked the experience so far.

But it sucked when it came to upgrading Firefox from the default 1.07 to the latest 1.5.0.1. I had to download Firefox, extract the file to some other directory, make symbolic links in one directory while changing other files and variables to make everything happy. Screw that. I tried using apt-get to update the software automatically, but then I was too lazy to figure out where to fix the repository list so that it’d get the latest Firefox, so I ditched Ubuntu.

Fedora Core 4
On with Fedora. I have used it quite a bit before. But that didn’t make the experience any easier. Upgrading Firefox was a bit simpler. But I still had to go through similar hoops. The main stumbling block on Fedora was trying to get VNC server to work properly (so that I can free up the monitor for my laptop). To demonstrate how much crap I had to do to make it work, here’s what I did…

1. Install VNC server by issuing this command yum -y install vncserver
2. Check to see if vnc server has the right runlevel: /sbin/chkconfig --list | grep vnc;
but I got this:
vncserver 0: off 1: off 2: off 3: off 4: off 5: off 6: off
(hint: runlevel 5 should be on)
3. Change runlevel: /sbin/chkconfig --level 5 vncserver
4. In ~/.vnc/xstartup file, uncomment these two lines:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

5. From the menu, go to “Applications > Preferences > Remote Desktop” and change options to allow remote users to control the workstation
6. Change rules in the iptables file (Linux version of a firewall) in /etc/sysconfig/iptables by adding a new rule:
-A INPUT -p tcp -m tcp --dport 5900 -j ACCEPT (5900 being the port I need to open to allow VNC to accept communications through that port)
7. Restart iptables: sudo /etc/init.d/iptables restart
8. Start VNC server: sudo /etc/init.d/vncserver start

Yeah sure, I have everything in one place now. It sure took me some work and digging to put all the pieces together. Can an average Joe get VNC to work not knowing all this? The answer is obviouly a NO. And I rest my case… Unless things drastically change in simplifying the environment, it will never be in the mainstream.

UPDATE 06/14/2006: More info on how to set screen resolutions for vncviewer.

All the Web Colors Under the Sun

Saturday, February 11th, 2006

I was looking for more variety of colors other than the standard web-safe colors provided by BBedit, my preferred plain text editor for programming on my Mac. I found a pretty damn cool site that converts Pantone colors to RGB and Hexdecimal colors.

This color conversion tool allows you to convert Pantone® Spot Colors to RGB (sRGB) color values (Red/Green/Blue) and Hexadecimal color values (Hex). You can also view a Web Safe Color Palette and X11 Color Keywords with RGB, Hexadecimal and CSS Shorthand Hex color values.

It’s unfortunate that the combinations of web browsers, monitors and operating systems all treat colors differently. There’s no real way to have a uniform color palate… But the website is pretty cool nonetheless.

Home Made DVD Problem Resolved

Saturday, January 21st, 2006

After having some issues with burning DVDs using Apple’s iDVD dvd authoring software on Grace’s slower Mac, I decided to encode the project file on my laptop and see what happens. And it turns out that CPU speed DID matter in the case of dvd video encoding, at least in this one instance. Another cool thing I found out is that Apple’s iDVD can pull source files (raw video footage) over the network! All I had was the iDVD project file on my laptop, the rest of the source files (videos and music) were all on Grace’s Mac. It was way faster to encode the DVD on my Mac pulling source materials from Grace’s Mac over the network than encoding locally on her Mac!! WOW!

So the blue flickering is gone now. Copies will be made to anyone who wants one (namely, our moms and maybe friends of Grace).

Make Mac OSX Support Third Party DVD Burners

Friday, December 30th, 2005

PatchBurn logo I inherited a nice Sony DVDRW drive (specifically Sony RW DW-U18A) from Kyung when he went back to NYC. Unfortunately Apple has issues with “unauthorized” third party dvd burners working with its apps (iTunes, iDVD… etc) in Panther (OSX 10.3). I couldn’t burn my iTunes playlist or home made DVD movies with it, rending the drive essentially useless with those apps. Fortunately PatchBurn pretty much resolved that problem. It’s a collection of drivers and patch files to allow Apple apps to recognize third party burners. With the release of Tiger (OSX 10.4) though, the drive was supported natively right out of the box without installing PatchBurn. Nonetheless, it’s a very nice collection of patches for Mac OSX before Tiger.

Google Alerts

Thursday, December 29th, 2005

Murdza shared with me an effective tool from Google, Google Alert. Basically the free service sends you an email if Google finds something that matches your search conditions. Consider it a personal search alert system. This is sweet!

Google Alerts logo

Name That Tune!

Thursday, December 22nd, 2005

If you are anything like me with the music (who knows very little about), you will appreciate the convenience of being able to know what song is being played on the radio at all times, that is, if you are listening on your Mac or PC.

Name that tune with Tunatic

Tunatic is a tiny software that is capable of identifying pretty much any modern song within seconds of listening to it. It analyzes the music that’s being played, compare the data with a server and fetches the name of the song and the artist. The downside of this software is that it relies on the speaker of the computer (I guess that can be the upside if you are listening to the conventional radio). That means if you speak when it samples the music, it will take your voice into consideration… not good.

All in all, this little app has been able to identify most of the music I threw at it (nothing fancy though; it failed to identify non-English songs as well as Jazz). Another application the company makes is Tunalyzer, which is an app that sits in the background and analyzes everything in your music folder and sends the meta data back to the database that Tunatic uses. The idea is to sample as much music as possible with the right tags that people give to their music.

Reclaim Memory from Firefox

Thursday, December 15th, 2005

I still keep an eye on the browsers, even though now I have 1GB of RAM installed, for their memory leaks. Firefox and Safari are nortorious for leaking memory when too many tabs are open for too long. But thanks to this blog, there’s now a way to reclaim unused memory space back from Firefox:

If you minimize Firefox, it will (automagically) reclaim memory that it’s no longer using.

IT WORKS! Firefox was using 180+MB of RAM even though only 3 tabs were open at the time. By simply minimizing the window, the memory usage went down to just above 110MB. Nuts.

But seriously, a browser that requires 100+MB of RAM to run is just crazy. When Firefox is first launched, it only takes about 85MB of RAM. It creeps up as more and more tabs are opened/closed… etc. And the longer you run Firefox in one shot straight, the more memory it will take up over time. The same issue applies to Safari. But at least now there’s a work around for Firefox.

Damn you, Apple Safari team.

Nail Fungus and Herbal Remedies

Wednesday, December 7th, 2005

Nail fungus (also known as onychomycosis) is supposedly one of those medical conditions that doctors immediately give up on, much like my warts. It’s very hard to get rid of simply because the fungus lives comfortably underneath the hard and well-protected nails. It’s moist, warm, and for toenails, dark, all of which are perfect conditions for fungus proliferation. Ironic how the very thing that’s evolved to protect humans also turns out to be the best defense system for the fungus.

Unfortunately one of my toe nails got infected somehow, and the stupid fungus just keeps spreading under the nail, making it thick and flaky, sometimes even powderish. Apparently there are a few high tech and a couple of low tech solutions to remedy the situation…

Lamisil
One hi-tech solution is taking Lamisil tables once a day for, oh, 8 months or so. But this is probably the most stupid method. Lamisil is known to severely damage the liver beyond recovery. That’s why the stupid thing needs a prescription and close monitoring from a doctor with periodic liver check ups. It gets expensive with the pills, doctors visits and liver tests. This is an example where modern medicine does more harm than good to mankind. I can’t believe Novartis got the drug approved by the increasingly useless USFDA. I mean, who in their right mind would allow a company to market a drug that could potentially kill a patient for a medical condition that’s not even remotely close to fatal? FDA should be sued for this. It’s been said that the rate of curing onychomycosis is only roughly 30%, obviously not high enough to risk one’s life on. And because of its potential danger, only the young and extraordinarily healthy are recommended for this drug.

Anti-fungal Creams
Enough about Lamisil and FDA’s increasing incompetence. The next hi-tech solution the anti-fungal creams like Nizoral, Leucatin, or Tineacide, or you can try the cream version of Lamisil. What the hell… Lamisil cream? So there’s more than one way Lamisil can f*ck with your body?

Apparently anti-fungal creams are among the least effective form of treatment on nail fungus; they simply drive the fungus deeper into the nail bed. But even this is better than gambling with that stupid Lamisil.

Surgical Removal
The last hi-tech method that I am aware of is by removing the infected nails completely. But of course, this is a bit over the top for such pesky creature. Every surgery comes with its own risks. And it seems the fungus is not worth the risk. Even then, the odds of surviving a surgical removal, I’d bet, is still better than Lamisil.

Enough of hi-tech.

Now let’s move on to the low-tech remedies that actually work surprisingly well. It’s been said (in various forums and articles) that natural remedies are by far the most effective ways to treat the condition without giving away your right arm (or liver).

Vinegar
Some people claim that applying distilled vinegar twice a day on the infected nails changes the pH levels of the nails for 12 hours in each application. The acidic vinegar is soaked in the nail; the change in pH level makes the fungus disinterested in inhabiting in the nail. But because vinegar doesn’t actually kill the fungus, any laziness in application will allow a lapse in the pH level and gives the fungus that much more time to be around. It’s said that after about 7 to 8 months of diligent application, the infected nail will be completely grown out. That’s when you get to enjoy a fungus-less life.

I tried the vinegar. The down side of this is that it stinks (figuratively and literally). The nails change color after a few days because of the changes in the pH level. This is by far the cheapest remedy though… However, it is at the expense of your social life… It’s probably not worth it if you don’t want people to think you smell funny every time they are around you. If you can cleverly cover up the browning color of the nails and the pungent vinegar smell, this may be for the budget-minded you.

The Magical Tea Tree Oil
The last remedy, which is also highly recommended by many people, is using an oil extract from a tree native to Australia. Tea tree oil naturally possesses an anti-fungal property in its chemical make up, making it the natural choice to treat nail fungus. And because of its potency and strength, applying it twice a day, many people have reclaimed their nails in as little as three months! It can also be used to effectively treat athlete’s foot.

I started on tea tree oil today. Hopefully I will be able to blog about my success in a couple of months. A bottle of 1-fl. oz/30ml of tea tree oil costs about $10 at Whole Foods. And it smells very nice… No more stinky vinegar! My added twist to the remedy is that I actually took a nail filer and filed the nail down to as thin as possible to increase absorption of the stuff into the nail bed. I also took a blade to carve a small marker at the root of the nail so that I know when the last portion of the infected nail is gone.

My conclusion is, nature provides so much in terms of disease control without the unnecessary side affects that modern medicine usually (and almost always) comes with. People should take advantage of the proven successes of certain alternative medicines. Some people argue that such remedies do not have enough studies to quantify their effectiveness. And besides, they are not regulated by the FDA. What? Did you say the FDA? The FDA has more ties to the drug industry than George W. Bush has brain cells. Who is to say that whatever FDA approves is safer than thousands of years of trial and error with herbal medicine. In the case of Chinese medicine, every use (or combination uses of as well as their side effects) are well documented. One document in particular, is Ben Cao Gang Mu (《本草綱目》), or “The Compendium Materia Medica” (more info here) is complete with descriptions and pictures for the properties of each herb. I mean, the FDA only approves drugs after certain success rate in human testing in a given number of years. Herbal medicine has been human tested for thousands of years. And yet we doubt its effectiveness? That’s not to say that any kind of herbal remedy should be taken lightly. But to write it off completely is just plain silly.

Foxposé — Exposé for Browsers

Thursday, December 1st, 2005

Carl finally showed me something I didn’t know anything about… Foxposé is a pretty awesome FireFox plugin that turns your opened tabs into minature thumbnails, creating an effect similar to Mac OSX’s Exposé. Now that’s pretty damn cool. Even Windows users can enjoy a small piece of Mac.

Foxposé in action

Remember a while back I decided to use Opera full time? Boy, what an experience. The interface took me a week to kind of get used to. I must say that Opera’s interface is not very intuitive at all, or as what UI designers would say, poorly conceived “affordance“. And then I had to deal with it sporadic crashes on random sites. Worst yet, I can’t download the latest build in hope they may have fixed the problem in one of the builds. That’s when one starts to appreciate Open Source software… You can always get nightly builds of your software of choice, and there’s always the chance one of the developers would have addressed the issue you are dealing with…

Armed with Foxposé, I installed SessionSaver .2 (for Firefox 1.5, install this version instead), Yahoo Companion (the feature I missed the most on Internet Explorer) and StumbleUpon, I am going to try to use Firefox 1.5 full time for a while to see how the new version fares on memory management. Carl swears by Camino (Mac only), but I just don’t see its value without all the cool plugins Firefox enjoys. I am also tempted to switch to Thunderbird since Apple Mail has been doing a piss poor job on filtering out the latest junk mails. Ah~ Open Source…

Email Time Capsule

Thursday, December 1st, 2005

Forbes.com is running an interesting story on “Email Time Capsules”. I wish I’d thought of something like this for my thesis project. It’s a cool article nonetheless.

It’s one thing to have a physical time capsule where you can access it later. But it’s quite different to preserve things digitally, mainly because technology changes quite rapidly that you just don’t know if the technology in 20 years is going to be able to access what you tried to preserve 20 years ago. Some museums are trying desperately to find ways to preserve their digital art collection. Wired also has an interesting article on the subject. Here’s another article on the subject of digital art’s longevity (or lack thereof?).

via [Forbes.com]