Posts Tagged ‘everytime’

How to disable PC Speaker on FreeBSD / Mute PC-Speaker on BSD kernels

Wednesday, May 16th, 2012


old school personal computer pc speaker / freebsd disable Pc-Speaker picture

After finding out How PC Speaker is muted on Linux , I've decided to also disable the annoying beeps on BSD. This is in tandem with the minimalistic philosophy I try to apply to every server I manage.

Also on BSD Desktop machines it is quite annoying especially if csh (C Shell) is used, everytime you press TAB you get the beep sound. On BSD beep sound produced on tab completion is louder than in Linux and that makes it even more annoying …

Disabling pc-speaker beeps on BSDs is done via a sysctl kernel variable:

freebsd# sysctl hw.syscons.bell=0
hw.syscons.bell: 0 -> 0

To further permanently disable on system boot add hw.syscons.bell=0 to /etc/sysctl.conf, e.g.:

freebsd# echo 'hw.syscons.bell=0' >> /etc/sysctl.conf


Well that's it no more mind drilling beeps :)


Possible way to Improve wordpress performance with wp-config.php 4 config variables

Tuesday, March 6th, 2012

Wordpress improve performance wp-config.php logo chromium effect GIMP

Nowdays WordPress is ran by million of blogs and websites all around the net. I myself run wordpress for this blog in general wordpress behaves quite well in terms of performance. However as with time the visitors tend to increase, on frequently updated websites or blogs. As a consequence, the blog / website performance slowly starts to decrease as result of the MySQL server read / write operations creating I/O and CPU load overheads. Buying a new hardware and migrating the wordpress database is a possible solution, however for many small or middle size wordpress blogs en sites like mine this is not easy task. Getting a dedicated server or simply upgrading your home server hardware is expensive and time consuming process… In my efforts to maximize my hardware utilization and increase my blog decaying performance I've stumbled on the article Optimize WordPress performance with wp-config.php

According to the article there are 4 simple wp-config.php config directvies useful in decreasing a lot of queries to the MySQL server issued with each blog visitor.

define('TEMPLATEPATH', '/var/www/blog/wp-content/themes/default');
define('STYLESHEETPATH', '/var/www/blog/wp-content/themes/default');

1. WP_HOME and WP_SITEURL wp-config.php directvies

The WP_HOME and WP_SITEURL variables are used to hard-code the address of the wordpress blog or site url, so wordpress doesn't have to check everytime in the database on every user request to know it is own URL address.


This variables will surely improve performance to Wodpress blogs which doesn't implement caching. On wp install with enabled caching plugins like WordPress Super Cache, Hyper Cache or WordPress Db Cache is used, I don't know if this variables will have performance impact …

So far I have tested the vars on a couple of wordpress based installs with caching enabled and even on them it seems the pages load faster than before, but I cannot say this for sure as I did not check the site loading time in advance before hardcoding the vars.

Anyways even if the suggested variables couldn't make positive impact on performance, having the four variables in wp-config.php is a good practice for blogs or websites which are looking for extra clarity.
For multiple wordpress installations living on the same server, having defined the 4 vars in different wordpress seems like a good idea too.

Upgrading Skype 2.0 to Skype 2.2 beta on Debian GNU / Linux – Skype Mic hell

Saturday, December 31st, 2011

Making Skype work with Alsa on Debian GNU / Linux

Though, I'm GNU / Linux user for many years now. I have to say, everything is not so perfect as many people present it.
Configuring even simple things related to multimedia on Linux is often a complete nightmare.
An example, today I've decided to upgrade my 32 bit Skype version 2.0 beta for Linux to 64 bit Skype 2.2 beta .
The reason I was motivated to upgrade skype was basicly 2.

a) My Skype run through 32 bit binary emulation with /usr/bin/linux32

b) I had issues with my skype if someone give me a Skype Call, while I have a flash video or some other stream in Browser (let's say Youtube).
Actually being unable to receive a skype call or initiate one while I have some kind of music running in the background or just some kind of Youtube video paused was really annoying. Hence until now, everytime I wanted to speak over skype I had to close all Browser windows or tabs that are using my sound card and then restart my Skype program ….

Just imagine how ridiculous is that especially for a modern Multimedia supporting OS as Linux is. Of course the problems, I've experienced wasn't directly a problem of Linux. The problems are caused by the fact I have to use the not well working proprietary software version of Skype on my Debian GNU / Linux.
I would love to actually boycott Skype as RMS recommends, but unfortunately until now I can't, since many of my friends as well as employers use Skype to connect with me on daily basis.
So in a way I had to migrate to newer version of skype in order to make my Linux experience a bit more desktop like …

Back to the my skype 2.0 to 2.2. beta upgrade story, the overall Skype upgrade procedure was easy and went smootlhy, setting correct capturing later on however was a crazy task ….
Here is the step by step to follow to make my upgraded skype and internal notebook mic play nice together:

1. Download 64 bit Skype for Debian from

For the sake of preservation in case it disappears in future, I've made a mirror of skype for debian you can download here
My upgrade example below uses directly the 64 bit Skype 2.2beta binary mirror:

Here are the cmds once can issue if he has to upgrade to 2.2beta straight using my mirrored skype:

debian:~# wget

2. Remove the old version of skype

In my case I have made my previous skype installation using .tar.bz2 archive and not a debian package, however for some testing I also had a version of skype 2.0beta installed as a deb so for the sake of clarity I removed the existing skype deb install:

debian:~# dpkg -r skype

3. Install skype-debian_2.2.0.35-1_amd64.deb downloaded deb

debian:~# dpkg -i skype-debian_2.2.0.35-1_amd64.deb

After installing skype, I installed pavucontrol A volume control for the PulseAudio sound server

4. Install pavucontrol

debian:~# apt-get install pavucontrol

PavUcontrol PulseAudio mixer screenshot

Pavucontrol has plenty of sound configurations and enables the user to change many additional settings which cannot be tuned in alsamixer

pavucontrol was necessery to play with until I managed to make my microphone able to record.

5. Build and install latest Debian (Testing) distribution alsa driver

debian:~# aptitude install module-assistant
debian:~# m-a prepare
debian:~# aptitude -t testing install alsa-source
debian:~# m-a build alsa
debian:~# m-a install alsa
debian:~# rmmod snd_hda_intel snd_pcm snd_timer snd soundcore snd_page_alloc
debian:~# modprobe snd_hda_intel
debian:~# echo 'options snd-hda-intel model=auto' >> /etc/modprobe.d/alsa-base.conf

In my case removing the sound drivers and loading them once again did not worked, so I had to reboot my system before the new compiled alsa sound modules gets loaded …
The last line echo 'options snd-hda-intel model=auto' … was necessery for my Thinkpard r61 Intel audio to work out. For some clarity my exact sb model is:

debian:~$ lspci |grep -i audio
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)

For other notebooks with different sound drivers echo 'options snd-hda-intel model=auto' … should be omitted.

6. Tune microphone and sound settings in alsamixer

debian:~$ alsamixer

Alsamixer Select Soundcard Debian Linux Screenshot
Right after launching alsamixer I had to press F6: Select Sound Card and choose my sound card (0 HDA Intel).

Following my choice I unmuted all the microphones and enabled Microphone Boost as well as did some adjustments to the MIC volume level.

Alsamixer My Intel SoundCard Debian Linux

Setting proper MIC Volume levels is absolutely necessery, otherwise there is a constant noise getting out of the speakers …

7. Use aumix to set some other sound settings

For some unclear reasons, besides alsamixer , I often had to fix stuff in aumix . Honestly I don't understand where exactly aumix fits in the picture with Alsa and my loaded alsa sound blaster module?? If someone can explain I'll be thankful.

Launch aumix to further adjust some sound settings …

debian:~$ aumix

Aumix Debian GNU Linux Squeeze Screenshot

In above screenshot you see, my current aumix settings which works okay with mic and audio output.

9. Test Microphone the mic is capturing sounds correctly

Set ~/.asoundrc configuration for Skype

Edit ~/.asoundrc and put in:

pcm.pulse {
type pulse
ctl.pulse {
type pulse
pcm.!default {
type pulse
ctl.!default {
type pulse
pcm.card0 {
type hw
card 0
ctl.card0 {
type hw
card 0
pcm.dsp0 { type plug slave.pcm "hw:0,0" }
pcm.dmixout {
# Just pass this on to the system dmix
type plug
slave {
pcm "dmix"
} {
type asym
playback.pcm "skypeout"
capture.pcm "skypein"
pcm.skypein {
# Convert from 8-bit unsigned mono (default format set by aoss when
# /dev/dsp is opened) to 16-bit signed stereo (expected by dsnoop)
# We cannot just use a "plug" plugin because although the open will
# succeed, the buffer sizes will be wrong and we will hear no sound at
# all.
type route
slave {
pcm "skypedsnoop"
format S16_LE
ttable {
0 {0 0.5}
1 {0 0.5}
pcm.skypeout {
# Just pass this on to the system dmix
type plug
slave {
pcm "dmix"
pcm.skypedsnoop {
type dsnoop
ipc_key 1133
slave {
# "Magic" buffer values to get skype audio to work
# If these are not set, opening /dev/dsp succeeds but no sound
# will be heard. According to the ALSA developers this is due
# to skype abusing the OSS API.
pcm "hw:0,0"
period_size 256
periods 16
buffer_size 16384
bindings {
0 0
I'm not 100% percent if putting those .asoundrc configurations are necessery. I've seen them on archlinux's wiki as a perscribed fix to multiple issues with Skype sound in / out.

Onwardds, for the sake of test if my sound settings set in pavucontrol enables the internal mic to capture sound I used two programs:

1. gnome-sound-recorder
2. arecord

gnome-sound-recorder GNU / Linux Screenshot

gnome-sound-recorder is probably used by most GNOME users, though I'm sure Linux noviced did not play with it yet.

arecord is just a simple console based app to capture sound from the microphone. To test if the microphone works I captured a chunk of sounds with cmd:

debian:~$ arecord cow.wav
Recording WAVE 'cow.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono

Later on I played the file with aplay (part of alsa-utils package in Debian), to check if I'll hear if mic succesfully captured my voice, e.g.:

debian:~$ play cow.wav
File Size: 22.0k Bit Rate: 64.1k
Encoding: Unsigned PCM
Channels: 1 @ 8-bit
Samplerate: 8000Hz
Replaygain: off
Duration: 00:00:02.75
In:100% 00:00:02.75 [00:00:00.00] Out:22.0k [-=====|=====-] Clip:0

By the way, the aplay ASCII text equailizer is really awesome 😉 aplay is also capable of playing (Ogg Vorbis .ogg) free sound format.

Further on, I launched the new installed version of skype and tested Skype Calls (Mic capturing), with Skype Echo / Sound Test Service
I'll be glad to hear if this small article, helped anybody to fix any skype Linux related issues ?. I would be happy to hear also from people who had similar issues with a different fixes for skype on Linux.
Its also interesting to hear from Ubuntu and other distributions users if following this tutorial had somehow helped in resolving issues with Skype mic.

Little Registry Cleaner (Free Software / Open Source Windows XP Registry Cleaner)

Saturday, December 17th, 2011

Little Registry Cleaner - Free and Open Source Software Windows XP Registry cleaner / Alternative to Registry Booster
Have you ever wondered, if there is a free (open source) software that could fix Windows XP registry irregularities e.g. (obsolete or unwanted items that build up in the registry over time.)?

I did not either until now, however when I had to fix, few Windows XP computers which was not maintained for a long time fixing the Windows registry was necessery to make the sluggerish computers improve their overall stability and performance.

The reasons of the slowness in computers who run for a long time by users who does not have a "computer culture" are obvious.
Windows programs which has incorrectly placed registry records withint the Windows registry database, Programs which on Uninstall / Removal left behind a lot of registry records just to hang around because of impotent (coders), or records created on purpose on program uninstall to intentionally further track the user behavior etc.
Other reasons why Windows registry gots bloated with time, are due to Malware or polymorphic Viruses which load them selves everytime on Windows load using some obscure registry records.

Though I'm not a big proprietary software lover still my job as a system administrator , enforces me to fix some broken Windowses.
I haven't fixed Windows machines for a long time, so my memories on programs that clean up registry are from my young years.

The software, I've used before to fix Windows 2000 / XP Registry was:

1. Registry Booster

From my current perspective of a free software hobbyist / evangelist it was important for me to clean up the Windows PCs with a program that is Free or Open Source Software.
When I'm asked to fix some Windows computer I always do my best to make most of the programs that roll on the PC to be FOSS.

Using FOSS instead of downloading from torrents, some cracked software has multiple benefits.

1. Usually Free Software is more stable and more robust2. FOSS software for Windows usually does not come with Malware / Spyware as many of the cracked proprietary software

3. Free and Open Source Programs are simplistic in interface and way of use

A bit of research if there is a Free (Open Source) Software immediately lead me to a program called Little Registry Cleaner
You can see a screenshot of the program in the beginning of the article, the program is very easy to install and use and uses some .NET framework classes so right before installing it installs .NET library (code).

The use results of Little Registry Cleaner were amazing. Even though it is a free software the program found and fixed more registry problems than its competitor Windows Registry Booster! 😉

How to make wicd systray to appear in GNOME on Ubuntu 11.10 / How to fix missing wicd network manager systray on Ubuntu

Monday, November 7th, 2011

After upgrading my sis’s notebook from Ubuntu 11.04 to Ubuntu 11.10 on her Acer Aspire 5736Z the default gnome wireless network manager started behaving oddly.
The Network Manager did not show any networks, even though the network drivers showed that are loaded properly on the Linux host and using the normal commands like iwlist or iwconfig I could list and see the networks and even connect to a network.

As my sister is not a console geek like me it was necessery of course to have an easy way to connect herself to the Internet with nice GUI application. I personally love WICD Network Manager and as the default gnome manager was misbehaving I immediately installed her wicd.
With wicd , the wireless networks were properly listed and there was no connection issues to the wireless networks, however the wicd system tray was missing and hence everytime she wanted to connect to a wireless network, she had to keep wicd-client running active in the Dock or run it manually every time on connect, when she had to change her physical location and connect to another wireless network.
This of course is quite unhandy and gives her a bad image of Linux and I definitely want to make her love free software and GNU / Linux. Thus I want to give her a GNU / Linux she will be easy to use.

To make her more satisfied with her Ubuntu I googled around to see what causes the wicd systray to be missing after some research online I found out, its probably due to either wicd bug or some kind of interface changes in unity newer versions of Ubuntu. Some people online suggested a fix via changing values in gconf-editor but this work around by changing the values in gconf-editor:

'desktop' -> 'unity' -> 'panel'

I tried this suggested fix which was reported to work on Ubuntu 11.04 but the gconf registry suggested pathway was missing at all so this solution did not worked.

I further read some other suggested solution using wicd-client by invoking it with two args like so:

stanimira@ubuntu:~$ wicd-client -n &
...stanimira@ubuntu:~$ wicd-client -a &

This proposed solution did not worked either, then I found in one of the Ubuntu bugs reports, a little shell script ( that changes some values in gconf so I proceeded downloaded and give it a try:

stanimira@ubuntu:~$ wget
stanimira@ubuntu:~$ sh

For my surprise running the script doesn’t immediately changed nothing and wicd wireless connectivity indicator was still missing from the tray.
I thought it might need to reload gnome so I give it a restart and HOORAY! after the restart the WICD connected wireless strength show up, like you can see in the screenshot below 😉

Wicd indicator running in systray on GNOME in Ubuntu 11.10

Now hope this fix will, help out there experiencing the same issues to work around his wireless network connectivity issues 😉 Cheers.

Substitute for the Gnome bluetooth / Or how to properly manage your bluetooth (obex) connections in Gnome

Saturday, June 5th, 2010

I connect my Nokia 9300i mobile phone over bluetooth every now and then. In that connection, everyoften I do experience problems with properly connecting the device to my notebook running Debian Squeeze/Sid Unstable on it’s Desktop.
Until recently it really annoyed me that I had to loose time restring the Linux system sometimes when an access to the mobiledevice was failing, without any good trackable error message.
The connection error I have experienced quite often when I was trying to browse my Nokia 9300i cellphone using the bluetooth protocolon Linux was:
“the name org.openobex.client was not provided”
You can read about a similar error to the one encountered by me when using bluetooth on my Debian Linux in debian bugs mailing list on osdir
The way I solved the issues with connecting over bluetooth on Linux until recently was by rebooting the whole Linux system (dumb)!.
Some other things I try to get arround the bluetooth connection errors was by trying to re-enable my bluetooth notebook embedded device on my Lenovo Thinkpad with command:

root@noah:~# echo disable > /proc/acpi/ibm/bluetooth
root@noah:~# echo enable > /proc/acpi/ibm/bluetooth

I alsy tried to physically remove the bluetooth module, rfcomm and a few other modules which were preventing the removal with rmmod of the bluetooth module.
However this solution did’t help either .. To solve the issues I tried few other stuff one of which was installing libobexftp0 and obexftp since my Nokia 9300i uses the obex protocol to communicate with the computer through bluetooth

I have to note that so far I have used the embedded general gnome application Gnome Bluetooth by using the bluetooth-applet .

Well all my worries came to end finally by simply using another piece of bluetooth communication software callde blueman
Since I have installed that handy software bluetooth is working perfectly fine everytime with my mobile. I warmly recommend to everybody out there to switch to the blueman which is a substitute for the old crappy gnome-bluetooth pack
check out the up-mentioned provided website.
It’s probably also worthy to say that the blueman app is written in python.
Well I’m pretty happy now whilst using blueman, hopefully you’ll enjoy it too as well as solve your bluetooth issues ! 🙂