0

Kubuntu is better than Fedora after all

I replaced Fedora with Kubuntu on my laptop yesterday. After experiment with the KDE interface on Kubuntu, I think that Kubuntu is better than Fedora for the following reasons:

  • Flash is easy to install

According to several online tutorials, x86-64 Fedora users need to first install 32-bit support packages, and then install Flash plugin. After that, the users also need to worry about other Flash player issues, including no sound in the Flash movies. When I was using Fedora, I simply downloaded the incomplete Flash plugin for Linux from Adobe website and copied it to .mozilla/plugins in my home folder. Every time I reinstalled Fedora, I used this method to install Flash plugin. And it worked successfully each time without any issue.

In Kubuntu, I no longer need to download Flash plugin through Adobe website. I simply install it from the KPackage user interface. It installed and also worked without any issue.

  • Excellent NVIDIA driver

To install NVIDIA driver in Fedora, I need to add RPMFusion repo. However, after installing the RPMFusion version of the NVIDIA driver, it appeared that Second Life doesn’t support it. I then need to download the appropriate driver from NVIDIA website, exit the X Server, and installed the driver from the command line.

With Kubuntu, all I need to do is install the proprietary NVIDIA driver through Hardware Drivers detection window.

  • Second Life is ready to run without installing additional packages.

I needed to install a list of 32-bit packages in Fedora in order to run Second Life that is only available under 32-bit. After the installation, it still missed a lot of features like voice communication through microphone.

After the installation of Kubuntu and NVIDIA driver, Second Life are running smoothly without any problem. Even the voice communication feature is working correctly.

  • Dual-monitor support works out-of-box

Thanks to the help of Nouveau, Fedora supports dual-monitor without any issue. But the Nouveau driver does not support 3D grapics yet. Because of that, I disabled Nouveau driver in grub.conf file and installed proprietary NVIDIA driver. However, Fedora didn’t enable the dual-monitor support by default anymore. I need to manually enable the feature through nvidia-settings.

After the installation of Kubuntu, the Hardware Drivers dialog box automatically popped up to remind me that I need to install NVIDIA driver. I installed the driver and restarted the laptop. Kubuntu automatically detects my two monitors and expand the desktop across these monitors.

In the end, I like Kubuntu better than Fedora. However, I’m still getting use to the single click method in KDE. After all, maybe I will stop following Fedora news and completely switch to Kubuntu community.

0

Began Long-Term Usage of KDE

As a Fedora user since switched to GNU/Linux almost two years ago, I haven’t tried any other GNU/Linux distros besides Fedora. Although I tried KDE interface of Fedora for some times before, I always switched back to GNOME because my familiarity of GNOME interface.

Today I decided to switched from my long-time used Fedora to the more popular Ubuntu distro. I began by backup all the files in my home directory, created an Ubuntu live USB using UNetbootin and Ubuntu live CD, and installed it. It all went well until I installed VLC player and played a video file. It didn’t display any video image other than audio. As a result, I reinstalled using Kubuntu live USB. Once it was installed, I installed VLC and tested it with the same video file. This time, it was audio problem. Luckily I found the solution. For unknown reason, the PCM slider in the sound mixer property was set to mute. I also installed Choqok for work with identi.ca and Twitter. I think Choqok is better than Gwibber because of the new messages counter feature and convert the emoticons to the real pictures. For some reason Gwibber crashed each time while starting in the KDE environment. As I am almost like a new KDE user, I have to learn where to configure the specific settings. For instance, I wanted to change default browser from Konqueror to Firefox. I learned that this configuration is inside Default Applications of System Settings window.

I have begun to like KDE as I learn more and more tricks on how to using KDE. Therefore, I decided that I will continue to use Kubuntu on my laptop for home use, as well as Ubuntu on my netbook for school use. As for Fedora, I will compare new features of the newest version of both distros have when they come out later this year. Then decide whether or not I will switch back.

0

An inspirational Talk by Linus Torvalds

As you may already know, Linus Torvalds is the creator of Linux kernel. He began writing code for Linux kernel in 1991. Today I found and watched an hour-long talk by Linus Torvalds on YouTube hosted by the Computer History Museum. As a computer science student and a web developer, it has taught me not to give up an project and continue to improve my programming skills quickly. You can watch the whole talk below or click the following link to go to YouTube to download it using Download Helper:

http://www.youtube.com/watch?v=WVTWCPoUt8w (Note that the description is incorrect, it states Linux OS instead of Linux kernel. I recommend you to watch the full talk, DO NOT rely on video description.)


The Origins of Linux – Linus Torvalds

0

Use Samba to Transfer Files between Fedora and Windows XP

Samba is a GNU/Linux network service that provides file sharing between GNU/Linux and Windows. One week ago, I switched my netbook from Ubuntu back to Windows XP thanks to the Google Earth plugin. I need to use Google Earth API for my ColdFusion class and it needs Google Earth plugin to test the API code. However, the Google Earth plugin doesn’t have a Linux version yet despite the popularity of Google Chrome and Google Earth on GNU/Linux. I initially thought that Google Earth plugin could work on virtualized Windows XP through VirtualBox. It failed to display the data due to the low performance of VirtualBox graphics card.

Anyway, to use Samba, you need to first install it by entering the command below to the terminal:

sudo yum install samba samba-client samba-common samba-swat

After the installation, I followed a helpful tutorial on linuxhomenetworking.com to complete the Samba setup. It provided me step-by-step instructions to setup the Samba server using SWAT web interface.

I use Asus Eee PC 1005HA, which means that it has Windows XP Home Edition. The instructions for this tutorial on how to connect Samba server with Windows XP Home confused me. I was never able to connect to the server based on it. Fortunately, I found a post on linuxforums.org that discusses about the same issue. According to the discussion, the firewall must be disabled to allow Samba to accept the connection. This inspired me to enable the Samba and Samba Client ports in Firewall setting without completely disable the Firewall. This prevents any unnecessary security issues. Windows XP successfully connected to the Samba server without any problem.

I have not yet tested with transferring files from Windows XP back to Fedora directly on Fedora, but I think it’s the same technique. Some of the Samba server security concerns would rise if Samba is used on a non-password protected network. According to the article on linuxhomenetworking.com, you need to setup a local HTTPS Certificate for the Samba server if you have any security concerns. I don’t need the certification because I only use the sever on the home network and the network is password-protected.

0

10 Free and Open Source Productivity Tools for GNU/Linux

There are many productivity tools for GNU/Linux other than OpenOffice.org, KOffice and other office-related productivity tools. Here are the overview of 10 of the productivity tools available on GNU/Linux:

  1. Tomboy
    • A note-taking application
    • Useful for project research, create a to-do list, and other related tasks
    • Create notebooks and organize the notes by category
  2. Hamster
    • A time-tracking GNOME applet
    • Sort activities by category
  3. Kexi
    • A database management application
    • Similar to Microsoft Access
    • Support .mdb Import
  4. Referencer
    • Organize research documents
    • Write bibliography
    • I recommend Zotero Firefox plugin for use with Firefox to assist with research
  5. PDF Mod
    • A simple PDF editor
    • Add, edit, and reorder pages
    • NO annotate and edit text features
  6. Okular
    • Universal Document Viewer
    • Annotate each files
  7. Planner
    • Simple Project Management application
    • features task allocation
  8. Kcontact
    • Personal Information Manager (PIM) suite
    • Bundle of KDE Productivity tools
    • Includes KMail, KAddressBook, KJots, KOrganizer, and others
  9. gLabels
    • Contains number of business card and label templates
    • Includes CD labels and floppy labels
    • Includes a template designer to create own templates
  10. Kivio
    • A flowchart and diagram application
    • Can export to JPG, PNG, and BMP

For more information about these tools, please read the original article.

0

Using jQuery UI with Google AJAX API

jQuery UI is an User Interface library based on jQuery JavaScript framework. It has cool effect such as make the layers on the web pages draggable and resizable, add dialogs to the page, and add auto-complete feature onto the page. Recently, I noticed that some websites use Google to get the jQuery framework and its UI library. After I googled it, I found out that it is included with Google AJAX API along with other JavaScript Framework such as Prototype and SWFObject. To use it, I need to set up an API key for my domain in order to use Google APIs. Then I added two google.load() functions between the script tag before the body tag.

google.load(“jquery”,1);
google.load(“jqueryui”,1);

Note that the second parameter is the version number. I placed version 1 since both jQuery and jQuery UI are at version 1 and it automatically gets the latest version of version 1. Unfortunately,when I’m testing out with this new import method using Google, the resizable() function of jQuery UI did not work. I found out that I need to either create my own stylesheet for the jQuery UI by using jQuery UI’s ThemeRoller, or import the CSS file from Google.

<link rel=”stylesheet” type=”text/css” href=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css” />

Note that you need to host your own CSS file if you want to customize the page style.

Google provides an easier way to integrate jQuery and jQuery UI to web pages. This allows me to have latest version of both frameworks without downloading needed files.

0

Interact with Basic Text Files With PHP

Today I read a tutorial on how to add a basic page traffic counter into the web pages using PHP at webdesign.org. During the practice of this tutorial, I began to interested in the PHP file manipulation. Therefore I found a great PHP tutorial site that talks about basic file manipulation method with PHP.

After reading the tutorial and experimenting with file manipulation using PHP, I learned a lot about some of the related PHP functions:

  • fopen opens or creates the file if it’s not in specified directory.
    When I first used this function, I encountered a file access error. I had to set the permission for the specified folder to 777 by using command chmod -R 777 /path/to/the/folder/ under GNU/Linux.
  • fread reads the content of the file.
  • fwrite writes the content to the file.
    Note that if the second parameter of fopen is set to “w”, the fwrite function will overwrite the content in the file with the new content. However, the new content will be merged into the file if the second parameter is set to “a”.
  • unlink deletes the file from the directory.
    According to the tutorial, all of the files in the OS are the “links” to the system. If “unlink” a file from the system, it will forget the file and delete the file.
  • fclose closes the file.
    Note that the file must be closed using this function before it could be deleted using the unlink function.

During my practice of the PHP file manipulation, I want to using shorthand method for if…else statement to shorten the PHP code. I searched over the Internet and learned that the format of the if…else shorthand method is (condition) ? true : false. Here is the code I wrote using the shorthand method:

$fname = (empty($_POST['fname']) ? “” : $_POST['fname']);
$lname = (empty($_POST['lname']) ? “” : $_POST['lname']);
$email = (empty($_POST['email']) ? “” : $_POST['email']);
$test = “test.txt”;
$writeContent = “First Name: ” . $fname . “nLast Name: ” . $lname . “nEmail: ” . $email;
$fileWrite = fopen($test, ‘w’) or die(“can’t open file”);
$writeSuccess = fwrite($fileWrite, $writeContent);
fclose($fileWrite);
echo (!empty($fname) ? “Form submitted.” : “”) . “<br />”;

I think that the shorthand method only allows one statement in each if…else statement to be executed. This means that it has to have only one true statement and one false statement.

I have learned the basics of file manipulation using PHP. I will continue to learn how the file manipulation works in PHP. Eventually I will be able to create documentation in any formats on the fly using PHP.

0

Learning HTML 5 Canvas

Recently, I’m interested in learning about the use of HTML 5 canvas element. The canvas element in HTML 5 simply uses JavaScript to draw pictures and animations, as well as develop games. It basically uses setTimeout or setInternal JavaScript function to create an animation in the canvas element. This feature is available on all modern browsers, except Internet Explorer.

I followed some basic tutorials on the Mozilla Developer Center website and created the simple image below:

Click the image to enlarge

I wrote the following JavaScript statements to form the picture above:

var ctx = canvas.getContext(“2d”);

// Background
ctx.fillStyle = “rgb(200,255,50)”;
ctx.beginPath;
ctx.rect(0, 0, 500, 500);
ctx.closePath();
ctx.fill();

// Face
ctx.fillStyle = “rgba(125,222,152,0.5)”;
ctx.beginPath();
ctx.arc(200,150,100,0,Math.PI*2, true);
ctx.closePath();
ctx.fill();

// Left eye hair
ctx.fillStyle = “#000″;
ctx.beginPath();
ctx.moveTo(170, 75);
ctx.arc(160,75,10,0,Math.PI,true);
ctx.stroke();

// Left eye
ctx.fillStyle = “#000″;
ctx.beginPath();
ctx.moveTo(170, 85);
ctx.arc(160,85,10,0,Math.PI*2,false);
ctx.closePath();
ctx.fill();

// Right eye hair
ctx.fillStyle = “#000″;
ctx.beginPath();
ctx.moveTo(250, 75);
ctx.arc(240,75,10,0,Math.PI,true);
ctx.stroke();

// Right eye
ctx.fillStyle = “#000″;
ctx.beginPath();
ctx.moveTo(250, 85);
ctx.arc(240,85,10,0,Math.PI*2,false);
ctx.closePath();
ctx.fill();

// Nose
ctx.fillStyle = “rgb(0,0,255)”;
ctx.beginPath();
ctx.moveTo(190, 120);
ctx.lineTo(210, 120);
ctx.lineTo(200, 140);
ctx.closePath();
ctx.fill();

// Mouth
ctx.fillStyle = “#FF0000″;
ctx.beginPath();
ctx.rect(150, 170, 100, 50);
ctx.closePath();
ctx.fill();

// Body
ctx.beginPath();
ctx.moveTo(200, 250);
ctx.lineTo(200, 400);
ctx.closePath();
ctx.stroke();

// Left Arm
ctx.beginPath();
ctx.moveTo(200, 325);
ctx.lineTo(130, 340);
ctx.closePath();
ctx.stroke();

// Right Arm
ctx.beginPath();
ctx.moveTo(200, 325);
ctx.lineTo(270, 340);
ctx.closePath();
ctx.stroke();

// Left Leg
ctx.beginPath();
ctx.moveTo(200, 400);
ctx.lineTo(130, 450);
ctx.closePath();
ctx.stroke();

// Right Leg
ctx.beginPath();
ctx.moveTo(200, 400);
ctx.lineTo(270, 450);
ctx.closePath();
ctx.stroke();

As I commented out the code for creating various parts of the image, the basic code structure for each part is very easy to understand. The getContext function on the first line of the code is to get the dimension of the image I’ll be creating. The fillStyle function is to give shapes different colors. The beginPath function begins with a new shape. The rect function is to draw a rectangle on the page. The closePath function is to connect the lines together to form a shape. If you want to draw multiple lines that don’t connect together, you simply don’t put the closePath function at the end of the process just like I did to the left and right eyes hair. The fill function simply fill the shape using the color specified in the fillStyle function. The arc function draws an arc on the page. You can draw a circle using this function as well. The lineTo function draws a line on the page.

You can read more about these functions as well as other functions that used on the canvas element at WHAT Working Group website.

0

Anigma, an online game created Using CSS 3 and JavaScript

As a web developer, I think playing games is a waste of time. However, during the search for more CSS 3 tutorials, I found an interesting online game called Anigma. It is CSS 3 and HTML 5 based puzzle game. The game uses HTML 5 for the background audio, CSS 3 for the animations in each level, and JavaScript for loading the gameplay levels.

This game is created using the latest specification of HTML and CSS. It uses CSS 3 transition and animation effects for the page animation, HTML 5 for playing game audio. It also uses JavaScript to dynamically load the data for each gameplay level from .level files.

As stated on the game homepage, it’s an open source game. The source code for the game can be freely downloaded. Its source code is available at http://github.com/icefox/css3anigma.

Right now Anigma is only available for Chrome and Safari Webkit-based web browsers. However, I believe that it will become cross-browser compatible in the near future. HTML 5 and CSS 3 are already used by web designers and developers. More online games based on CSS 3 and HTML 5 are expected to come as the popularity of these two web standard languages increase. Furthermore, it will be the best alternative to Flash for some web developers who hate Flash.

0

CSS 3 Transition Effect

When I first learned about the transition effect of CSS 3, I was not very surprised because I was using Firefox 3.5 at that time. I viewed CSS 3 transition effect again in Chrome today and finally know the benefits of using transition effect.

Unlike other web developers, I hate Flash. One reason is because there is no good Flash IDE available for GNU/Linux, another is that Flash is a proprietary and monopoly format, just like Windows and PDF. After I saw the smooth animation using CSS 3 transition effect in Google Chrome, I decided to implement this effect as replacement for Flash. For those browsers that don’t support CSS 3 yet, such as IE, I might use jQuery to create same effect.

CSS 3 specification is still at early draft stage. Right now web developers have to define two versions of each CSS 3 property: one for Gecko, another for Webkit. However, the Webkit-based browsers have already have CSS 3 animation engine, such as Safari and Chrome. I believe that CSS 3 spec will standardize the syntax for these properties in the future.

Pages ... 1 2 3 4