Things To Fix After Each Kernel Update

Every now and then, your running Linux distro will receive a kernel update. It’s a normal part of running a Linux distro, or any OS for that matter. Mac OS and Windows perform updates as well. Unfortunately in Linux, there are certain things that break after each kernel update. It’s annoying as all get out, but its a small price to pay for running a secure desktop.┬áIn this article, I will list 3 things that need fixing, and their solutions, after each kernel update.

Fix Virtualbox

sudo /etc/init.d/vboxdrv setup

Fix Alsa

sudo apt-get install module-assistant
sudo m-a update
sudo m-a prepare
sudo m-a a-i alsa

Fix Webcam

sudo rmmod uvcvideo
sudo modprobe uvcvideo

I rather not to do this after each upgrade, but it’s a fact of life in the Linux world. It’s a good thing, it doesn’t happen very often. Perhaps, in the future, when Linux becomes perfect, or near perfect, this unnecessary exercise can all be avoided all together.

JQuery Datepicker

Typing in dates in a date field is never fun. It’s cumbersome. There is always a possibility of typing in the wrong format. There are far superior techniques that can be used and implemented when populating date fields.

JQuery is one tool that can be used to format date fields. JQuery is a set Javascript libraries that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.

JQuery has a component called JQuery UI, that provides low-level interaction like animation, advanced effects and themeable widgets use to build highly interactive web applications.

1. Download JQuery UI.

You can build your own custom JQuery scripts directly from JQuery’s website. You can select which feature you want installed. You can also select a specific theme. By selecting only the theme and features that you want, you can create a lean, strip-down version of JQuery. The download will include the following folders: css, js, development-bundle.

2. A Sample Datepicker Page

I created a simple HTML page that display how Datepicker works. In this example, I’m referencing Jquery UI from a local file. You can use a CDN if you want. I’m using the Smoothness theme and its supplied CSS.

The HTML input form needs to have an ID. In this case, we are using the id=”datepicker” for the date field. We are forcing the datepicker to use the ISO 8601 format which is “yy-mm-dd.”

<link href="css/smoothness/jquery-ui-1.8.18.custom.css" rel="Stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.18.custom.min.js"></script>
<script type="text/javascript">
// <![CDATA[
  $(function() {
  $( "#datepicker" ).datepicker({dateFormat: 'yy-mm-dd'});
  });
// ]]>
</script>

Here’s a demo.

Raspberry Pi

Watch out Apple, there’s another fruit in the market. Yesterday, I was ogling Apple’s TV which sells for just $99. That has to be one of the most affordable hardware sold by Apple. Except for the iPod shuffle, which sells for a mere $49. Which brings me to my main topic today, the Raspberry Pi, a full-fledged computer being sold for just $35. Did I hear that right?

The Raspberry Pi is powered by an Arm-based processor. It’s about the size of a credit card. It comes with a HDMI port, 2 USB ports for connecting keyboard and mouse, an audio output, a composite output for old-style TVs and monitors, an Ethernet port for the network, and a SD card slot for loading the operating system. It runs on just 2 watts of power, and it boots in less than 15 seconds.

The best part of it all, it runs on Linux, an open-source operating system. Since it’s open-source, you can do practically anything to it. Currently, there are 3 Linux distro images available for the Raspberry Pi. They are: Debian squeeze, Arch Linux ARM, and Fedora 14 Remix. There are many potential uses for the Raspberry Pi, such as a media center, cafe internet workstations, robotics, to name a few.

Finally, here’s a video of the Raspberry Pi. Yea, I want one or two.

HTML Redirect

Redirecting a web page to another page or domain is quite easy. All you have to do is create a simple HTML page with the code below. The code that actually does the redirecting is meta http-equiv=”refresh” command. Substitute “domain.com” with your own target url or domain. The number that you see is the amount of delay. “0” means immediate, “1” is one second delay, and “5” is five second delay before being redirected.

Here’s the full code:

<!doctype html>
<html>
<head>
<meta http-equiv="refresh" content="0;url=http://domain.com">
</head>
<body>
</body>
</html>

The New iPad

Apple announced today the release of the new iPad. Apple has made it quite clear to not call the new tablet the iPad 3 or iPad HD or by any other name. It’s just simply called the iPad. Can we call it iPad 2012?

The problem with just calling an iPad just an iPad is, it is extremely confusing for potential customers to differentiate one iPad from another. Imagine going to an online store other than Apple, and ordering an iPad. You’ll start questioning whether it’s the original iPad, the iPad 2, or the new iPad. It is confusing.

As expected, the new iPad comes with a retina display with a resolution of 2048 x 1536 That’s a total of 3.1 million pixels, which by the way, has more resolution than the 1080p HD display. The iPad is powered by an A5X processor, with quad-core graphics, an iSight Camera with a 5-megapixel backside camera, 5-element lens, IR filter and ISP built into the processor and 1080p video recording.

It will sell for $499, $599 and $699 for the Wi-Fi-only models in 16 GB, 32 GB and 64 GB. For iPads models with LTE 4G, the cost is $629, $729, and $829 respectively for the same capacities above.

Out of the two products revealed today, I’m more interested with Apple TV. It sells for only for $99. You can watch 1080p HD movies and TV shows directly from iTunes. You can also play Netflix, YouTube, and Vimeo videos, catch MLB, NBA, and NHL games live or on demand.

Pretty neat.

Fix Webcam After Kernel Update

Ubuntu 10.04 LTS updated its kernel to version 2.6.32-39 just today. The new kernel is automatically loaded after a reboot of the operating system. One of the things I usually check if there’s a new kernel, is to make sure all the peripherals are still working, especially the ever so touchy webcam.

One quick way of checking to make sure it’s working is to use a program called Cheese. It’s not loaded by default, but you can easily install it using: apt-get install cheese. Sure enough, the webcam wasn’t recognize by the system.

Issuing a couple of commands below fixed my problem. I didn’t have to reboot the system. It just worked after running a couple of commands from the Terminal. Here they are:

sudo rmmod uvcvideo
sudo modprobe uvcvideo

The two commands removes and adds the uvcvideo module to the new kernel. Rmmod removes the module, while modprobe adds. Simple enough. No reboot needed.

Windows 8 Dizzying Array of Versions

As you are aware, development of Windows 8 is in full force. Microsoft has already started to market its next operating systems by making it available for anyone to download. A recent look at what options are available reveals a dizzying array of options. Tom’s Hardware compiled a list of Windows 8 options, and they are:

  • Windows 8 Enterprise Edition
  • Windows 8 Enterprise Eval Edition
  • Windows 8 Home Basic Edition
  • Windows 8 Home Premium Edition
  • Windows 8 ARM Edition
  • Windows 8 Professional Edition
  • Windows 8 Professional Plus Edition
  • Windows 8 Starter Edition
  • Windows 8 Ultimate Edition

This doesn’t even take into account more options if you take into account 32-bit and 64-bit CPU architectures. This list is quite lengthy. The list can potentially change come release time. As a comparison, Linux Mint has 7 different versions. But, if you take away the 32-bit and 64-bit stuff, it essentially comes down to just 4 different versions.

Do you think there are too many Windows 8 options?

Share Files Using Samba

One way of sharing files within your network is to use a Samba server. If you are a Linux user, whether it’s Ubuntu, Debian, Fedora, or any other distro, you can share folders with Windows and Mac users by simply installing a Samba server. This article will guide you with the installation of Samba.

Samba is a free software using the SMB/CIFS networking protocol, which was originally developed by Andrew Tridgell. Samba provides file and print services for various Microsoft Windows clients, and a Windows Server domain either as a Primary Domain Controller or as a domain member.

Samba runs on most Unix and Unix-like systems, such as GNU/Linux, Solaris, AIX and the BSD variants, including Apple’s Mac OS X Server. Samba is standard on nearly all distributions of Linux and is commonly included as a basic system service on other Unix-based operating systems as well.

Samba is released under the GNU General Public License. The name Samba comes from SMB or Server Message Block, the name of the standard protocol used by the Microsoft Windows network file system.

Install Samba

Setting up Samba server is very easy. For example, you want to share files, movies, etc. with others on your network. To install Samba, open your Terminal and type the following:

sudo apt-get install samba

Edit Samba Config File

Edit the /etc/samba/smb.conf file. From the Terminal type:

sudo gedit /etc/samba/smb.conf

Change the workgroup to your Windows workgroup. Mine is HOME. It’s important that you use the same workgroup with your other Windows machines. In addition, you also need to uncomment ‘security = user’ by removing the semicolon at the start of the line.

workgroup = HOME
security = user

Create A Share

In the example below, I will share a folder called ‘movies.’ You can name your share to anything you want. Adjust your path. Make your share browsable. Let guests have access to it. Make it writable. Finally, mask your share with 0755.

[movies]
comment = Movies
path = /home/ulysses/movies
browsable = yes
guest ok = yes
read only = no
create mask = 0755

Create The Share Directory

You can now create your directory and change the ownership to nobody.nogroup. From the Terminal type:

sudo mkdir -p /srv/samba/movies
sudo chown nobody.nogroup /srv/samba/movies/

Restart Samba

Restart the Samba services. From the Terminal type:

sudo restart smbd
sudo restart nmbd

Access From Other Computers

You can now access your Samba share from other computers. In Windows can go to My Network Places > View workgroup computers. Look for the computer and share. The Workgroup needs to be the same with your other Windows systems.

On the Mac, open Finder > Go > Connect to Server. I used the Samba server IP address to access it from the Mac. In this case, my Samba share is 10.10.10.107/movies. Log in as guest.

As you noticed, installing a Samba server is quite easy.