Easily Turn Your Ubuntu into a Virtual Router

•August 26, 2010 • 28 Comments

Do you have a PSP or a Blackberry that supports wifi connection but without an ad-hoc wireless network capacity? I own these two devices and have been struggling to get their wireless work with my laptop’s internet connection. With the default network-manager of nm-applet, you can only create an ad-hoc wireless network share, which cannot be found by these devices. After some Google work, I finally found a solution, that is, hostapd


In Ubuntu 10.04, it seems extremely easy to have this hostapd work. First, of course, you need to install it. It is already in the official repositories. Just run this in the terminal:
sudo apt-get install hostapd

Then, open a text editor program, for example gedit. Copy the following into it.

interface=wlan0
driver=nl80211
ssid=
channel=1
hw_mode=g
auth_algs=1
wpa=3
wpa_passphrase=
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP


Please don’t forget to fill in the name of your network after “ssid=”, as well as the password after “wpa_passphrase=”.

After all these, save the file as hostapd.conf in your home folder.

Now, in your terminal:

sudo hostapd hostapd.conf

Turn the wifi connection on in your devices and enjoy the fast network share!

Use Rhythmbox to sync music with your iphone or ipod touch

•July 10, 2010 • Leave a Comment

This is the most exciting new functionality that Ubuntu Lucid Lynx brings in to me.

By default, when you plug your iPod Touch or iPhone into your computer, you will see your music library from your idevice directly in Rhythmbox.
If you want to transfer songs to the device, just select and drag them to the icon of your idevice, and that’s it!
Compared to iTunes, the one thing I really appreciate about Rhythmbox is that it can also do an on-the-fly transcoding when trying to transfer music files other than mp3 and AAC, for example, FLAC and APE.
To do this, first you need to install the restricted packages for ubuntu, which are in the partner repository:
Open Synaptic Package Manager, go to Settings – Repositories – Other Software, and enable the partner source then click close.
Reload the package information, and search for ubuntu-restricted-extras, install the package.
Now go to Rhythmbox, choose Edit – Preference – Music – Edit Preferred format, select CD Quality Mp3, the default setting for transcoding a mp3 file is set to be 128kbps, which is of course not very good for sound quality. So you can configure the setting for a better output. In GStreamer pipeline, type in the following:
audio/x-raw-int,rate=44100,channels=2 ! lame name=enc mode=0 vbr=4 vbr-quality=0 ! xingmux ! id3v2mux
Or if you prefer a non-VBR output, like a constant 320kbps, use the following parameter:
audio/x-raw-int,rate=44100,channels=2 ! lame name=enc mode=0 vbr=0 bitrate=320 ! id3v2mux

Now just drag the FLACs and APEs to your device and enjoy!

Using Grub2 to manage all OS’s booting, including Mac OS X!

•July 10, 2010 • Leave a Comment

Most Ubuntu users are using more than one operating systems in their computers, I think. However, it is always a tricky problem when you have more than one OS on a hard disk.

My experience tell me, that always try to install Ubuntu AFTER the installation of Windows or Mac OS X. Then, Grub2 will take care of all your problems.
The booting of a Windows OS is relatively an easy one, since usually there would be no problem at all with the grub2.
In the case of Mac OS X, especially Leopard and Snow Leopard, the default entry generated by grub2 is often not working properly. To solve this problem, follow the steps as below:
Open a terminal,
sudo gedit /etc/grub.d/40_custom
add the following into the file:
menuentry “OSX86” {
insmod hfsplus
search –file –set=root /boot
multiboot /boot
}

afterwards, in terminal,
sudo update-grub
It fixes the booting problem of Snow Leopard in my laptop. Hope it helps others too.

Introducing a one-panel setting for wide-screen laptops

•July 10, 2010 • Leave a Comment


The thing I have been complaining about Gnome is that its default setting always comes along with two panels. It is kind of annoying because nowadays almost all laptops are equipped with a wide-screen monitor, therefore the vertical space has become very precious. The two-panel setting is to me a waste of space. So every time I install a Ubuntu in a box the first thing I do is to make it only one panel.

First of all, you need a better menu. I recommend mint menu from Linuxmint because it comes with favorites and search functionalities, and most of all, it saves space!
Open a terminal, type in:
sudo add-apt-repository ppa:webupd8team/mintmenu && sudo apt-get update


sudo apt-get install mintmenu

Once installed, you can add this menu to the panel by selecting it from the “Add-to-panel” windows.
Then, move the “window list” to the upper panel, as well as the “workspace switcher”. Now you can delete the panel on the bottom.

Hello world!

•February 18, 2009 • 4 Comments

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!