Monday, June 11, 2007

Controlling linphone

I am working on controlling linphone from the outside, via its command-line interface. To make this work perfectly, I had to modify the code of linphonec slightly to force it to flush after every line, otherwise, Linux is too smart and knows that the stdin/out are pipes and does some additional buffering. There are probably better ways to do this though.

ALSA Problems after Feisty Update

I started to get the following problems when running linphone on top of ALSA after my Feisty update.

ALSA lib confmisc.c:1105:(snd_func_refer) Unable to find definition 'defaults.pcm.dmix_format'
ALSA lib conf.c:3500:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:3957:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2145:(snd_pcm_open_noupdate) Unknown PCM dmix:Intel


I thought linphone was the problem, but this had to do with old ALSA configuration files lying around. Removing (or moving) the .asoundrc and .asoundrc.asoundconf files in your home directory, as explained here will do the trick.

Thursday, June 7, 2007

Fixing TV Card and WebCam culpirts.

A number of software packages, including OpenWengo or linphone, will usually insist on using /dev/video0 as the device from which they acquire pictures. This might turn into a problem if your hardware also has a PCI based TV card. Indeed, the TV card would then automatically turn into video0 while the webcam will be video1, a behaviour that you do not which to have.

The solution is a mixture of this tutorial and this blog entry. What I did was finding out the vendor/product of the webcam via lsusb and finding the vendor and device of the TV card via udevinfo -a -p /sys/class/video4linux/video0. I ended up with the following content for a (new) file called 35-perso.rules in /etc/udev/rules.d/:

KERNEL=="video[0-9]*", SYSFS{idVendor}=="046d", SYSFS{idProduct}=="08ad", BUS=="usb", NAME="v4l/video0", SYMLINK="video0"
KERNEL=="video[0-9]*", SYSFS{vendor}=="0x1131", SYSFS{device}=="0x7134", BUS=="pci", NAME="v4l/video1", SYMLINK="video1"


Note that the NAME directive is mandatory for this to work properly, otherwise you'll still have video1 and video0 crossed.

Monday, June 4, 2007

USB-UIRT on Ubuntu

Installing an USB-UIRT device on an Ubuntu system is as simple as explained on the community web site. Automating this would require to automate the dmesg lookup part (or to force the user to use a given USB port?).

However, even though it seems that simple on Ubuntu, it seems that the device is not properly recognised so far. I have been able to make it work on Windows using IRCommand2, but could probably have been using this solution, i.e. the lrnhelper and uutx applications.

However, it is possible to do this on Linux, misterhouse does it. Pay specific attention to the note about using "udev" to fix the name of the USB-UIRT device in the OS to avoid dynamic allocation and the problem described above.

Friday, May 11, 2007

Maxi Tweak

Automatix2 will help you maxi tweaking your Ubuntu installation, providing access to loads of "proprietary" software, codecs and fonts and other interesting applications that are not part of the official distribution.

Feisty Fawn

Yesterday, I started an update to the new Ubuntu release. The only problem so far is that my web cam has now been moved to another video device (/dev/video1) instead of /dev/video0 which is the default. It took some time to understand it, at first, I thought that it had stopped working. It is by trying out camorama -d /dev/video1 that I discovered the shift and I still wonder how to move it back to video0. One possible reason would be that Feisty is now recognising partly my TV card. This could be the start of an answer and solution.

Thursday, April 5, 2007

Epson Stylus Scan 2000 on Ubuntu

I had an old Epson Stylus Scan 2000 that windows XP had rendered useless (the 2k drivers refused to work on XP). I decided to give it a go under Ubuntu. It worked like a breeze or almost. Printing was as simple as connecting and adding a new printer from the configuration panel. Scanning was just a bit harder, i.e. a matter of helping xsane with the product and device identifiers unearthed here and adding usb 0x04b8 0x0105 to epson.conf in the /etc/sane.d directory.

The Ultimate Calendar Syncing Solution

Here is the problem: How to keep all your calendars in sync, access them from your mobile devices, from your desktop and on the go, from remote terminals. The answer is partly simple, Google Calendar. But it is far from enough. Here is what I do:

  • I have a Google calendar, which allows me to add events whenever I want and wherever I am, as long as I have an access to the Internet.
  • I install GCALDaemon on every machine that I need to access the Google calendar from a desktop application.
  • I setup sunbird on that machine, using the GCALDaemon URL (which is local).
  • On my windows machine, I install My Phone Explorer and sync to the sunbird calendar. I tried syncing to the same local URL as the GCALDaemon but that did not work.
This way I keep all in sync, whichever device my newly added events are coming from.

Monday, March 26, 2007

Editing PDF

pdftk will do all sorts of batch operations on your PDF files, extracting pages, merging, etc. All the features are on the home page.

Tuesday, March 20, 2007

Installing Gnocl

Gnocl is a Tcl binding to Gtk which provides access to most of the Gnome components and is an alternative to the regular toolkit called Tk that most Tcl programmers use. I am interested in Gtk (and thus Gnocl) because there exist a DirectFB backend for Gtk applications. However, installing Gnocl means compiling it, which means the installation of the following packages in ubuntu. You will have to install the development versions of these packages (and their dependencies):
  • libgtk2
  • libgnomecanvas2
  • libgconf2
  • libgnome-vfs
  • libgnome2
  • libgnomeui
  • libpanel-applet2

Thursday, March 1, 2007

DCS-5300G

I am trying to use one of these network cameras by d-link under linux. It sounds simple, it is not. The camera is MPEG4 compliant, so you should be able to connect to it via this url. However, I have not been able to make this work via mplayer or totem. mcamip seems to be doing a nice job on paper, but what I really want to do is to hijack the stream, not grab picture after picture and recompute a new stream from these.

Update: A little more research on the problem, and especially after this thread... Well it seems D-link provides a product that is standard on the paper only and very hard to work with from anything else than their software or from a Windows machine (with IE, not with firefox). The problem in the long run is even worse, since there seem to be a number of netcams that use the same type of programming and network interface. Apparently, some D-links are repackaged vivotek cameras.

Tuesday, February 20, 2007

IMAP and gmail

Most people are probably happy with using their browser for read mails. I am not. I want a separate application, preferably thunderbird, which gives me more flexibility and more responsiveness. I have been irritated for a long time that the only way around the problem was by accessing POP3 to fetch mails from the google service. I have been using IMAP for years and am not going back to a solution that is local only and will not allow me to access my mails from anywhere and from several terminals at the same time.

But there are ways to turn around the problems, by using some free hosting services. Here is what I did to make it all work:

  1. I started an account at an e-mail free hosting service that supports IMAP. There are at least two that will work: inmail24.com and fastmail.fm. Both services offer enough storage for a while, the second one forbidding use for businesses. You will have to look for the appropriate host name for IMAP, it is not always obvious.
  2. I have arranged to forward all incoming gmail emails to the account from one of these services. This account will never be public, since I only use it for forwarding.
  3. I also have arranged to keep all emails at google, since this offers me the security of a backup.
  4. In thunderbird, I have declared the "hidden" account as my gmail account.
  5. I have made sure to use the gmail settings for sending emails, since the account is hidden from the public.
  6. Whenever I need to create folders or to create filters for these new folders, I log in onto one of the free IMAP services and make the necessary modifications there.

Wednesday, February 14, 2007

Backup Solutions

In the era of the Internet, FileBunker is probably one of the most interesting things that I have seen. It uses one or several GMail accounts to backup your hard drive. All files are encrypted and kept secure as Google. Since Google uses redundancy for its files, chances that your data will be lost is minimal.

Tuesday, February 13, 2007

OpenWengo and microphone

I have spent a whole lot of my morning trying to figure out why OpenWengo was reporting an audio error. Suddenly, on their forums, I found out that there might be interferences when ESD is turned on. I switched it off, and I could here myself when using the 333 callback number. The icon still says that I have an audio configuration error, but I can ignore that.

WG111v2 Problems

I am not the only one, apparently... But I have not been able to install properly my USB wireless dongle from Netgear. It is a WG111v2 (a real v2), but despite trying to follow these and those instructions, it still does not work. I have better things to do for the time being, so that will be another day.

Tuesday, February 6, 2007

Forcing CPU frequency

Most of the time, you will want the operating system adapt the CPU frequency to the current demand. However, there are times when you would like to control the frequency better. On a laptop, you could turn it to the maximum when plugged in. Otherwise, you could artificially lower it to test how an application would behave on a machine that is worse than yours. This article gives a solution to the problem.

Windows Cohabitation

I started off with a completely clean new big disk. To be on the safe side, I installed Windows first, in order to be able to double boot. Since I wanted to be able to access files both from Windows and linux, I created a fat32 partition that I mount from linux. However, using fat32 seems outdated, especially since I will mostly use Linux. Another solution is then to mount a linux partition in Windows.

This means that I will have to remove the fat32 partition, which is still empty, or almost and recreate a new one, that I will use as the home partition. Editing fstab will be using volume identifiers. This post and this post might also help.

Firefox Extensions

I have been moving the following extensions to firefox:
Lately I have been adding the following ones:

Nice Editing Fonts

I am an emacs freak, have always been (well almost, started off with vi!) and would prefer to keep it that way. The initial ubuntu emacs experience is kind of deceiving since the fonts look rather ugly. I spent some time trying to find out different fonts but could not find one that was satisfactory.

I ended up installing another snapshot installation of emacs, following these instructions. Now, I can start emacs using the following command (Consolas is a TrueType font that I have been moving from a Windows installation and that is designed with programmers in mind).

emacs-snapshot-gtk -enable-font-backend -font "Consolas-9"

Samsung 225bw and Intel 915G

First impression, yesterday, was more or less the one of a nightmare. I ended up installing ubuntu, removing it for OpenSUSE and reinstalling ubuntu in the end. The reason? Trying to find why my newly bought Samsung 225bw would never use its preferred resolution of 1680x1050 (note the weird 16:10 format). It took a lot of digging, but here is what I did in the end. I don't have time to post the links, but this was the result of a thorough Google digging after all the pieces of information I could find...

My PC is a tiny AOpen XC Cube. In the end, the problem was once again the driver jungle that seems to prevail on Linux (I am sure that this will stabilise soon and that a few days of experience will help). For a half-beginner like me, it turned out to be really irritating.

So to make things work, I installed the alternative X11 server from Intel. To make this work, I followed these instructions. Once I had answered all the X configuration questions, it all worked!

The positive side of this... All the rest worked out of the box, including my web cam.

Why?

I am starting off a new company with a number of business partners and we will have to re-implement a lot of code so as to make it work on Linux. So I have dared to take the big step and am moving away from Windows, which has been my platform of choice. I poked around and the choice is ubuntu. I will be posing here some of my findings and what it feels like. This is mostly for myself and tracking what I have done, but maybe somebody else will find this interesting.