Saturday, September 18, 2010

Creating a new android project from an existing android project in eclipse.

I am back with some android experiences. I have just started to create an android application. So I am just a newbie. Here are some of the obstacles and their solutions a user might face at the beginning.
I was searching for a code snippet, found something similar to what I was looking for in the internet. Guess what!! I was not being able to run the code from android as I didn't know how to make that android project run on my eclipse editor. Then I found it after looking around the options in eclipse. Here it is;
1)Open eclipse editor.
2)Go to file->new->other->android project under android->choose create project from existing source->show your downloaded project->click finish.

That is it, you will have the project created in your workspace. Is not that easy!! :)

Tuesday, April 20, 2010

How to play mp3 in fedora 10

Hi all !!

The default movie player for fedora 10 is Totem movie player. You can use it to play mp3. All you need is to install a codec. Install the codec "gstreamer-plugins-ugly" by the command:

yum install gstreamer-plugins-ugly

Now enjoy mp3 in fedora 10.

Saturday, April 17, 2010

problem installing vlc in fedora; Having errors like : Error: Missing Dependency: libcucul.so.0......

I was trying to install vlc player in fedora 10 using yum. As I entered the command from terminal:

yum install vlc

I saw a long list of dependencies that ended up showing a lot of error messages of the form :
Error: Missing Dependency: libcucul.so.0. .....

I was able to solve the problem in the following way:

I rebuilt the repository database by the command:

rpm --rebuilddb

It did the work for me. Probably my yum repository database became errorneous by some changes. When I rebuilt it with the command, it loaded the database information once again from the scratch and the problem got solved.


How to use fedora distribution dvd as a yum repository?

I have just learnt how to use fedora distribution DVD as a yum repository. That is I am wanting to install rpm packages from the DVD using yum commands like:

yum install packagename

After googling a bit, I did it. Actually here is no credit of mine, I just did what the Linux bigwigs told me to do. I just want to share it with you. This is how you can do it.

There are the following steps:
1) Mount your DVD in a folder.
2) Change in an existing repository information.
3) Now use yum commands or Add/Remove Sofware panel to install software from dvd.

1)Mount your DVD in a folder:

Insert your fedora DVD in the DVD-rom. Now create a folder to mount. I created the folder in /media. I named it as dvd-rom. Write this command in the terminal being root or super user:

mkdir /media/dvd-rom

Now mount by :

mount /dev/cdrom /media/dev-rom

If you see the following line then the mount is successful.

mount: block device /dev/sr0 is write-protected, mounting read-only

You can dive into the folder dvd-rom and check whether you can see content in it to make sure that the mounting is successful.

2) Change in an existing repository information.

Open the file /etc/yum.repos.d/fedora.repo by any editor. I used gedit.

gedit /etc/yum.repos.d/fedora.repo

You will see the following information in it.

[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch


Now comment out the following lines:
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
#mirrorlist=http://mirrors.fedoraproject.org.

Instead add the following line:

baseurl=file:///media/dvd-rom/

Make sure that the value of enabled is 1.

enabled=1

After the change, it will look like this:

[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
baseurl=file:///media/dvd-rom/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch


Now save the file and quit. You have to do all the editing being a root or super user. Otherwise you cant edit the file.

3) Now use yum commands or Add/Remove Sofware panel to install software from dvd:

Go to System->Administration->Add/Remove Software. Make sure that under System->Software Sources ¨Fedora 10 - i386 ¨ is checked. This is the repository that is going to use fedora dvd for the packages.

You have done it. Enjoy faster installation through yum.

Friday, April 16, 2010

Another app is currently holding the yum lock; waiting for it to exit..

A common note:
When we start installing something using fedora yum repository, and we stop in the midway, then we often see the following message if we issue any command using yum:

Another app is currently holding the yum lock; waiting for it to exit..
How to break the lock?

Solution:
1) Be root: type su; give the password
2) Break the lock: sudo rm /var/run/yum.pid

You are done. Have fun with yum :)

Dual booting: windows along with linux

So you are very new to the world of fedora linux (You are just like me :)). So far you have always used windows. Last time you installed linux and it was working fine. But the problem happened when you formatted your hard disk to reinstall windows. You can no longer boot your linux. :((

Dont worry!! Very soon you are going to boot linux. Actually your boot record is overwritten by windows and bootloader no longer recognises your linux. Thats why you are not being able to boot linux. Just use your fedora installation cd. Then go to upgrade an existing system. Then choose write a new boot-loader. This will write your boot information in the boot record which was previously overwritten by windows. Now you restart your pc and you will be able to see both windows and linux.

Cheers..