Monthly Archives: June 2014

Upgradeing XBMCbuntu

I use XBMC as my entertainment center and had XBMCbuntu install on a ZBOX ID41.

The XBMCbuntu was based on an 12.10 version of ubuntu (maybe lubuntu).

As 12.10 was going out of support I couldn’t install XBMC 13.1 from the XBMC’s PPA. I had to compile it my self. I tried to compile but forgot some setting related to the ION chip set. Not at big success and I decided it was not worth the hassle to compile every time I need to update XBMC.

I decided to try lubuntu as it is a small distrio of Ubuntu.

I made an USB key and booted lubuntu from the USB key to see if everything looked fine and it didn’t seem to be problem to install lubuntu on the ID41.

From the desktop I installed lubuntu and to my big surprise it asked me if I wanted to upgrade from XBMCbuntu 12.10 to lubuntu 14.04.
What! That can’t be possible??? But let’s give it a try…

During the install everything was left at default except I enabled auto login to prevent having to login when I started the computer.

The only problem was when I typed in the computer name. Lubuntu notified that there was another computer with the same name. But as my DHCP server register all my devices so they get the same IP address when they start I knew it was just finding it self. After a reboot there wouldn’t be any problems.

I rebooted and lubuntu started up and to my big surprise everything worked fine.

I just had to add the XBMC repository (http://wiki.xbmc.org/index.php?title=Installing_XBMC_for_Linux) and then install XBMC.

The remote didn’t work and after installing LIRC everything was back to normal.

A logout and login to the XBMC desktop and my entertainment center was back to normal. You can select the XBMC desktop in top right corner at the login screen.

Well there was problems that need to be solved but it was the same problems I had with XBMCbuntu. One was the computer would not suspend but I will write about that in another post.

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:192.168.0.153  Bcast:10.25.1.255  Mask:255.255.255.0
          inet6 addr: fe80::201:2eff:fe3b:c50f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          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:127.0.0.1  Mask:255.0.0.0
          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:192.168.0.153  Bcast:10.25.1.255  Mask:255.255.255.0
          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
        suspend|hibernate)
                echo suspending 20_custom-wlan0
                ;;
        resume|thaw)
               echo Resumeing 20_custom-wlan0 - shutting down wlan0
               ifconfig wlan0 down
               ;;
esac

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:

/var/log/pm-suspend.log

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://192.168.0.4: 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.