Debian Ubuntu – Webcam in Yahoo! Chatrooms

Recently my internet service provider gifted me a webcam. It is a Creative Vista Webcam and came with an installation disk for Windows. I wanted to see how it works on my Ubuntu Linux. When I plugged it in Ubuntu didn’t recognize it. I had to download drivers for it. Ubuntu’s community documentation’s Webcam page helped a lot. The EasyCam utility recognized my webcam but didn’t offer a driver for it. So I tried manual driver installation.

Rastageeks provides a hacked driver for webcams. My webcam was listed on the Working Webcams webpage. The installation instructions were simple, and since I was familiar with adding third party repositories I had no trouble installing the debian packages. Running the module assistant installed the driver on my computer and now I was able to see it working in Ekiga.

But I don’t use Ekiga, I use Yahoo! Messenger, so it has to work with Yahoo. We have Pidgin (Gaim) installed by default in Ubuntu. But it does not support Yahoo webcams. I have seen webcams working on Gyachi but I didn’t like its cluttered interface. So I decided to try Kopete. KDE Wiki has a very helpful Kopete Webcam Support page. From there I found out that I need to download libjasper-runtime package to see my webcam working. Jasper Runtime package is called libjasper-runtime and is available from Ubuntu Archives so it was much easier to download and install it. After that I ran Kopete and by clicking on Settings > Configure > Devices I was able to see my webcam working. Fantastic!

screenshot-kopete-webcam.png

I was pleased with the picture quality. It was much better than Windows, and what I saw on Yahoo! messenger installed on my Windows PC. But unfortunately Kopete does not support Yahoo Public Chatrooms. So I had to try Gyachi again. While trying to Install Gyachi, I came across more dependency issues. But these were no big issues, I simply had to install two packages libgpgme11 and libmcrypt4. Finally getting Gyachi installed, this is what I got:

screenshot gyachi yahoo chatrooms webcam

I browsed the forums to find out a solution, I read about adjusting brightness, contrast and colors. I did that too, but nothing worked. I am still unable to use the web cam in Yahoo chat rooms.

Using Terminal to Shutdown Processes

XFCE does not come with a system monitor utility like the one I had in Gnome. I used the utility to kill unresponsive processes. So how do we kill unresponsive programs using the terminal? To understand how Linux handles processes and how you can control them read this great article by Gary Sim (in plain English). Here is what I learnt from Gary’s article.

We need to know the process id of the program that is not responding. We find out process id or PID by running the command

ps aux

This command displays all running processes. Below are a few of the many running processes on my computer. The list is long so I am only showing you a few to give you an idea.

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
nom 3006 0.0 0.3 2476 772 ? S 23:15 0:00 gnome-pty-helpe
nom 3097 0.0 4.0 16584 10348 ? Ss 23:23 0:01 gksu -u root /u
root 3102 0.0 0.4 3712 1068 pts/1 Ss+ 23:23 0:00 /bin/su root -c
root 3105 0.0 0.2 2256 592 pts/1 S+ 23:23 0:00 /usr/lib/libgks
nom 3321 0.7 3.2 14920 8364 ? Ss 23:44 0:01 mousepad

Now find out which one of them you want to kill. I want to kill the mousepad it has the PID 3321 and I kill it by running this command:

kill 3321

Just incase if this command doesn’t work you can try

kill -9 3321

I am very happy with XFCE. But I need to find out a nice and lite pdf viewer. Evince is great but how could I download evince without downloading so many gnome libs? There is an evince-gtk package in Debian experimental but I can not install it due to dependency issues.

My Cute Little XFCE Desktop Environment

I have previously used XFCE with Xubuntu. But then I replaced it with Debian Etch and Gnome. But Gnome was becoming a little too heavy for me. I was bored and needed some change. So I decided to install a complete Gnome free system. First I downloaded latest Debian net-install cd. Installing Debian this way is much more easier. You get a chance to select your own packages during the installation or go ahead with some preselected packages. You even have a choice to install only the minimal system. So I installed the minimal base system and then logged in.

I am using Linux for more than a year now so I am comfortable with commands. Since I was going to install new things so it was wise to log in with super user priviledges.

nom@debian:~$ su
Password:
debian:/home/nom#

Once logged in, I had to tell apt to use network proxy. I did that by running the command:


export http_proxy=http://[proxy.address]:[port]

This command is temporary solution and you will have to repeat it with each new session. There is a workaround to set this up permenantly.

I installed XFCE4 by running the command:

apt-get install xfce4

I was foolish, I thought I would be able to log in a nice GUI world by simply downloading XFCE4. I forgot that I should also download gdm and xorg.

apt-get install gdm, xorg

Even then I was unable to log in to the gdm. So I ran:

dpkg-reconfigure xserver-xorg

This command runs a nice little wizard which helps you solve issues with your xserver settings. It could be difficult sometimes if you don’t know what hardware you are using and what it is called. Like once I had this trouble and I had no other computer to connect to the internet and ask for help on the internet. At that time I learnt about lynx a text mode web browser and bitchx the IRC chat client.

After configuring xserver I logged in with GDM and entered into the brand new world of XFCE. May be its just me but XFCE in Debian is faster and prettier than Xubuntu. I still had to install iceweasel web browser, xchat, ttf-nafees font and gimp. Working in this new environment, limited set of tools and applications, I learnt that I need to download more packages. Like for example I didn’t install alsa-base package. I also didn’t have xfce4-mixer package which is required to add a volume indicator icon on panel. I also learnt that I can’t live without Synaptic package manager.

XFCE Desktop ScreenshotI am much happier now and satisfied for a few months at least. Basic applications are still the same. I was already using Mousepad, Iceweasel, Gimp and Xchat with Gnome. But the most notable difference is in performance. My computer is much faster now, start up time is improved and it feels so neat.

Gmail and Google Reader in Startup Programs

I have tried several Email Clients and Feedreaders on Ubuntu and my primary Debian Operating System. But now I was feeling that why bother with any more software when you have Google and Firefox (Iceweasel on Debian). So, I decided to make myself a script that automatically opens my Gmail and Google Reader account in Firefox each time I log on to my computer. I thought may be some of you would find it useful.

Step 1: We need to create two files.
mailnreader1 which contains this:

#! /bin/sh
firefox http://mail.google.com/

And mailnreader2 which contains this:

#! /bin/sh
sleep 30;
firefox -new-tab http://www.google.com/reader

We are going to save these two files in /usr/bin/ directory. Once you have pasted these files please check the permissions. Select a file right click and select Properties and then click on Permissions tab. Make sure that the file is read and executeable by all. See the image below:

file permissions should look like this

These two files contain simple commands to open Firefox with specified web addresses. The sleep command tells your computer to wait for 30 seconds before running the next command. The reason behind doing this is that when your session begins your computer performs some tasks. Like loading your settings, Desktop, Nautilus, etc. My system is only 800 mghz, and If I don’t wait for 30 seconds the browser would give me an error something like this:

Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.

If you have a faster computer you can try removing the sleep line or decrease the number of seconds.

2: Now Go to Preferences > Sessions, click on Startup Programs tab, press the Add button and add this:

mailnreader1

Press Ok and then press the Add button again to add the second file:


mailnreader2

Press Ok and then Close. Now to check these scripts out you need to Log Out and then Log In.

Why two files?

I tried creating a single file containing this code:

#! /bin/sh
firefox http://mail.google.com/
sleep 30;
firefox -new-tab http://www.google.com/reader

But it didn’t work. I hope someone would improve the script so that we don’t have to wait longer and we can add more sites all in one single script. Until then, I guess I will keep using it because it works and saves me time and hassle of fetching mail and feeds in two separate windows while browsing the web in the third window.

Enabling Urdu Support in Ubuntu

Note: Their is an updated version of this guide available. If you are using Ubuntu 9.04 or higher then please follow the new instructions here.

Writing and Reading in Urdu on Ubuntu is not configured properly in a default installation. So most Urdu users face trouble once they have installed Ubuntu. Sometimes they give up too quickly and get back to windows and sometimes they spend hours figuring out a solution.

First of all I would like to assure that any one using Ubuntu can read and write Urdu just like they did it while using Windows. Ubuntu has full Urdu support, the problem is that you don’t have a few packages installed and a few settings tweaked. Just follow this step by step tutorial and you would have full Urdu support available with in minutes.

Step 1: Make sure that you have these packages installed:

  • language-pack-ur
  • language-pack-ur-base
  • language-pack-gnome-ur
  • language-pack-gnome-ur-base
  • language-support-ur
  • openoffice.org-l10n-ur-in
  • ttf-nafees

If you are using Kubuntu then you would need:

  • language-pack-kde-ur
  • language-pack-kde-ur-base

To install these packages quickly use this command:


sudo apt-get install language-pack-ur language-pack-ur-base language-pack-gnome-ur language-pack-gnome-ur-base language-support-ur openoffice.org-l10n-ur-in ttf-nafees language-pack-kde-ur language-pack-kde-ur-base

Step 2:Note: If you are using Ubuntu 7.10 Gutsy or later releases then you don’t need to do this step instead jump to step 3.

Since Dapper, there is a problem with Firefox in Ubuntu that it doesn’t render the Urdu web pages the way they should be rendered. Firefox that comes with Ubuntu has Pango disabled by default. We need to enable it so lets do it

Type this in Terminal:


sudo gedit /etc/environment

This command will open the environment file in your text editor with super user priviledges. Add this line in environment file:


MOZ_DISABLE_PANGO=0

Save the file and exit the editor. Now we have Firefox ready to render Urdu web pages.

Step 3: With Firefox working fine and all required packages installed. We still need to download and install fonts. While downloading packages we have installed ttf-nafees (Nafees Web Naskh) but there is another popular Urdu font that you need in order to view most Urdu webpages correctly. The font is BBC’s Urdu Naskh Asiatype. You can download it from here.

Open Terminal and type this:

sudo nautilus /usr/share/fonts/truetype

this will open a Nautilus window, paste your fonts here.

Step 4: Now we need to download a Urdu phonetic keyboard layout. You have many choices here you can use Crulp’s Phonetic Urdu Keyboard Layout or use Urdu Web’s keyboard layout. I use Urdu Web’s keyboard layout and you can download it here. After downloading your keyboard layout rename it to pk not pk .txt just pk and type this command in terminal:


sudo nautilus /etc/X11/xkb/symbols

This command will open a Nautilus window. Paste the pk file in symbols directory replacing the pk keyboard layout that comes with Ubuntu by default.

Step 5: Point your mouse to an empty space on your Top or Bottom Panels, right click and select Add to panel. A window will open giving you choices of applets to add on your panel. Select Keyboard Indicator and then press Close button. Now you have an applet on your panel showing the default USA. Take your mouse over there and right click to select Keyboard Preferences. In the Layouts tab press the Add button. Now select Pakistan from the list of Available layouts and then press Ok and then press Close.

Now you have Phonetic Urdu keyboard layout and you can switch between US English and Urdu by clicking on the indicator or by pressing both ALT keys together.

Step 6: Restart your computer.

Now check if you can not read, write and edit Urdu web pages, text files and documents on your Ubuntu box. Still having problems? Please make sure that you have followed the instructions exactly as provided above. If every thing is all right and you think you have followed the instructions then leave a comment so that we can improve this tutorial.

Five Reasons to Love Ubuntu

If you never used any operating system but Windows, then looking at all the Ubuntu related news on the web, you might be asking yourself, “What is so special about this Operating System?”. For you I have shortlisted my reasons that describe why I love Ubuntu so much. Remember that I am not someone you might identify as a geek. I am just a regular guy like you, a guy who has found something truly great and desperately wants to share it with everyone.

1. Freedom

Ubuntu gave me the freedom to install my operating system, modify it, redistribute it to friends and family without worrying about License.

2. Reliability

I am using Ubuntu since an year now and I haven’t seen any virus, trojan or adware on my system during this whole time. An year is quite a lot for an average windows user who often finds himself combating with some silly malicious software. The Ubuntu version I am currently using is supported for three years. This means that I receive free security updates for three years.

3. A whole lot of free software

Firefox, Open Office, Gimp, and a huge repository of free and not so free software that I can download and install without any hassle.

4. Community

Ubuntu introduced me to a community where people are always eager to help. I met some wonderful people online while asking for help. These wonderful people volunteer to maintain the help documents, support forums, mailing lists and IRC channels. I know I can always visit any of these places and ask for help, advise or have a little chat about just how cool this whole new Ubuntu world is.

5. Pride

I love to tell people that “I use Ubuntu Linux!” In fact I love the part when people ask, “Really? Whats so cool about this Ubuntu Linux that you are using?” While explaining them just how wonderful the world of open and free software is, I feel like I am a warrior saving the world from harmful side effects of not so free operating systems.

Troubleshooting Volume and Sound Card Configuration in Debian

I had a problem with gnome-volume-control. It didn’t save my volume control settings and displayed a mute sign on every startup.

While trying to solve this issue, I did something (I don’t remember what it was) that totally messed my sound configuration and now gnome-volume-control stopped working at all. Today I solved this problem and thought that I should write it here may be some one would find it useful. Please note that these instructions are written for Gnome. You can use these settings for KDE too but for that you will have to set sound system to use Alsa.

The first step is to make sure that you have following packages installed:

  • alsa-base
  • alsa-source
  • alsa-tools
  • alsa-tools-gui
  • alsa-utils

ALSA is Advanced Linux Sound Architecture. It provides sound drivers and provides audio and MIDI functionality to Linux Operating System. With the above packages installed we are now equipped to move on. Now start the Terminal and run:

# alsaconf

Remember that # sign tells you that the command should be entered with super user privileges.

This command will start a wizard ‘Alsa Configurator’ to assist you configure your ALSA settings. Read and follow the instructions, they are self explanatory and you just need to press the enter button on your keyboard. This script automatically closes gnome-volume-control and a notification appears informing you about that and asking you whether or not you want to reload gnome-volume-control applet. Choose Don’t load or do nothing and press the Reload button when you are done with Alsa Configurator script.

gnome volume iconNow if you pressed the Don’t load button then you will have to start gnome-volume-control. I will tell you only the easiest way. Move your mouse to the panel, right click and select Add to Panel and then add Volume Control applet. Double click the volume icon on your panel and set the sound. Don’t worry we are going to test it later.

Exit volume control and type

# alsactl store

now run

# speaker-test

You hear the sound?

Yes: Thats good now close the terminal to get rid of this annoying noise. You can now set your volume control settings to your desired levels.

No: Try again, reboot your system and they try to play some music or sound files. Sound doesn’t work at all? Then I suggest you read the expert advise. If the expert advise is too difficult for you to follow then you should try Debian IRC chat room for help.

« Older Entries