Experimenting with Camfrog and Linux
Sep 14th, 2008 by Andrew
Lately I’ve been enjoying the Camfrog video chat program. I’ve had to run it on an old Windows machine because my main desktop computer has Linux. There is a Linux server version of Camfrog for people who want to host their own chat room, but no Camfrog client version. This got me wondering if I could run the program on my Linux desktop using Wine or some other solution.
First I figured I had better get the webcam working under Linux. This turned out to be very easy. A check at the LibLand web site told me that I needed the gspca driver for my Logitech Communicate STX webcam. I have OpenSuSE Linux, so I used YAST to search for the software package and it came up with the gspcav-kmp-default package, which I installed. I remembered from previous trials with the webcam that the module needs to be loaded using the modprobe command.
In a terminal I did the following:
su
[enter root password]
modprobe gspca
exit
I used Skype to test out the webcam and it worked fine. The gspca module seems to load or unload when the webcam is plugged in or removed.
With the webcam now working, I downloaded the Windows version of the Camfrog video chat client and ran the install in a terminal using wine:
wine camfrog.exe
This worked really well and if I had needed to sign up for an account name I could have. As I already had a Camfrog username, I cancelled the sign-up and went straight to the login. This also worked flawlessly and my hopes were getting higher. But alas when attempting to join a chat room, the program would crash every time. After Googling around a bit I found this seemed to be the same situation for others. I would have to come up with a new plan.
Quite by chance I was reading my copy of APC magazine (an Australian PC mag) when I came across an article on virtualisation using VirtualBox. This allows the user to install another OS in a virtual environment on top of their host OS. To some this might seem a silly solution because you could just have a dual-boot machine. But to me it seemed a great idea because of the ability to run the extra OS like a program without the hassle of rebooting every time.
The magazine article suggested using your package installer to install VirtualBox, and I made this mistake! What the article failed to mention was that VirtualBox has two versions; an open source version without USB support (needed for the webcam) and a propriety version by Sun that has USB support and is free for private use. Go to the VirtualBox web site and get the propriety version. I found I could get the 1.6.6 stable version working well but not the experimental 2.0.2 version.
I had several goes at getting everything working properly because I didn’t know what I was doing, but the following instructions are based on my successful attempt. For OpenSuSE 11 to work with USB I had to do the following:
Add my username to the virtualbox group so I that had the correct permissions. I did this with YAST - Security and Users - User and Group Management
Find out the VirtualBox devgid (mine was 109)
cat /etc/group | grep vboxusers
Add the following entries in /etc/fstab in this order. (where xxx is the vboxuser gid)
/sys/bus/usb/drivers /proc/bus/usb usbfs devgid=xxx,devmode=664 0 0
none /dev/bus/usb usbfs devgid=xxx,devmode=664 0 0
Also add the following line in /etc/init.d/boot.local
mount -a
Reboot
Please note that this was peculiar to my Linux version and not every step may be necessary for your distro.
After installing the right version of VirtualBox for my hardware, I was able to run VirtalBox from my KDE menu under System - Sun xVM VirtualBox. The set-up is pretty srtaight forward if you read the dialogue boxes. Once you have created your virtual disk it’s a matter of popping your Windows XP install disk in the CD drive and checking a few settings on VirtualBox. Most important is to click on the CD/DVD ROM drive settings and make sure the mount setting is checked. This allows the Windows install disk to be booted. I also enabled Audio and USB, as the whole point of the exercise was to run Camfrog.
Pushing the green Start arrow on VirtualBox had me up and away with my Windows install on the virtual drive. The APC mag article said they needed to unmount and remount the CD after Windows first virtual reboot during install, so I did this using the Devices menu on VirtualBox and it all went well. I didn’t need to do this during the second virtual reboot. It wasn’t long before I was staring at a Windows desktop on top of my Linux desktop. Very amusing!
To get my webcam working I shut down Windows and went into the USB settings and the added a device filter for my webcam. Clicking the add filter from device showed up three possible choices (probably my keyboard, mouse, and webcam). I didn’t know which was which, so I used YAST - Hardware - Hardware information to get a report on all my gear. There is probably an easy command line way of finding the same info, but hey, I’m a point and click type of guy. I could see a label in the hardware information for my Logitech webcam that sort of matched one of the three VirtualBox choices, so I picked that one.
After starting Windows again, I installed the Logitech software that came with my webcam and after completing the set-up I could record videos with sound. Recording sound is only an option through USB, but luckily my webcam has a built-in mic. Plugging in a mic to my sound card didn’t work. I installed the Camfrog video chat software (which I download using IE). This time it all worked. My video wasn’t as smooth as on a native Windows machine, but I think this is down to the USB support provided on VirtualBox. Video from others was perfectly smooth depending on their Internet connection. The Camfrog program itself was very stable and worked just fine.
This might seem like a lot of work to get a Windows program working on Linux, but it was a fun learning experience and if I come across another Windows only program I would like to use, I now have everything set up.


