Archive for category Linux/Unix

Sad day in the UNIX word – R.I.P. Dennis Ritchie

Yesterday was a really sad day in the UNIX world and in the technology world in general. Dennis Ritche, the creator of the C programming language and co-creator of the UNIX operating system (fundamentally the best operating system in the world) sadly passed away. Comparing Dennis Ritche to the also recently deceased Steve Jobs is like comparing apples and oranges (intellectually it is not fair to compare a scientist to a salesman). Both were part of the computer revolution as we know it. However in my eyes, Dennis Ritche had a far more greater impact in the technology world than Steve Jobs. The simple fact that practically all of UNIX/Linux; all core internet applications like Apache and BIND, MySQL and PostgreSQL, and all modern scripting languages are all written in C, is absolutely amazing. Unlike the media coverage that was made on Steve Jobs death, it is an absolute shame that the majority of people do not know who he was and not know the amazing work that he did. May he rest in peace, as his work and legacy will live forever.

“UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity.”
– Dennis Ritche


#include <stdio.h>
main ()
{
printf("Farewell\n");
}

Immediate things to do after installing FreeBSD


FreeBSD is quickly becoming my favorite server operating system. However, comming from the GNU/Linux world, there are certain things that Linux distributions and Mac OS X to a certain point provide that are not available on a default FreeBSD installation. The most notively are the default shell and text editors. The default shell for standard users is /bin/sh (NOT BASH!) and for root is the C-Shell. While vi is indeed installed on a default FreeBSD installation, it is not the vim (vi improved) that I’ve learned to enjoy and love all these years.

Therefore anyone wanting to fully enjoy a modern Unix system should install both bash and vim on there systems. Thanks to the FreeBSD ports collection, installing these two applications is really simple.


[root@freebsd01]# cd /usr/ports/editors/vim
[root@freebsd01]# make install clean
[root@freebsd01]# rehash


[root@freebsd01]# cd /usr/ports/shells/bash3
[root@freebsd01]# make install clean
[root@freebsd01]# rehash
[root@freebsd01]# chsh -s /usr/local/bin/bash tony
[root@freebsd01]# chsh -s /usr/local/bin/bash root
[root@freebsd01]# ln -s /usr/local/bin/bash /bin/bash

Why Oracle is a bigger threat to Free Software than Apple and Microsoft

Kplice is a really cool technology that let you update a Linux system without having to restart the machine, which in a server environment this is absolutely critical since this will eliminate or minimize server downtime. Even though the software is GPL licensed. I was shocked to hear that Oracle had purchased the company behind Kplice and are now dropping Kplice support for all non Oracle Linux systems. This is absolutely incredible given that Oracle Linux is essentially a fork of Red Hat Enterprise Linux. Oracle is not even making the effort to continue supporting Ksplice on other Linux systems. In my eyes, this is far more worse than bitting the hand that feeds you. In terms of tech companies, as far as I know, I haven’t heard of any other multibillion corporation that literately stoled the product of another company, claim that their product is superior, and make completely anti competitive decisions.

This is why the beauty of the the GNU Public License flourishes over any other software license, at least now we in the free/open source software community can foresee a fork of Ksplice in the near future.

Official Oracle KSplice acquisition FAQ:
http://www.oracle.com/us/corporate/Acquisitions/ksplice/faq-450488.pdf

Tags:

JavaScript Linux PC Emulator

Is just freaking awesome.
http://bellard.org/jslinux/

Ubuntu 11.04 on my Acer TimelineX 1830T-1327

After yet another flawless Ubuntu upgrade, I  am finally seeing why there is a big hype regarding Unity. Prior to this upgrade I was hesitant in upgrading to Ubuntu 11.04 because of the negative reviews Unity was getting from different podcasts, however after a full day after the upgrade and a few hours using Unity, I have to say that I completely love the new Unity UI. As a joint Mac OS X and Linux user, I feel that the new Unity User Interface is a perfect combination of both worlds. Though I might say that I’m somewhat concern that Apple (given the record they have) will end up suing the Ubuntu project given some similarities Unity has to OS X.

 

Overall I think the new Unity Ubuntu desktop change is well worth it, and unlike the KDE4 upgrade from KDE 3.5 a few years ago, Unity seems to be rock solid.

The only problem that I had with Ubuntu 11.4 was getting my wireless card to work on the new version, lucky I stumble across a German forum board where somebody successully got it to work.

 
sudo rfkill unblock all
echo 'options acer_wmi wireless=1' | sudo tee /etc/modprobe.d/acer_wmi.conf

reboot and wireless should start working!!!

http://www.ubuntu-forum.de/artikel/56410/wlan-problem-broadcom-bcm4312.html

Tags: , , ,

Installing MySQL GUI Tools in Ubuntu 10.10

      Download Generic x86 tarball from http://dev.mysql.com/downloads/gui-tools/5.0.html

      mv mysql-gui-tools-5.0 /usr/local/

        Create symlinks to PATH location:

        ln -s /usr/local/mysql-gui-tools-5.0/mysql-query-browser-bin /usr/local/bin/mysql-query-browser-bin
        ln -s /usr/local/mysql-gui-tools-5.0/mysql-query-browser /usr/local/bin/mysql-query-browser
        ln -s /usr/local/mysql-gui-tools-5.0/mysql-administrator /usr/local/bin/mysql-administrator
        ln -s /usr/local/mysql-gui-tools-5.0/mysql-administrator-bin /usr/local/bin/mysql-administrator-bin
        Create symlinks to /usr/local/share

        ln -s /usr/local/mysql-gui-tools-5.0/locale /usr/local/share/locale
        ln -s /usr/local/mysql-gui-tools-5.0/mysql-gui /usr/local/share/mysql-gui
        Almost done..
        At this point mysql-administrator should be fully working.
        However with mysql-quer-browser, I received a shared library dependency “libgtkhtml-2″ error, when ever I tried to start it. It turns out Ubuntu 10.10 has libgtkhtml-3.14 installed. Manual download and install libgtkhtml-2 needs to performed since it’s no longer in the Ubuntu Universal repositories for 10.10.
        http://packages.ubuntu.com/lucid/i386/libgtkhtml2-0/download

        tony@acer01:~$ mysql-query-browser
        /usr/local/mysql-gui-tools-5.0/mysql-query-browser-bin: error while loading shared libraries: libgtkhtml-2.so.0: cannot open shared object file: No such file or directory

        dpkg -i libgtkhtml2-0_2.11.1-2ubuntu3_i386.deb


      Tags: ,

Ruby cli_mailer

After much nights of Ruby programming and many revisions, I finally manage to have an beta release of Ruby cli_mailer.

I originally planned on writing a full mail (Unix command line email client) like program in Ruby. Though I was able to have an almost identical console interface to mail’s reading, viewing, and deleting emails, using POP. I was having a really hard time, keeping the connection alive after a certain number of seconds after initiating the connection.

So instead of having the incoming POP email client like usage that mail provides, I instead wrote the application to only support the mail sending features almost similar to mailx.

I would think developers or anyone wanting to send email from a Linux/Unix server without the hassle of sendmail, postfix, exim, etc… may find this simple program useful. I know I do, since I always find myself wanting to easily send emails from the command line whenever I’m using or doing some sort of testing on a Virtual Machine.

If you’ve ever used mail on a Linux/Unix system to send email messages, Ruby cli_mailer is practically identical.

Basic Usage:
Will get prompt to write email message that gets sends to root@rubyninja.net and blinds copy ccemailaddress@rubyninja.org

rcli_mailer.rb -s 'Title of message' -c ccemailaddress@rubyninja.org root@rubyninja.net

Will email the contents of sendmail.cf to root@rubyninja.net

cat /etc/mail/sendmail.cf | rcli_mailer.rb -s 'God help me' root@rubyninja.net


rcli_mailer.rb -s "I'm so sorry" -c jrsysadmin@rubyninja.net root@rubyninja.net < /etc/postfix/main.cf

NOTE: Ctrl-D is NOT supported by Ruby cli_mailer at the moment, you'll need to use the '.' (dot) character
to send the email message.

I tried to make Ruby cli_mailer as moduler as possible, since I'm planning adding the project to github, and I already have in mind more features to add into it.

Enjoy :-)
rcli_mailer-01.tar.gz

Documentation
rdoc

Tags: ,

Acer TimelineX 1830T-1327

Unfortunately the fan noise on the MSI Wind u100 netbook was unbearable, thus I was force to sell my netbook. I love my MacBook Pro, but even at 13 inches, I at thought at times that it was to bulky to carry around on my man purse. I was seriously looking on purchasing an 11 inch MacBook Air, but the price was just to high for the hardware that I’m getting. I researched some of the 11 inch Dell notebooks/netbooks, but it appears that Dell is selling them with AMD chips. Given the long and bad history that I’ve had owning laptops with AMD chips in them, I was forced to look elsewhere.

On my weekly visit to Microcenter I saw the Acer TimelineX on display and immediately tarted analyzing its specs. At $699 with an Intel Core i5 (1.2Ghz), 4 GB DDR3 RAM and a 500GB 5400 rpm, I decided to buy the notebook that same day with even without researching its Linux hardware compatibility. The laptop came with Windows 7 Home Edition, so immediately once I powered up the laptop I installed Ubuntu.

With Ubuntu, the only problem that I had was getting the wireless to work. This was something that didn’t surprised me given that the laptop has a Broadcom wireless chipset. Luckily, enabling the restricted wireless driver got the wireless working. The laptop runs dead silent and haven’t problem hibernating and resuming on the computer. The only quirk when resuming back, even from screen saver, is that I have to manually trigger the keys to turn on the wireless card. Other than that, this little computer runs Ubuntu really well and at half the cost of a MacBook Air!!

Also, I have the ability to upgrade to 8 GB’s of RAM and add an SSD drive if I decide too, can MacBook Air owners do that? haha…

Phusion Passenger = good stuff

While mod_ruby is perfect to serve dynamic Ruby web pages, the project looks like its long dead; given that it hasn’t been updated for over 4 years now. Now the de facto way to deploy Ruby on Rails applications is Phusion Passenger. Compared to mod_ruby, configuring the Phusion Passenger (mod_rails) Apache module is ridiculously easy to do. Essentially all I had to do is download and install the gem.

The only quirk, which was entirely my fault for being lazy, was not reading the portion of the documentation where it mentions that the default environment is set to production. This gave me quite a headache as I couldn’t figure out why I had to restart Apache every time I modified any controller code (RoR noob).

My fix:
.htaccess
RailsEnv development

I’m amazed on Phusion’s work, the company responsible for the module. As they’ve take something that’s been historically difficult to deploy (at least I think) and made it really simple.
http://www.modrails.com/

watch command line utility for alternative for Mac OS X: (Solved by MacPorts)

Since I use all Apple Mac OS X as my primary desktop operating system of choice, I wrote a ruby script ago that mimics the GNU/Linux watch command on OS X a couple of months ago (watch.rb). Little that I knew that the watch package is available within MacPorts.

In short MacPorts is an free and open source package management system built into OS X. (Essentially the BSD UNIX port system). The awesome thing about MacPorts is that it lets you install traditional UNIX userland applications that are not included by default by OS X like wget, and watch.
http://www.macports.org