Posts

Ubuntu 9.04: Microphone issues

2 min read

Continuing the discussion of audio configuration issues on Ubuntu 9.04…

If you are using Skype, please also read my next article that discusses Skype on Ubuntu 9.04.

I suggest testing the microphone with the “Sound Recorder” that is found in the “Applications”->”Sound and Video” menu of the top bar on the Ubuntu desktop. Ensure that “voice, lossless (.wav)” (may vary according to your language) is selected. Click on “Record” and talk to the microphone. The “Level” bar should increase as you talk louder. Click on “Stop” and “Play” to hear if your voice was recorded sucessfully.

Ubuntu 9.04: Skype issues

2 min read

This article addresses an issue similar to another that I have already adressed for Ubuntu 8.04: How to correctly configure Skype on Ubuntu 9.04.

First, I assume that Skype was installed from midibuntu.org repositories.

Issue 1: Speakers do not work.

The first required configuration change is setting Skype to use Pulse Audio Support instead of default (ALSA) sound drivers. Go to Skype->Options->Audio Devices. Select “pulse” for all audio devices.

I also recommend to disable an option like “Allow Skype to automatically adjust mixer levels” for this first moment. While this option was enabled, I have experienced Skype undoing the correct configuration and turning off my microphone volume before each call . After you manage to have Skype working fine, then you may enable this option again to see if Skype continues working fine 🙂

How to correclty calculate days between two days

2 min read

The standard Java API has no solution to calculate the period between two days, although this is a common request for someone who is doing calendar arithmetic.

Googling around, the are many people who expose their own solutions (see some of them 1, 2, 3, 4).  All them suggest getting difference between the two dates, measured in number of milliseconds, and divide by 1000 * 60 * 60 * 24 (that means, the number of milliseconds in a day typical day).

Regex that matches path, filename and extension

2 min read

I was looking for a regular expression for Python capable to match a string containing a valid path, file name and extension. Finally, I discovered following solution:
^(.*/)?(?:$|(.+?)(?:(\.[^.]*$)|$))
Let me explain how I got this regular expression. Fortunately, Scott Carpenter has written an excellent article about a regular expression to match a file name with extension. Matching the file name extension is not trivial for all possible situations.

Skype on Ubuntu 8.10: microphone and internal speaker issues

3 min read

It has been a long time since my last post… Also, it has been some time I managed live without a PC and Internet. Now I have a PC and Internet again and I took the chance to immediately install Linux!

Updated: I also solved the issue of skype consuming 100% cpu during a call.

Although the Ubuntu Guide has a good description how to install Skype on Ubuntu Intrepid, it can be quite challenging to place a call successfully. Shame on Gnome, Pulse Audio and Skype! I had to overcome following issues:

Resume scp/rsync file transfer

1 min read

This is very basic Linux knowledge, but the question has arisen too often and I decided to document it.

Problem:

Transfer (or upload/download) a large tree of files and directories from one machine to another using a ssh connection, and being able to resume/continue if the operation is interrupted.

Solution:

Until now, I believe that the best solution is using rsync over ssh, since rsync has a feature to resume interrupted file transfer, even when an entire tree of directories is involved.

About Trilead SSH open source project

2 min read

Some time ago I have written an article about the JSch open source project. However, I soon lost all my motivation when I faced, again, the code complexity required for JSch just to start a execution session, a file copy or a port forwarding with JSch. Nevertheless the completely misunderstood authentication API for JSch let me to a mood even worse. I started looking for alternatives and fortunately I found Trilead SSH, a pure Java implementation of SSH, available with the BSD license.

PCMan: the real and true Gnome file manager

4 min read

I have modified this post after several people complained that I was misunderstood: Nautilus can, sure, display a tree view of the file system. Sure, but only for “who-knows-how”.

I do not like Gnome desktop environment because of its excessively simplified GUI that leverages all users as if they lack minimal skill to interact with a computer. And what I dislike most on Gnome is even more oversimplified vision of the file system provided by Nautilus on its default configuration.

Fortified compiling prevents building older RPM

1 min read

Today I had to build and test some older Open MPI RPM packages. However, I was prevented to build them, although the code apparently was correct.

The command:

rpmbuild -ba openmpi-1.2.1.spec

The error message was:

In function 'open',
    inlined from 'orte_abort' at runtime/orte_abort.c:91:
/usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments

The line of source code that causes the error is:

A poem about Subversion

2 min read

I found an interesting poem from Peter Kriens about SVN (subversion) that was posted to the Eclipse committer mailing list. Really interesting how frustration can encourage your imagination in others arts besides computer programming.

(I do not want to start a new discussion about pros vs. cons of SVN. Neither discuss who is right or who is wrong. I am sharing the poem just because it is curious.)

Hear! Hear! And I started drinking way too much coffee due to SVN because it gives me ample time … Last year I wrote my first poem ever (and likely last) during a checkout:

Oh, how I long for the days of CVS
When checkouts were a bless
Updates found to be a breeze
And a build went in a wheeze
Now we are old and wise
It is SVN that I despise
A simple checkout takes forever
And often it ends never
It is hungry for files and directories
About disk usage it has no worries
And with its split personality
Using it from the shell has a penalty
But alas, progress should not be blamed
Directories can now be renamed!- A sad SVN user

Ok, I won’t pursue a career in this area, but it illustrates my frustration …

Kind regards,

Peter Kriens