Saturday, July 31, 2010

HOWTO : Streaming music from Ubuntu 10.04 to Android smartphone

Streaming mp3 or ogg audio files from Ubuntu desktop or server to Android is very easy. It just requires several steps to make it work.

You can share your music to other computers or Android devices via intranet or internet no matter the musics are sharing from Desktop or Server.

(I) Prerequisite

(a) Hardware
(1) One computer or server which is installed Ubuntu Desktop or Server 10.04
(2) One Google Nexus One or any Android smartphone 1.5 or higher
(3) Internet connection equipments (if any), such as router

(b) Software
(1) Install DAAP Media Player from the Android Market on your Android smartphone

(II) Server Side

Step 1 :

Install the Firefly on your Desktop or Server.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install mt-daapd


Step 2 :

Follows the instructions below and then copy or upload the audio files to the below mentioned directory.

sudo mkdir /home/media
sudo mkdir /home/media/music


Step 2a :

After copied or uploaded the songs to the directory, execute the following commands.

sudo chmod -R 755 /home/media/music

*Whenever you copied or uploaded new songs to the directory, make sure you carry out Step 2a. Meanwhile, to conduct "Start Full Scan" at Firefly web page to read the new songs into the database/playlist.

Step 3 :

Open a browser (such as Firefox) and point to the address of the server that installed mt-daapd :

Desktop -
http://localhost:3689

or

Server -
http://server_ip:3689

e.g. http://192.168.1.100:3689

Login with the username "admin" and password "mt-daapd".

Go to "configuration" and click "show advanced config".

Go to "Transcoding" section. Add the media extension to "Never Transcode" at the bottom of the page and then save.

For example, .ogg, .mp3

Step 4 (Optional) :

Go to "Server" section. Change the password of "Admin password" or add "Music password" if you want to have to enter password before listening to the music.

Changes "Compress" to "Yes".

Then save it.

Step 5 :

Go to "Server status" and click "Start Full Scan" button and you will see the figure of "Songs" is updated. Make sure you have uploaded or copied the mp3 or ogg files to the directory that mentioned above.

(III) Client Side

If you installed mt-daapd on the desktop computer, open Rhythmbox (or Banshee) and you will see the Firefly at the "Share" section. You can play the music now. You can also play the music within the same network on other computers.

If you installed mt-daapd on the server computer, open Rhythmbox (or Banshee) on the any desktop computers within the same network and play the music as mentioned above.

For Android, make sure you have installed DAAP Media Player from the Market. Open the application, you will connect to the mt-daapd server if you are connected via wifi.

Press "Menu" and select "Preference" to enable "SD Card as Cache" and "Streaming music".

You can select any music to play and press "Menu" to choose from "Stop", "Repeat" and "Shuffle".

(IV) Router

You may required to forword the port 3689 on your router if you want to stream your music via internet.

Enjoy your music on the road!

That's all! See you.

Thursday, July 29, 2010

BUG FIX : Ubuntu Samiux Remix 10.04 r4.x installation

After installed Ubuntu Samiux Remix 10.04 r4.x, you will find "Place" with lesser folders and some programs cannot be executed.

It is because there is a bug on Ubuntu 10.04.1 (the latest version of Ubuntu) and it can be fixed easily.

You can check the version of Ubuntu by issue the following command.

cat /etc/issue

Step 1 :

Login and open a terminal. Issue the following command.

ls -la

You will note that the ownership of the following directories have changed to root:root instead of username:username, e.g. samiux:samiux.

.bash_history
.config
.dbus


Step 2 :

Fix the problem by issue the following commands.

sudo chown samiux:samiux .bash_history
sudo chown samiux:samiux .config
sudo chown samiux:samiux .dbus


*Replace "samiux:samiux" with your username.

Step 3 :

Log out and re-login. The problem solved.

That's all! See you.

HOWTO : Ubuntu 10.04 on Gigabyte TouchNote T1028X

Gigabyte TouchNote T1028X equipped with Intel Atom N280 and eGalax touch screen. It runs Ubuntu 10.04 flawlessly except touchpad and touchscreen. This tutorial is telling you how to overcome these problems.

"lsusb" shows the following :

Bus 005 Device 002: ID 0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen

Step 1 :

Boot up the system and press "Ctrl+Alt+F2" to go to command prompt.

sudo nano /etc/default/grub

Append "i8042.noloop=1 usbhid.quirks=0xeef:0x1:0x40" to "GRUB_CMDLINE_LINUX_DEFAULT".

*where i8042.noloop=1 solves the touchpad probem.

It will look like this :

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.noloop=1 usbhid.quirks=0xeef:0x1:0x40"

Save and exit.

sudo update-grub

Step 2 :

sudo nano /etc/modprobe.d/blacklist.conf

Append the following to the file.

blacklist usbtouchscreen

Step 3 :

sudo nano /usr/lib/X11/xorg.conf.d/05-evdev.conf

Append the following to the file.

Section "InputClass"
   Identifier "eGalax"
   MatchProduct "eGalax"
   MatchDevicePath "/dev/input/event*"
   Driver "evdev"
   Option "SwapAxes" "off"
   Option "Calibration" "2 4100 11 4099"
EndSection


The value of calibration is "2 4100 11 4099" is perfect on my Gigabyte TouchNote T1028X (resolution 1366 x 768). However, you can change the value after doing Step 6 when necessary.

Step 4 :

sudo apt-get update
sudo apt-get install build-essential libgtkmm-2.4-dev autoconf libtool


Go to "http://github.com/tias/xinput_calibrator/downloads" and download the latest version of xinput-calibrator. The current version at this writing is 0.6.1.

tar -xvzf tias-xinput_calibrator-v0.6.1-0-gd2ce98b.tar.gz

cd tias-xinput_calibrator-d2ce98b
./autogen.sh
./configure
make
sudo make install


Step 4a (Optional) :

Or, you can build your debian package by using checkinstall.

sudo apt-get update
sudo apt-get install build-essential libgtkmm-2.4-dev autoconf libtool checkinstall


Go to "http://github.com/tias/xinput_calibrator/downloads" and download the latest version of xinput-calibrator. The current version at this writing is 0.6.1.

tar -xvzf tias-xinput_calibrator-v0.6.1-0-gd2ce98b.tar.gz

cd tias-xinput_calibrator-d2ce98b
./autogen.sh
./configure
make
sudo checkinstall


Follows the instructions on the screen provided to generate your debian package.

Then install the package by using "sudo dpkg -i package_name.deb".

Step 5 :

Reboot your system.

Step 6 (Optional) :

To calibration your system and edit the value to Step 3 when necessary.

xinput_calibrator_x11

That's all! See you.

Monday, July 05, 2010

HOWTO : Over-the-Air (OTA) updates on Nexus One

Many Nexus One users out there have not yet received their OTA updates to Froyo (Android 2.2). However, I am using it right now with the latest update FRF91 at this time of writing.

Believe it or not, you just to enter the following to the phone and you will receive OTA as soon as possible when they are available.

*#*#2432546#*#*

Then, a message "Checkin Success" will be displayed.

Waits for several hours, you will receive a message of "System Update".

That's all! See you.

Friday, July 02, 2010

HOWTO : Adaptec Storage Manager on Ubuntu 64-bit Desktop

I have 2 Adaptec RAID cards 5805 and 2405 on two different server and desktop. Adaptec Storage Manager monitors the RAID remotely. You can even create and format the RAID remotely too. However, it cannot upgrade the firmware under Linux system.

Step 1 :

Download Adaptec Storage Manager. Go to the following site and select the latest version of Storage Manager. 5805 and 2405 are under Adaptec Unified Serial SAS/SATA. The current version at this writing is v6.50.18570 dated April 23, 2010.

http://www.adaptec.com/en-US/support/raid/#sas_raid

For 5805 :
http://www.adaptec.com/en-US/downloads/storage_manager/sm?productId=SAS-5805&dn=Adaptec+RAID+5805

For 2405 :
http://www.adaptec.com/en-US/downloads/storage_manager/sm?productId=SAS-2405&dn=Adaptec+RAID+2405

Let's take 5805 as example on 64-bit Ubuntu Desktop. Download link is as the following :

wget http://download.adaptec.com/raid/storage_manager/asm_linux_x64_v6_50_18570.tgz

Step 2 :

tar -xzvf asm_linux_x64_v6_50_18570.tgz

cd manager

sudo apt-get install alien
alien --scripts StorMan-6.50.x86_64.rpm
sudo dpkg -i storman_6.50-18571_amd64.deb


Step 3 :

wget http://se.archive.ubuntu.com/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_amd64.deb

sudo dpkg -i libstdc++5_3.3.6-17ubuntu1_amd64.deb

Step 4 :

To run the Storage Manager :

sudo /usr/StorMan/StorMan.sh

Login as Ubuntu Desktop user and password. The user manual of Storage Manager can be downloaded at :

http://www.adaptec.com/en-US/support/raid/sas_raid/SAS-5805/_docs/ASM_v6_50_18570_Users_Guide_for_DAS_pdf.htm?nc=/en-US/support/raid/sas_raid/SAS-5805/_docs/ASM_v6_50_18570_Users_Guide_for_DAS_pdf.htm

Remarks : if you want to monitor the server's RAID card in the same subnet, you must do the same steps on the desktop and server.

Done!

That's all! See you.

Thursday, July 01, 2010

HOWTO : Ask Firefox and Ubuntu Desktop to use RamDisk

If you have 2GB or more of memory (at least 2GB RAM is recommended), you can try to use ramdisk to boost the performance of Firefox and Ubuntu Desktop. The following tutorial is only applied for Ubuntu Desktop version. Please do not use in Server version.

Step 1 :

sudo nano /etc/fstab

Append the following to the file /etc/fstab

tmpfs /var/log/apt tmpfs defaults 0 0
tmpfs /var/log tmpfs defaults 0 0
tmpfs /tmp tmpfs defaults 0 0
tmpfs /var/tmp tmpfs defaults 0 0


Step 2 :

Add "norelatime" to (for example) :

UUID=8b0a54f0-b16c-49c9-a639-c2202f2909da / ext4 errors=remount-ro,norelatime 0 1

Step 3 :

Save and exit. Then issue the following command to see if there is any error. If there is an error, please go back to Step 1 and 2. Please DO NOT reboot when there is an error.

sudo mount -a
sudo mount -o remount /


Step 4 :

If no error, please reboot your system.

Step 5 :

Open Firefox and enter "about:config". Confirmed the warning and right click on any blank.

"Add" --> "String", then enter "browser.cache.disk.parent_directory". Press enter and then enter "/tmp".

Step 6 :

Restart Firefox.

Done!

That's all! See you.