Author Archives: Hans Henrik

A little wireless trick

My media center PC has a wireless network adapter and of cause a BIG blue light on the front of the PC.

As wireless network connection and a media center (with slow CPU) streaming movies is not a good combination I wanted to disable the wireless card.

To do that I used the command ifconfig.

First type:

$> ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:01:02:03:04:05:06 
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::201:2eff:fe3b:c50f/64 Scope:Link
          RX packets:154476 errors:0 dropped:0 overruns:0 frame:0
          TX packets:77817 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:168840925 (168.8 MB)  TX bytes:5938729 (5.9 MB)

lo        Link encap:Local Loopback  
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:376 errors:0 dropped:0 overruns:0 frame:0
          TX packets:376 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:45071 (45.0 KB)  TX bytes:45071 (45.0 KB)

wlan0     Link encap:Wireless  HWaddr 00:01:02:03:04:05:07
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::201:2eff:fe3b:c60f/64 Scope:Link
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

As you can see from the output I have 3 network adapters: eth0, lo, wlan0.
You might get other output, like eth1, lo, wlan0 etc.

I want to disable the wireless adapter: wlan0

At the command line I type:

$> sudo ifconfig wlan0 down
[sudo] password for gopher:

Then the wireless adapter is disabled and the stupid blue light is gone!

To enable the wireless adapter again type:

$> sudo ifconfig wlan0 up
[sudo] password for gopher:

Then the wireless adapter is enabled and the stupid blue light is on again!

To have the wireless adapter disabled every time the media center start add the command to the end of the file /etc/rc.local (before the exit 0).
Use a editor like nano or kate etc. to change the file.

$> sudo nano /etc/rc.local
!/bin/sh -e
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
# By default this script does nothing.

ifconfig wlan0 down

exit 0

Now I just found that out after a suspend the wireless network adapter was enabled again.

To solve it I have to disable the wlan0 adapter during the resume. Create a file called /etc/pm/sleep.d/20_custom_wlan0

$> sudo nano /etc/pm/sleep.d/20_custom_wlan0

Add the following to the file:

# Script to disable wlan0 before suspend and restart after wake.
case "${1}" in
                echo suspending 20_custom-wlan0
               echo Resumeing 20_custom-wlan0 - shutting down wlan0
               ifconfig wlan0 down

Save the files and make sure is executable:

$> sudo chmod 755 /etc/pm/sleep.d/20_custom-wlan0

The file is named 20<something> because I want the file to called a relative late in resume process. On my system there is a file called 60<something> which enable the wireless network adapter and I want to disable it again.

To see the scripts called during the suspend process go through the log file:


Thats it, good luck 🙂


First time for everything

My Kubuntu crashed, not seriously, but enough so Mysql would not start and KDE could not start properly. I had no desktop and all the widgets couldn’t be found.

I tried everything but I couldn’t find anything wrong except syslog and other log files were empty (zero bytes).

How could this happen I didn’t change anything, OK, I did a apt-get update/upgrade, but that could not crash the system? I did the update/upgrade at work without problems.

I messed with the system for a couple of hours and even reset the Bios. This gave me big problems as well, after the Bios reset the system would not start. Tried to reset a 1000 times. When I pressed the power button only a little buzz and then quiet again. Almost the hole computer was ripped apart, no help.
But there was a little shiny object on the motherboard, the battery!
I removed the battery and reset the plus/minus poles inserted the battery again and the system would start again.

I messed with log files again until the hammer hit me: Why would files be zero byte? Because there is no more space left on the partition…

I remembered the old command from SUN days: df.

someone@elena:/var/log$ df .
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/sdc5       30628800 30628800  0  100% /var

The next was the devil using all my disk space and the devil was Mythtv.
All the recordings is put in /var/lib/mythtv/<sub folders> in my case /var/lib/mythtv/livetv.

After moving the files to another partition and a reboot almost everything worked as normal. Had to reconfigure my Display setup and add a new default panel to the desktop.

Thunderbird and LDAP problems

If you have Thunderbird installed and is using LDAP to authorize user on Linux/Ubuntu you might get the same problem as I used to have.

The symptom could be Thunderbird crash after a minute or two.
You might see this is your /var/log/auth.log:

Jun  1 10:26:50 <host> thunderbird: nss_ldap: failed to bind to LDAP
server ldap:// Can't connect to the LDAP server
Jun  1 10:26:50 <host> thunderbird: nss_ldap: could not search LDAP 
server - DSA is unavailable

I solved the problem by installeing LDAP connection daemon – nslcd

sudo apt-get install nslcd

Configure nlscd to connect to your LDAP server.

You still have to configure Thunderbird if you want to use LDAP to lookup users.

Do I want big changes???

Just read a post at arctehnica (Ubuntu 14.04 review: Missing the boat on big changes) reviewing Ubuntu 14.04.

A good a review but it made me think about what I really want my OS to be when it get updated and what made me make the big step to Linux and KDE.

This first think that made me change OS was Adobe changing there license policy.
After years of saving and a lucky email from amazon I decided to bye Photoshop.
I was happy but didn’t really needed Photoshop but I had some pictures over time that need Photoshop and I was in the upgrade “path”. Getting a new version of Photoshop would be cheaper. Shortly after Adobe change is license policy so to get Photoshop I have to pay a monthly fee. That made me so mad that I decided never to use Adobe software again.

This also made me think about my OS. Was I happy with my OS?
Not really, It worked but missed all the good thing from my time working with Sun OS/Solaris.
Yes, I had Cygwin but so many things was not functioning well.

And then Microsoft came out with Windows 8 and I had to take a short look at it and I haded it. I would NEVER pay money to for that OS.

So I decided to go for Linux/GNU and tried Ubuntu first. But the Desktop was simply to much of a change and I didn’t like the look and feel of it.

In the end I found KDE was just what I wanted and I started out with Kubuntu 13.04.
Soon I could upgrade to 13.10 and I was so excited. What would be all the new stuff?

To my surprise not much was changed and everything was as before. I was a bit disappointed but I was a “new” user to Linux/GNU so that was all right.

Now at the latest upgrade (14.04) the chill was a little more exciting when installing the upgrade. I have made lots of small changes and enhancement to the standard installation.

Would everything work? or would I have hours to spend fiddling problems?

To my surprise, No, everything worked and even tings I couldn’t get to work in 13.10 now worked in 14.04.

So I’m happy with the small changes and improvement. I even got a better working system now.

I have always felt the OS/Desktop was a simple platform where I use my advanced applications. It must be rock solid and not tip over when a application screw up.

So to the Arc post I can only say: Thank you Ubuntu and KDE for not introducing many new features and by then many new bugs.

A little performance suggestion for XBMC

I love the XBMC media center and it’s the best I have seen so far.

But I have alway thought it was a little slow when starting playing media and upgrading the library was a killer.

I have read a lot about how to setup XBMC on remote shares and every body was pointing out: Always use Samda to connect to your media.

I have a Synology box with all my media and it can use Samba as well as NFS.
But of cause I used Samba to connect to it from my mediacenter and PC’s.

The reason to use Samba was the problem with Upper/Lower case letters in media names.

I was thinking a bit about this and found that it was not a problem for me.
I have a lot of CD’s and when I ripped them I always organize them with MusicBrainz Picard so I knew exactly where the media is stored.

I tried to connect to the Synology box using NFS and to my surprise media started playing right away.

My head had to banged into the wall a couple of times because all the time I have spend trying to optimize network, MySQL and buying memory for the Synology box. :mrgreen:


A little surprise from a Windows machine

I upgraded Kubuntu to 14.04 LTE and everything went smooth.
But after a day or so the Internet access was getting slower and slower.

I blamed everything and regretting upgrading Kubuntu.

DNS/DHCP server had no problems and the Internet provider had no problems either.
A Internet speed test had problems pinging and connecting but the speed was normal.
Checked my router everything looked normal until I got to the UPnp section.

I found 2 unauthorized port (50.000 something) opened by an IP I didn’t knew of.

The DNS server told me it was my virtual windows machine I use to update my Harmony remote.

I disable UPnp and rebooted the router and after a while everything started to be normal.

I had enabled Upnp so it was easy for me to update the port forwarding to my Synology box.

So the lesson learned is never be lacy when it comes to network safety.
From now on everything will be configured manually.

And NO, I don’t regretting upgrade Kubuntu even I can’t see the big difference 🙂
The little Windows machine will have to undergo some torture so I can find the little bugger 😈

Kubuntu 14.04 LTE

I just upgraded to Kubuntu 14.04 LTE.

The previous version was 13.10 upgraded from 13.04.
The upgade was a walk in the park without any problems.
I had I minor issue with the displays had to be reordered (I have 3 monitors connected).
My left most monitor was moved to the middel but running the nvidia-settings solved the problem.
Else everything works as expected. I havn’t found any other issues yet.

Installing Aftershot Pro on Kubuntu 64-bit

Yet another problem when I installed Aftershot Pro on Kubuntu 13.10 64-bit.

I happily downloaded Aftershot Pro 64-bit installation package from Corel’s site and tried to install it by:

$> sudo dpkg -i AfterShotPro_amd64.deb

The package manager complained about ia32-libs was not installed.
I looked all over to find out how to install the ia32-libs lib on 64-bit but all solutions failed.

Then I stumbled over a forum thread asking the stupid question:

"Why not install the 32-bit version?" 

and the answer from the user was:

"It worked, thanks a lot!"

To install the 32-bit version of Aftershot Pro on 64-bit Kubuntu you have to run the command:

$> sudo dpkg -i --force-architecture ./AfterShotPro_i386.deb

You also have to do the same for all updates.