Friday, December 3, 2010

Setting firewireid of Ipod manually

First, you need to get your
firewire id manually. To do that, run "sudo lsusb -v | grep -i Serial" (without
the "") with your iPod plugged in, this should print a 16 character long string
like 00A1234567891231. Once you have that number, create/edit
/mnt/ipod/iPod_Control/Device/SysInfo (if your iPod is mounted at /mnt/ipod).
Add to that file the line below:
FirewireGuid: 0xffffffffffffffff
(replace ffffffffffffffff with the string you obtained at the previous step)
Save that file, and you should be all set.

Friday, September 17, 2010

JVM - default and SUN's latest

To install:
sudo apt-get install sun-java6-bin sun-java6-fonts sun-java6-jre sun-java6-plugin

Even then some of the app may not find the latest JVM installed as they will be looking into the default installed one.
For that Use -
sudo update-alternatives --config java
And select the option for SUN java.

You may need to remove a link too -
~/.install4j

Monday, September 6, 2010

running a server in linux and related debugging

Let's take an example of TFTP server -
1. install the server
sudo apt-get install tftp-server [ubuntu]
or
sudo yum install tftp-server [fedora ]

2. edit config file /etc/xinetd.d/tftp, enable the service by changing
"disable = yes" to "disable = no"
you may want to change the default tftp location by modifying the server args with your choice of location.

3. Check the service and restart the super server

sudo chkconfig tftp on
sudo chkconfig xinetd on
sudo service xinetd restart

4. Unit testing
A. Check if the port is opened
sudo nmap -sU 127.0.0.1 -> you should find tftp for UDP/69
B. test from same host,
tftp 127.0.0.1
tftp> get
C. If tftp fails, there can be issue with firewall setting, you may need to create pinhole for the same.
else there can be access/permission issue with the directory/file.

D. Try from remote host.

Monday, August 2, 2010

Nautilus sendto thunderbird

Problem: In ubuntu sending a file as an email attachment, while browsing files in graphical file manager

Solution:
Nautilus already has a send-to plugin to support the same. I hit the barrier as I am a thunderbird user and this utility supports evolution by default. Even changing System->Preferences->Preferred Application also did not help. There are some solution available to install a thunderbird plugin to send-to. It seemed to cause a segfault for nautilus-sendto.
Then found out a pretty simple solution to the problem -
1. Created a file in ~/.gnome2/nautilus-scripts named mySend as executable with the following content
thunderbird -compose attachment="file://$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"
2. Restart nautilus: killall nautilus
Now you should have an option on nautilus right click
Scripts > mySend

For this there is no need to remove sendto plugin.

Also wrote a brief shell script to do it from commandline
$ cat ~/bin/mySend

if [ $# -ne 1 ]
then
echo "Usage:mySend "
exit
fi

if [ -d "$1" ]
then
echo "Don't provide a directory name"
exit
fi

RLTV_PATH=1
FILENAME=$PWD"/""$1"

if [ ! -f "$FILENAME" ]
then
if [ ! -f "$1" ]
then
echo "File does not exist!!!"
exit 1
else
RLTV_PATH=0
fi
fi

if [ $RLTV_PATH -eq 1 ]
then
atchment_str="file://"$FILENAME
else
atchment_str="file://"$1
fi

#debug
#echo "RLTV: "$RLTV_PATH "FILE: "$FILENAME "ATCH: "$atchment_str

thunderbird -compose attachment="$atchment_str"

Wednesday, July 7, 2010

UBUNTU cheat sheet

As an UBUNTU user, whenever I am stuck somewhere, google helps me out to cater to my queries. Here, I plan to organise my experience, so that the same can become helpful to other UBUNTU users in the same way.
Have fun ....

[*] For having AAC encoder support in system -
Install - ubuntu-restricted-extras

[*] For any utility using X11 headers, the system will need libx11-dev

[*] music editor - Rezound
sudo apt-get install rezound

[*] Sound converter by Gnome for different filetype conversion.