2013-04-10

Poor bass-less sound on HP EliteBook 2560p

Every once in a while the audio in my EliteBook 2560p (Windows 7) does not work properly:    Music on the headphones sounds as if it was being played through a high-pass filter, and at a low volume.    

I thought it was an issue with the fact that the audio jack is prepared for a headset (with microphone) and not really for regular headphones.  

But it turns out that the audio problem goes away some times, and music sounds just fine.

I rarely reboot this machine:  I either suspend it, or hibernate it.    It seems something goes wrong with the audio sometimes when sleeping/hibernating, but I never knew what it is.

Today I finally found a solution:   There is a Windows 7 service called "STacSV" ("Audio Service", described as "Manages audio jack configurations").    The service was stopped;   all I had to do is hit "Start", and the music on the headphones instantly began to sound correctly in full frequency range, with proper bass and volume.


2012-07-23

HP EliteBook 2560p missing Page Up/Down keys

My work machine is an HP EliteBook 2560p.    When it was given to me, I was shocked to see that a professional machine had no page-up / page-down keys.      Instead one has to press FN+arrow up / FN+arrow down to get the page-up/down functionality.     So.... what about when I have to press CTRL+PGUP (for instance, to switch worksheets in Excel)?    I would have to press CTRL+FN+UP....    three keys!!!

That was too much for me.     This madness had to stop.    

The simplest solution was to remap other keys to pure PGUP/PGDOWN functionality to get around the poor design in this HP laptop.  

So I used "KeyTweak" (http://webpages.charter.net/krumsick/) to remap the right Windows-meny key and the right CTRL key into PGUP and PGDOWN respectively.     It works.

2012-06-16

Windows 7 and old 3com OfficeConnect wifi AP

Windows 7 came finally into my life when I got a new work PC.   No chance of getting XP... sadly.
One of the first problems I ran into appeared when trying to connect this Windows 7 machine to a (somewhat old) 3com OfficeConnect WiFi access point.    This is an AP that has properly established WiFi connections with all sorts of old and new equipment (iPhones, Android smart phones, very old Nokia N95 phones, XP PCs, Macs, .... anything).    But now this Windows 7 machine would have lots of trouble connecting to the AP.     Sometimes it would establish the connection after 5 minutes trying, but mostly it just didn't connect.    The Windows 7 system does connect to other APs, though.

The Windows 7 network troubleshooter was of no help at all. 

In trying to solve my problem, I installed Intel's ProSet Wireless utility (the machine has an Intel Centrino Advanced-N 6205 networking chip) with the hopes that it would manage the connection to the AP better than Windows 7 did.    No luck.... but at least this nice tool does provide quite some technical details about the connection it is trying to establish.      So I saw that Windows 7 was trying to assign an IPv6 address to the network connection with the AP.   This AP does not have IPv6 support, so I don't understand why Windows 7 is so keen in using IPv6 with it.

Nevertheless, I thought this might be the issue.... so I disabled the IPv6 stack in the Windows 7 wireless network adapter configuration (see screenshot below),  and that did it:     Now Windows 7 connects to this AP normally in a few seconds, and a proper IPv4 connection gets established.



2011-12-18

Google chrome install problem on Windows XP

I ran into a problem installing Google Chrome on Windows XP (Professional).
When running the installer (the small file that you can obtain from the Google Chrome webpage), the install process would end very very quickly. In theory it should download the full Google Chrome software from the internet, and then the install process would begin.
For some reason, the process was too quick on my machine. In fact, after installing, it appeared as if it had not been installed really. There was no Start menu entry for Chrome, nor could it be executed.
I suspected it had to do with an old installation of Google Chrome (from months ago) that for some reason did not work either.
The solution was to remove all old Chrome Files (basically removing the folder C:\Documents and Settings\\Local Settings\Application Data\Google\Chrome), and do a new install from the Google Chrome webpage.

Great file search tool for Windows (NTFS)

A couple of weeks ago I came across this great tool for Windows (I am using XP), for searching for files by their filename. It works only with NTFS volumes (because it makes use of NTFS features), but it is simply amazing. You can type any part of a filename, and it is located instantly. There is no waiting to do.

Highly recommended: Everything search engine, by David Carpenter (http://www.voidtools.com)

2010-12-18

Mount removable drives from command line

This is too simple, but it took me a while to find this type of solution, so I want to post it here to keep track of it, next time I need it:

I have an Ubuntu (10.x) with a couple of users. Some need to use the GUI (Gnome or XFCE) to work, including accessing removable media. Other users need (or rather, wish) to use the CLI to access removable media. This means /etc/fstab may not have specific entries for removable media (say, /dev/sdg1) with the "user" option, because this would block Nautilus (Gnome) or Thunar (XFCE) from automatically mounting the removable media for the GUI users.

So I just found that there exists a mount wrapper called pmount. (to install in an Ubuntu system, simply sudo apt-get install pmount). The CLI user now has a few aliases in his .csh file to easily mount and umount several types of removable media:

alias flash 'pmount /dev/sdf1 photo_sd' (for SD cards)
alias cflash 'pmount /dev/sdc1 photo_cf' (for Compact Flash cards)
alias pen 'pmount /dev/sdg pen' (for flashdrives)
alias pen1 'pmount /dev/sdg1 pen1' (for the 1st partition in a flashdrive)

All of the above create mount points ( /media/photo_sd, /media/photo_cf, etc...).
To unmount each of them, I've set up aliases too:

alias flash-u 'pumount photo_sd'
alias cflash-u 'pumount photo_cf'
alias pen-u 'pumount pen'
alias pen1-u 'pumount pen1'

2010-03-31

Bluetooth crashes randomly in Ubuntu 9.10

I installed Linux Ubuntu 9.10 (Karmic Koala) in my Dell Mini 9 (Inspiron 910). Everything works fine, except for the bluetooth support. Occasionally, the bluetooth service apparently dies, and I don't know exactly why. When this happens, I cannot restart the bluetooth service simply with "service bluetooth restart"; even after doing that, the report resulting from "service bluetooth status" is "Bluetooth is *not* running". There are no logs that could give a clue as to what's going on. Since the bluetooth service is down, the bluetooth application (blueman) does not work either.

The bluetooth device in this Dell mini is a USB device identified as:
Bus 005 Device 004: ID 413c:02b0 Dell Computer Corp.
You can check your machine with this command: "lsusb -v |grep Bluetooth"

I figured that the hardware bluetooth device must be switched off (again, for some odd reason), and sure enough, that seemed to be the problem. So the solution I found is:

  1. Turn the hardware bluetooth device on
  2. Restart the bluetooth service
  3. Run my bluetooth application (blueman)
Step by step, this means:

1) Turn the hardware bluetooth device back on. The best way I found to do this is by using the "aircraft manager" application. You can install this with this set of commands:
sudo add-apt-repository ppa:opensource-subakutty/ppa
sudo apt-get update
sudo apt-get install aircraft-manager
Now you will have a nice command-line tool, /usr/bin/aircraft-manager-util
To use it:
/usr/bin/aircraft-manager-util BT on (to turn bluetooth on)
/usr/bin/aircraft-manager-util BT status (to check the status of the bluetooth hardware)

2) Once the device is turned on, restart the bluetooth service in Linux:
sudo service bluetooth restart

You can check that the service is indeed running:
sudo service bluetooth status

3) Restart your blueman applet:
killall blueman-applet
blueman-applet &

At this point, the bluetooth application should be fully operational again.

References:
http://www.ubuntumini.com/2009/12/aircraft-manager-turn-wifi-bluetooth.html
http://blueman-project.org/

2009-12-09

Sound settings in Ubuntu

After a fresh install of Ubuntu (9.04 and 9.10 at least), the sound in my system would be muted as soon as the user logs in. I don't know whether this has to do specifically with the type of sound card (HDA Intel - SigmaTel STAC9227), or something else in my system. I couldn't figure out how to save the volume settings across machine reboots so that sound would be unmuted when the user logs in.

In the end I set up a script to set volume values with Alsa's amixer, and I have this script executed in the ~/.config/openbox/autostart.sh file. I assume the script can be included in ~/.xinitrc as well.

Sample script:

amixer set 'Master',0 100% unmute
amixer set 'PCM',0 100% unmute
amixer set 'Front',0 100% unmute
amixer set 'Surround',0 100% unmute
amixer set 'Center',0 100% unmute
amixer set 'LFE',0 100% unmute
amixer set 'Side',0 100% unmute

2009-06-12

Custom desktop menu on xfce 4.6

Here's a few things I had to do to get a custom right-click desktop menu on XFCE 4.6:

1) Disable desktop icons: You have to use XFCE in "classical" Unix desktop... i.e., no icons on the desktop itself. You can still drag and drop between Thunar windows, but not between Thunar and desktop. To do this, run (from a terminal):

xfconf-query -c xfce4-desktop -p /desktop-icons/style -s 0

2) Next, make sure the desktop menu is enabled:
xfconf-query -c xfce4-desktop -p /desktop-menu/show-icons -s true
xfconf-query -c xfce4-desktop -p /desktop-menu/show -s true

3) Finally, edit your desktop menu as you like. The per-user desktop menu is typically in this file:
~/.config/menus/xfce-applications.menu

As an example, here is my menu file. The "Include" section contains the menu items that will be used in the "Layout" section. Menu items are described by ".desktop" files found in /usr/share/applications/. You can also define your own ".desktop" files, and place them under ~/.local/share/applications/

In the example xfce-applications.menu file shown below, I created a "virtualbox.desktop" file under my local applications directory, because I didn't find one under the system directory /usr/share/applications.

Content of ~/.config/menus/xfce-applications.menu :


<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">


<Menu>
<Name>My_desktop_menu</Name>

<DefaultAppDirs/>
<DefaultDirectoryDirs/>

<Include>
<Filename>xfce4-logout.desktop</Filename>
<Filename>gnome-terminal.desktop</Filename>
<Filename>xterm.desktop</Filename>
<Filename>gnucash.desktop</Filename>
<Filename>keepassx.desktop</Filename>
<Filename>rhythmbox.desktop</Filename>
<Filename>pidgin.desktop</Filename>
<Filename>virtualbox.desktop</Filename>
</Include>

<Layout>
<Filename>xterm.desktop</Filename>
<Separator/>
<Filename>gnucash.desktop</Filename>
<Separator/>
<Filename>pidgin.desktop</Filename>
<Filename>keepassx.desktop</Filename>
<Filename>rhythmbox.desktop</Filename>
<Filename>virtualbox.desktop</Filename>
<Menuname>Applications</Menuname>
<Menuname>Settings</Menuname>
<Filename>xfce4-logout.desktop</Filename>
</Layout>



<Menu>
<Name>Settings</Name>
<Directory>xfce-settings.directory</Directory>
<Include>
<Category>Settings</Category>
</Include>
<Exclude>
<Category>System</Category>
</Exclude>

<Layout>
<Filename>xfce-settings-manager.desktop</Filename>
<Separator/>
<Merge type="all"/>
</Layout>

<Menu>
<Name>Screensavers</Name>
<Directory>xfce-screensavers.directory</Directory>
<Include>
<Category>Screensaver</Category>
</Include>
</Menu>
</Menu>


<Menu>
<Name>Applications</Name>

<Menu>
<Name>Accessories</Name>
<Directory>xfce-accessories.directory</Directory>
<Include>
<Or>
<Category>Accessibility</Category>
<Category>Core</Category>
<Category>Legacy</Category>
<Category>Utility</Category>
</Or>
</Include>
</Menu>

<Menu>
<Name>Development</Name>
<Directory>xfce-development.directory</Directory>
<Include>
<Category>Development</Category>
</Include>
</Menu>

<Menu>
<Name>Education</Name>
<Directory>xfce-education.directory</Directory>
<Include>
<Category>Education</Category>
</Include>
</Menu>

<Menu>
<Name>Games</Name>
<Directory>xfce-games.directory</Directory>
<Include>
<Category>Game</Category>
</Include>
</Menu>

<Menu>
<Name>Graphics</Name>
<Directory>xfce-graphics.directory</Directory>
<Include>
<Category>Graphics</Category>
</Include>
</Menu>

<Menu>
<Name>Multimedia</Name>
<Directory>xfce-multimedia.directory</Directory>
<Include>
<Category>Audio</Category>
<Category>Video</Category>
<Category>AudioVideo</Category>
</Include>
</Menu>

<Menu>
<Name>Network</Name>
<Directory>xfce-network.directory</Directory>
<Include>
<Category>Network</Category>
</Include>
</Menu>

<Menu>
<Name>Office</Name>
<Directory>xfce-office.directory</Directory>
<Include>
<Category>Office</Category>
</Include>
</Menu>

<Menu>
<Name>System</Name>
<Directory>xfce-system.directory</Directory>
<Include>
<Category>System</Category>
</Include>
<Exclude>
<Filename>gnome-app-install-xfce.desktop</Filename>
</Exclude>
</Menu>

<Menu>
<Name>Other</Name>
<Directory>xfce-other.directory</Directory>
<OnlyUnallocated/>
<Include>
<All/>
</Include>
<Exclude>
<Category>X-Xfce-Toplevel</Category>
</Exclude>
</Menu>
</Menu>

</Menu>

2009-05-23

Verify DNIe Linux software's signature

The spanish electronic national identity card, known as DNIe (Documento Nacional de Identidad Electrónico) contains user certificates for authentication and for signature.

It can be used on Linux, Windows, and MacOSX systems, and the Spanish Ministry of Interior distributes software for each platform to enable the use of the DNIe. The official webpage is http://www.dnielectronico.es/. Software packages and related documents are distributed along with a signature file to verify their authenticity and integrity, before you use them on your computer.

The DNIe website states that OpenSSL is used to verify the signature, but they don't provide step-by-step instructions to make it easy for users to verify signatures (in fact they claim that the signature "will be useful for users with advanced computer knowledge who wish to verify the integrity of the software packages", which I think is not very nice on the part of the Ministry, as they should promote signature verification by making it easy for people who don't know how to do it, not only experts). Even after searching on the Internet, I found no quick guide to help the novice user verify those signatures.

It turns out they do use OpenSSL to sign their files, but they omit some details, which I wish to document in this post: They distribute a certificate file, of which one needs to extract the key first, and they used SHA1 for the digest for the signature.

They provide a certificate to verify signatures, found here: http://www.dnielectronico.es/seccion_integradores/cert_fir_cod_des.html

When using OpenSSL to verify a signature, one must provide the public key, but OpenSSL doesn't take the certificate file directly. Therefore, the following steps are needed to extract the public key from the DNIe software signature certificate:

> unzip CertCodeSigning.zip (will output "CertCodeSigning.pem")
> openssl x509 -inform pem -in CertCodeSigning.pem -pubkey -noout > DNIeCodeSigningKey.pem

Now we have the public key in file "DNIeCodeSigningKey.pem".

Finally, we can run the OpenSSL command to verify a signature.
For instance, let's say you have downloaded the following two files: DNIe_v4_0_0.zip and DNIe_v4_0_0.zip.sign (DNIe CSP drivers for Windows).
In order to verify the signature, run the following command:
> openssl dgst -sha1 -verify DNIeCodeSigningKey.pem -signature DNIe_v4_0_0.zip.sign DNIe_v4_0_0.zip

The equivalent command to verify the signature of DNIe software packages for linux would be:
> openssl dgst -sha1 -verify DNIeSoftSigningKey.pem -signature opensc-dnie_1.4.5-1_i386_Ubuntu_Intrepid_Ibex.deb.tar.sign opensc-dnie_1.4.5-1_i386_Ubuntu_Intrepid_Ibex.deb.tar

The result of both commands should be a message "Verified OK". If you get something different, double check the steps above, or make sure you are downloading the right DNIe software.