Archive for the ‘Linux/Unix’ Category

Minor Server Hiccups

Sunday, March 25th, 2007

After we moved all the data from our old Texas ServerBeach machine to the new one in L.A., the new server kept on rebooting itself sporadically. Loz and I monitored and went through the logs for almost two days but couldn’t find anything wrong with it (especially after Loz installed a couple of nice monitoring software). Let me tell ya, having a server that reboots itself whenever it wanted to was stressful.

Good thing the tech support guys at ServerBeach did their thing and swapped out the box for us within an hour of submitting a support ticket. And then 40 minutes after that, we were back in business. I gotta say, I agree with Lawrence, ServerBeach has been pretty good with the kind of service we’ve received so far!

On a similar note, I had a client whose dedicated server was (and I assume still is) hosted with EV1 Servers (now part of The Planet, a company Loz and I were thinking about using but went with ServerBeach instead). And their service was just awful. I received more support from peer users in their discussion board than from EV1’s tech support (all I got was a templated response which offended me quite a bit for the kind of money my client was paying them).

Life is good again.

Pushing Vista

Thursday, February 22nd, 2007

In a move to push sales, the Devil Microsoft apparently is using an interesting tactic to dump Windows Vista on consumers…

Though I have no way of verifying this report, I am sure that in the coming weeks, I can expect to see systems, no matter how low end and ill equipped, are going to be shipped with Vista despite analysts’ warning on how little value it brings to the PC computing platform. On the other hand, I think this is also a matter of economics for most PC manufacturers. The more computers they sell with Vista pre-installed, the cheaper they can get Vista for in bulk. An since Vista is such a buzz word now, it helps to slap that OS on all shipping PCs to qualify for a cheaper volume rate from Microsoft.

I suppose this is another reason why Linux, by the virtue of economics, is doomed. It gives no incentive for PC manufacturers to ship systems with Linux when they can put on another copy of Vista to get better overall rates from Microsoft! Oh, the irony.

Where’s that cat from Apple again? I am ready for it…

VNC on Fedora Core 6

Thursday, November 2nd, 2006

Setting up VNC on a Linux box is always such a hassle. But I had to do it again today so that I don’t have to deal with two sets of mic and keyboards when I am testing my work in VMWare.

Thank goodness for this article that I saved a bunch of time having to figure things out myself. Maybe in the [always] good old college days, I’d have done that. But now time is of utmost importance with an active child in the house and all…

The only hiccups I got was that the above setup failed to discuss the issue with firewall and iptables. To allow outside access (even within the same home network), a port must be open to allow the traffic to flow through. There are a couple of ways to do that:

Adding a rule through a GUI in Gnome:

1. Go to System -> Administration -> Security Level and Firewall
2. (enter the appropriate password when prompted)
3. Under the Firewall Options tab, click on the white arrow at the bottom that’s labeled Other ports
4. Click on Add and enter the port number you are allowing access; in my case, it was 5902 for display number 2. (Leave the protocol at default, which should be tcp
5. Click OK all the way out, and iptables should have been restarted with the rule in place

A geekier way to do it is through command prompt:

1. sudo vi /etc/sysconfig/iptables
2. Add the following line to the rule:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT
3. Restart iptables by issuing:
sudo /etc/rc.d/init.d/iptables restart

Another thing that many Linux novice (like myself) don’t quite grasp is the fact that Linux’s GUI is not at all tied to the operating system. You can have Gnome, KDE, Flux or Blackbox as GUI options installed on the same OS. And you can switch around as you please upon setting the preferred desktop and log/in again. When you are viewing the remote system through VNC, you can do exactly the same thing — you can define what type of GUI you want to see as you launch your preferred VNC viewer client:

Edit /home/_vnc_user_name_/.vnc/xstartup as such:
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" -e ./menu &
#twm &
#fluxbox &
gnome-session &
#startkde &

Noticed I commented out (#) some desktop GUI options at the bottom except Gnome. Basically you can use any one of them anytime as long as you restart the vncserver after you’ve made the changes.

Upgrading to Fedora Core 6

Thursday, November 2nd, 2006

I finally got around to upgrading my Dell to Fedora Core 6 using yum. My last attempt failed pretty miserably mainly because of some stupid package dependencies I couldn’t figure out how to resolve (something to do with initscripts, which was kind of what happened in my attempt to upgrade from FC4 to FC5). So instead of dealing with it, I simply shut it up… Here are the steps:

1. me@localhost$ rpm -ev fedora-release --nodeps
2. me@localhost$ rpm -Uvh [url-to-fc6-release-notes]
3. me@localhost$ rpm -Uvh [url-to-fc6-release]
4. me@localhost$ yum clean all
5. me@localhost$ yum -y update

By step 5, everything should’ve gone flawlessly, except, again, Fedora threw a fit on dependency problems such as bg5ps, gtkhtml and a couple of other packages. Again, instead of dealing with resolving them, I just removed them:

1. me@localhost$ yum remove bg5ps
2. …. (repeat step 1 until all problematic dependencies are removed)

Then everything was good. And as it turns out, the new kernel that came with FC6 (2.6.18-1.2798.fc6-i686) is capable of handling dual cpu systems, unlike kernels before that where I had to specifically update multi-processor capable kernels (kernel-smp). I wasted about 20 minutes trying to find/update something that never existed!

Finally, after reboot, I got my nice FC6 all up and running. Life was good except now VMWare refuses to launch. So I had to reinstall it because of the new kernel I installed. Unfortunately, VMWare couldn’t locate the new kernel’s c header library (usually installed at /usr/src/`uname -r`/include). But it wasn’t there!!! Even though I had the latest kernel, its c header library still could not be found! After some research, I finally was able to resolve that by force installing kernel and kernel-devel rpm files:

me@localhost$ rpm -Uvh --force [url-to-kernel-rpm-package]
Issue the command above for both the current kernel and kernel-devel

Once VMWare got its kernel c header library, it was happy. And life was good again….

My next project with that machine is to upgrade its CPUs with a couple of nice Pentium 3 Slot 1 modules at the maximum clock speed the machine can handle (which is at around 1.1Ghz — fast compared to 450mhz I currently have). These types of CPUs are pretty hard to come by because Intel abandoned Slot 1 architecture a long time ago.

Fedora Core 6 upgrade made possible by this discussion thread at fedoraforum.org. VMWare troubleshooting and resolution made possible by this discussion thread on VMWare’s community site and this discussion thread on fedoraforum.org.

More Geek Talk

Friday, October 27th, 2006

Mike Neely discovered something pretty freaking awesome: It’s called Meebo. It’s basically Adiumx (or Trillian for you Windowz folks, gaim for you Linux dorks) except it’s web based. It supports quite a bit of stuff that you are accustomed to using desktop apps.

Speaking of apps, Neely revealed the other day that he’s doing some cocoa programming! I am so envious of him having the initiative and drive to pick up cocoa/objective-c. This reminds me that I ought to get back into desktop programming!

While I am on the topic of “desktop” programming, I tried upgrading my Fedora Core 5 to the latest Core 6 last night but failed. I guess it’s too new that various issues aren’t widely discussed yet (bless Google). I’ll probably give it another try another time. Strangely though, the audio in FC5 just magically started working all by itself — I spent days downloading and compiling various drivers for it to no avail. And that piece of sh*t just decided to work all of a sudden? WTF?! This is yet another reason Linux is far from being ready for mainstream consumption — lack of usability for everyday-users.

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)

The Blast from the Past

Wednesday, June 14th, 2006

Being in the web development business, it’s plain impossible to develop sites without having to check your work in Internet Explorer for bugs (not that my code is buggy, but that Internet Explorer rendering engines are simply not compliant to standards). So I finally broke down, booted up my Fedora Core 4 Linux on my 6-year-old Dell (running dual Pentium 3 @ 450Mhz!), fussed with VMWare and finally managed to install Windows 2000 and Windows XP.

Oh, how I dreaded having to touch Windows again having stayed away from it for almost a year and a half. Just the installation of Windows 2000 felt like playing with Mac OS 9 again… So primitive and ancient. I especially “loved” the restarts after each service pack, patches to service packs and then hotfixes to the patches that were originally released to fix the service packs… etc. I wasted an entire evening just installing and patching Windows in VMWare. Nothing says “I love my life” like wasting time installing Windows OS!

The upside, though, is that I can perhaps install Internet Explorer 7 beta to see what the fuss is all about (yoohoo! Tabbed browsing… only 2 years late!)…. And then maybe if I feel adventurous enough, I’ll even download Windows Vista Public Beta and try to install it in VMWare (which I doubt will even install given that both the host and guest hardware are pretty damn old… even if by some miracle Vista installs, it’d probably take a few hours just to boot up… ha!).

I hope this is the last time I’ll have to deal with installing Windows ever again…

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.

RHCE Links

Tuesday, November 1st, 2005

As part of prepping my next “career move”, I was looking into getting a RedHat Certified Engineer certificate to match what my resume says I know. I found a site that has quite a number of useful links.

Having a fine art degree in computer art, worked in a (practically failed) education technology start up with a diversified (but not professional) knowledge in a bunch of stuff don’t really prepare me for any kind of position really. Everywhere I looked, people are looking for hardcore specialty expertise in one area or another, especially in Silicon Valley. Maybe our luck will soon run out as everything in the bank will be depleted in no time.

Everybody dreams of a beaufiful American Dream. But sometimes it’s holding on to the illusion of such dreams that’s hard to let go.

Original Unix Lab Dismantled

Sunday, August 21st, 2005

The original lab that invented Unix at AT&T has officially been shut down. This very team started it all: FreeBSD, OpenBSD, HP HP-UX, Compaq Tru64, Linux (RedHat, Debian, Slackware, Gentoo… etc), SCO Unix, IBM AIX, Sun Microsystems Solaris, SGI IRIX and then of course, Mac OSX, all of which derived from the original Unix conceived at the Bell Labs.

And then there is Microsoft, DOS and then Windows (3.1 through XP), the legacy Mac OS, and let’s not forget OS/2. There are others that never made it to the mainstream, but who cares.

After looking at this large list of Unix operating systems v.s. the rest, it’s a no brainer that Apple decided to go with a Unix-based strategy to capitalize on its maturity and stability.

Discover Your Roots

Wednesday, July 27th, 2005

Linode logo Kyung got me hooked on Linode a while ago. The company offers a virtual private server (aka virtual dedicated server) service that’s actually pretty amazing. It basically takes a server, divide it up into multiple mini-servers and provides root access to its customers within the perimeter of the VPS. Unfortunately I only know of services that provide Linux-based VPS for public use. Linode stood out for me because it offers a good variety of Linux flavors to choose from. For Windows, I believe VMWare or Microsoft’s newly acquired VirtualPC do similar tricks for enterprise level operations.

Linode is probably the best way for to really have a stab at Linux. Its installation process takes literally minutes. So that means, if I ever screw up the server, I can simply reinstall everything within minutes instead of hours usually associated with home-built machines.

Another unique thing about Linode is that it’s based on User Mode Linux (open source) as opposed to Virtuozzo, which is a more popular (but not free) platform.

There are several companies that offer VPS. However, a few were getting a lot of buzz when I was researching for a good VPS service:
Dinix
JVDS
Rimuhosting

I believe the above services are Virtuozzo based and do not have as many variety of Linux installs to choose from. I am sure there are at least a dozen more companies out there. But based on what I’ve read at the time, the above companies came highly recommended via several forums.

I eventually had to stop using Linode because of resource issues. The plan I was able to afford didn’t come with enough resources for me to sustain a fairly high load. But otherwise, Linode was great. If anyone ever wants to build a home-grown “Linode”, tutorials can be found here and here.

I wish there was a company that offered VPS for Mac OSX though. This is one of those times when being a Mac user sucks.

Exposé for the Non-Macs

Wednesday, July 20th, 2005

Apple’s Exposé (more info here) was probably one of the most important windows management breakthroughs since “Alt + Tab”. Not too long after Apple released it along with Panther, developers soon found ways to simulate the effects in Windows.

Case in point:

On the Opensource side, developers haven’t been standing idle. They also have come up with remarkable apps with similar tricks.

Before we jump the gun and accuse everyone else for stealing introducing Apple’s innovations in other platforms, I must confess that I first saw an Expos%uFFFD-like functionality on a Linux system even before the introduction of Panther. And according to this document at Microsoft’s very own UI Research lab, a similar functionality had been in existence long before Mac OSX. Unfortunately the project just never made it to various releases of Windows.

Fold n' Drop windows

Now let’s take it a step further and examine some up and coming technologies. First up is Fold n’ Drop project from a French lab. The idea is to treat windows as pieces of paper. A user can fold, flip and leaf through them. There’s demo video and a Java demo app you can test it out. Very neat. And someone’s already made it work on a Windows Machine.

Project Looking Glass

Another pretty cool application is from Sun Microsystems. Porject Looking Glass manipulates the Desktop and its windows each as 3D objects. It has features even a Mac user will envy. I was hoping to see some of them to be implemented in Tiger.

A demo is available for playback.

Other emerging implementations:

I am sure there are plenty more advanced UI projects in the labs. If anyone knows any that’s not here, please do share them with me.

Speaking of emerging technologies, IBM’s “alphaWorks: Emerging technologies” website has been in my bookmarks for the longest time. It’s a site that features the latest technologies at IBM labs that are available for licensing.