Thursday, June 25, 2009

Compiling Pidgin from source. Updated

It seems that a better method suggested by Donald P. Kong in the mydebian mailing list works better than compiling pidgin from scratch. Basically, you can use Apt-Pinning. A method to install unstable packages on a stable debian distribution. This is assuming that the package you want to install exist on the unstable version of debian and all dependencies can be resolve. Otherwise,

If the package still does not exist under unstable version of debian, you can use the method below.
----------------------------------------------------------------------------------------------------------------------------------------------------------------

Recently, I had trouble using pidgin. The pidgin I have installed is 2.4.3-4lenny2. though I usually just wait a while and aptitude update and upgrade for the latest version when using sid, however, on Lenny it seems to be a little bit slower, and I don't know if its the x86_64 bit architecture that I'm using or it just takes time to have the latest version of pidgin debian package to be included into Lenny repository. Seems yahoo made some changes to the server, yahoo messenger plugin does not work anymore on Pidgin. As of this date, the best way to go around this problem is to get the latest 2.5.7 version. Unfortunately, there is no .deb package for this yet on lenny. I can't wait. Yahoo messenger is already part of the daily life routine. And I dont want to boot on windows or install a VM for windows.

So what I did, was I had to compile it from scratch.
Long story short, just for the sake of documentation for others, I have included what I did here.


$ wget -c http://downloads.sourceforge.net/pidgin/pidgin-2.5.7.tar.bz2
$ tar zjvf pidgin-2.5.7.tar.bz2
$ cd pidgin-2.5.7
$ aptitude install intltool libgtk2.0-dev libxml2-dev libgstreamer0.10-dev libdbus-1-dev gnutls-dev libnss3-dev
$ ./configure --disable-screensaver --disable-startup-notification --disable-gtkspell --disable-meanwhile --disable-avahi --disable-dbus --disable-perl --disable-tcl
$ aptitude purge pidgin
$ make
$ make install
$ ldconfig

I choose to disable some features of pidgin since I didn't think I will need it. I just need it to work until lenny comes up with an stable and updated working package.

After that, you can run pidgin as usual and connect to yahoo without any problems. The above instructions may not work since my PC is setup differently, if it doesn't, write a comment or join our mailing list. Maybe we can help you out.


Here are some references on the yahoo issues on pidgin. [http://theflamingbanker.blogspot.com/2009/06/some-clarification-on-yahoo-issues.html]

Wednesday, June 24, 2009

Java Plugin

Upon getting a new PC with a Intel(R) Pentium(R) Dual CPU to play around with, I have encountered many problems due to the 64-bit architecture being used. Particularly, many applications still does not have the 64-bit version yet.

Among the problems is java plugin for firefox or in the case of debian, its iceweasel. Previously, sun did not have the 64 bit version java plugin for firefox. But I googled around and found out that recently, for the version java6 update 12, they have already include the 64 bit version plugin. Among the reference I found was at http://plugindoc.mozdev.org/linux-amd64.html which gives all supported plugins and what not for mozilla.

1) The easiest way to install sun java on debian is to:
$ aptitude install sun-java6-jdk
This will fortunately, as of this date, lenny installs java6 update 12.

2) After doing this, you will need to choose your default java to use. Just for compatibility with other applications, if you are using netbeans or what not. To choose the default java to use, type:
$ update-alternatives --config java
then select the sun java you just installed.

3) Next is to create a symbolic link for the firefox/iceweasel to the java plugin
$ cd /usr/lib/iceweasel/plugins
$ ln -s /usr/lib/jvm/java-6-sun-1.6.0.12/jre/lib/amd64/libnpjp2.so
That should install the java plugin for firefox, for x86_64 bit version, and those using the amd64 kernel.

4) I later restart firefox, and check to see if the java plugin is installed. At the location bar, i type about:plugins. To see if there is a java plugin support. Looks like things look good.


5) also tried to upload some pictures into facebook. The upload features requires java plugin. Seems to work great.

So there you go...java plugin seems to work. Have fun.

Monday, February 9, 2009

Experience installing Debian on Lenovo S10

You know one of those new lines of UMPC that's being displayed here and there. It seems too small for anybody to use it, and most of the time it looks like a toy rather than a serious piece of machine. Anyway, I got one, and here I am sharing some of my experience using the Lenovo S10.

The Lenovo S10 has no optical drive, you have to be creative in installing Debian on it. The factory default comes with Windows XP pre-installed and it has 3 partitions in its 160G HDD. The partition is used for Windows XP, a second partition where all the drivers are kept just incase you need to do a reinstallation, and the third partition is used for auto-recovery feature where Windows XP installation files reside.

I didn't get rid of windows totally. This is because, I still use Windows XP occasionally. Some of the work I do just runs on Windows and I have no choice but to be dependent on XP. But I can make it dual boot and have the freedom to choose which OS I want to use on the laptop. The first thing you need to do is partitioning the hard disk. For this, I use gparted loaded onto a usb pen drive. I went to gparted website to download the image and also for the instructions of creating a Live USB image. After creating your gparted live usb, you can enter the bios, and boot through the usb pen drive. Then you need to partition the harddisk to your liking and create a partition for Linux. I only took about 20G of harddisk space for Debian. I figured the windows partition is in FAT32, and that i can mount later to use for storage if I need to use it. Make sure you don't delete the Windows XP recovery partition if you want to keep Windows XP recovery feature on your Ideapad.

After partitioning, you can now download and create an usblive pen drive for your debian installation. I use Debian Lenny. Make sure you get the latest weekly or daily built for lenny debian installer for this if you want to detect the ethernet network card. I download the i386 netinstall for the usb image. After downloading the image, you need to create the usb live CD. I followed the easiest way to create a live-usb stick, which is just zcat an image into a usb thumb drive.

pontianak:~$ zcat boot.img.gz >/dev/sdb1

This is the simplest way to create a live-usb thumb-drive, but it limits your thumbdrive partition to 250M. so hence the image you'll be using is netinstall. And you have to install the other packages through network install. You can download a larger image if you followed a different method. Someone made an excellent documentation in creating usb live images, you can go here to his site to see the other methods you can use.

Then after setting the bios to boot from usb, you can boot your debian image and install debian on the partition you've created with gparted.

After a few hours as debian download all the necessary packages for your system (this can take a while if you are using streamyx, unless you have a really fast T1 connection at the office, you might be better off just having a base install and work from there by downloading only the necessary packages.) I anyhow waited several hours to get all the packages, like gnome, office and etc for a complete system. After all the waiting, I have debian complete lenny system installed. Everything seems to work, except for the internal mic and wireless network. Luckily, there are some work around. As for now, below are the things that seems to work.

ProcessorYes Shows up as 2 CPUs due to HyperThreading.
ScreenYes 1024x600 resolution, because the screen is really small, the windows doesn't seem to fit nicely in the screen. It might be better to make the font smaller. Under the gnome preferences-->appearance, I've made mine to size 6.
HDDYes
GraphicsSomewhatLooks ok, however, the touch pad mouse seems to be moving really fast. You can adjust this on gnome, but it seems that the vertical movement of the cursor is faster than the horizontol movement.
SoundYes Alsa seems to work nicely
EthernetYes Should work with lenny daily built
WirelessYes You need to download the latest broadcom driver for this, then you can easily use gnome network manager to get the wireless working. Of course, you can also use iwconfig if you prefer the old fashion way. Thanks to another person who have done it, his instructions was helpful and can be found here. And the driver can be downloaded from broadcom website.
BluetoothNot Tested S10 does not come with Bluetooth built in,at least not the current models being sold. I believe the next coming models would have it by default. You can buy a bluetooth module, and install it manually, of course you need some kind of hand shop skills.
USBYes Seems to work nicely.
Card ReaderYes Seems to work, automounter detects my SD card and mounts it automatically.
I tested this using the SD card from my digital camera.
ExpressCard SlotNot Tested
Camera/WebcamYes Tested this with skype and managed to keep a conversation going for about 30 minutes.
Battery Yes
It seems to detect correctly if the power is plugged in or not, and is capable to tell you how much time you have till the battery runs out. I'm not really sure if the calculated time is correct...but it looks like its working.
Microphone Somewhat
The internal mic does not appear to work on debian lenny. However, if you need to use the mic to make a skype call, using the mic-in jack seems to work nicely. Its only the internal mic that is not working. So you need to get a headphones with microphone to make skype calls. There is some people saying that recompiling the latest Alsa may help, I haven't tried this yet.

Wednesday, August 6, 2008

Time Drift

Recently, I noticed my linux box in the lab is slowly drifting in time. After resetting the time for 2 times, I think I got to do something about it. So, wasting no time, I installed ntp. It's no big deal, and I'm sure a lot of the old-timers in linux are very familiar with this, so this is something for newbies and people wanting to explore the use of linux.

To install, on debian, just use:

$ aptitude install ntp

Then after that, you can start your ntp daemon. To do this, just type, as root:

$ /etc/init.d/ntp start

That should give you the utmost correct time.

Suppose you would like to edit your configuration to use the local time server or a time server in your department. Well, all you need to do is to edit /etc/ntp.conf. I've added these lines to add the server in my department.

server ntp1.cs.kent.edu iburst dynamic
server ntp2.cs.kent.edu iburst dynamic
server time.kent.edu iburst dynamic
server 0.debian.pool.ntp.org iburst dynamic

and rerun ntp daemon with:

$ /etc/init.d/ntp restart

Now, some of you might be a little curious on the options given to the servers. Well here is an explanation taken from the man page.

iburst

When the server is unreachable and at each poll interval, send a burst of eight packets instead of the usual one. As long as the server is unreachable, the spacing between packets is about 16s to allow a modem call to complete. Once the server is reachable, the spacing between packets is about 2s. This is designed to speed the initial synchronization acquisition with the server command and s addresses and when ntpd(8) is started with the -q option.

Now, I can't find a good explanation for dynamic option on the web. But I'm sure since the original .conf file has it, so I'm just going to keep the dynamic option there.

There are people who thinks that we might as well use a ntp-client like ntpdate to synchronize time, however, ntpdate needs to be run manually or by cron. It is however more resource friendly, and only runs when you want it to run, unlike ntp server which would be running as a server all the time. However, there is an issue about time drift. And the problem with ntpdate, it does not have the algorithm to handle time drift. Hence, since I'm a little obsessed about time to the milliseconds, time drifts is an important thing for me, and ntp has the algorithm to calculate the time drift and readjusting time as necessary. :) Hope that helps, comments by experts are highly appreciated to get a better understanding of things, questions are also welcomed.

Monday, August 4, 2008

How to delete a file starting with a character "-"

Recently, I tried to delete a file which has a starting "-". The filename is called --ahlong.avi. Unfortunately, running

$ rm -- --ahlong.avi

gave me an error. So how do you delete a file that has a "-" starting character. Well i found out there are a few ways to do this....

$ rm ./--ahlong.avi
or
$ rm -- --ahlong.avi


Both seems to work.

Friday, February 22, 2008

Debian@Youtube



Debian startup script

Wednesday, February 13, 2008

Pine and IMAP over SSL

Anybody used pine before for reading emails. Some of you may not, but if you started using email pre-2000, you probably have used pine before.

This entry may be a little trivial for those of you who are familiar with it,
but, the community website is also for newbies. I know there are also other
alternatives, but talking about one alternative is an option for a newbie to
decide whether he is a pine, elm, mutt, thunderbird or evolution user.

What is pine?

Pine is a freeware text-based e-mail client developed at the University of Washington. It is no longer under development, and has been replaced by the new Alpine client, which is licensed as free software rather than freeware.

Many people believe that Pine stood for "Pine is not Elm", in the manner of "GNU Is Not Unix", ie. a recursive acronym. However, one of its original authors, Laurence Lundblade, insists this was never the case and that it started off simply as a word and not an acronym, and that his first choice of a backronym for pine would be "Pine Is Nearly Elm". Over time it was changed by the university to mean Program for Internet News and E-mail.[1]

In 2006, the University of Washington announced that it stopped development of Pine with Pine 4.64, although Pine continues to be supported.[6]

In its place is a new family of email tools based upon Pine, called Alpine and licensed under the Apache License, version 2. November 29, 2006 saw the first public alpha release,[7][8] which forms a new approach since the alpha test of Pine was always non-public.

Alpine 1.0 was publicly released on December 20, 2007.

***All this is taken from wikipedia.


Why I use Pine? No particular reason. I just like the text based email. Its a matter of preference really. Some consider it less l33t, since arguably, mutt is more flexible. However, I found it good enough for me, its about the most l33t I want to get when reading emails. Plus, arguably, its faster than web based email. Although there is a web version of pine called webpine. Never used it so can't comment much.

Particularly, pine is flexible enough it most environment. I will be concentrating on using Pine over SSL with IMAP. On my debiana, a debian unstable distro, I installed pine/alpine, using

debiana:~# aptitude install alpine

This should install alpine. You can choose to run alpine by simply typing...

debiana:~# alpine

My biggest problem was to get pine fetch my mail from my IMAP server, and to do that securely without people sniffing in between.

When pine runs, you'll see this....









Press "S" to enter setup to start configure your pine.
Enter "C" to enter the basic setup of your configuration menu.
Which allow you to configure it to connect to your IMAP server.
Below are the configuration options I use, for my client:


SMTP Server (for sending)= smtp.yourServer.com/user=your_username/tls/novalidate-cert

Since I do not have a validated cert from the SMTP server, i use this configuration, i also put the username name there to make it auto key in, for the particular user i want to send email. The novalidate-cert is not necessary, but its hack to avoid some hassles of pine keep asking you whether you allow an unvalidated cert be used.

Inbox Path=
{imap.yourServer.com/user=your_username/tls/novalidate-cert}INBOX Default Fcc (File carbon copy)= {imap.yourServer.com/user=your_username/tls/novalidate-cert}Sent

Similarly, I do the same same for reading my INBOX in IMAP and the SENT directory.

Exit and now all you need is to add your mailboxes directories in IMAP.

To do this, enter Setup again and now choose "L" for the collectionLists setup. Which is where you may define groups of folders to help you better organize your mail. In my case, I already have my email boxes organized on the campus server. To do that, I choose "A" to add a new entry, and entered the following options.

Nickname : Mail on imap.yourServer.com/tls/novalidate-cert
Server : imap.yourServer.com/tls/novalidate-cert
Path : Left blank
View : Left Blank

When you change all that, you can view all your email boxes, INBOX,SENT and etc in the directory list. Have fun exploring using pine.