Posts Tagged Linux

How to install the CM15A X10 controller on Ubuntu 8.04 LTS

Posted by on Wednesday, 5 October, 2011

To access the CM15A X10 controller under Linux (Fedora or Ubuntu) I use the mochad, Multiple Online Controllers for Home Automation Daemon.
“mochad” is a Linux TCP gateway daemon for the X10 CM15A RF (radio frequency) and PL (power line) controller and the CM19A RF controller.

To get it up and running under Ubuntu 8.04 LTS “Hardy” follow these steps.

1 ) Download libusb-1.0 (because Hardy does not ship with it):
Goto libusb-1.0 website, scroll to the Download section and get the latest version if the source files.
If the latest version does not work, you might download this version that works fine under hardy.

2 ) Unpack, untar, compile and install libusb-1.0:
bzip2 -d libusb-1.0.8.tar.bz2
tar -xvf libusb-1.0.8.tar
cd libusb-1.0.8
sudo make install

Replace the libuse-1.0.8 part with whatever version you downloaded.

3 ) Download mochad:
Visit the mochad homepage and download the latest version or get this version that works on Hardy.

4 ) Untar, compile and install mochad:
tar -zxvf mochad-0.1.12.tar.gz
cd mochad-0.1.12
sudo make install

Replace the mochad-0.1.12 with whatever version you download.

5 ) Plug in the CM15A device via the USB port to the box

6 ) Check that the system can see it:
Should return a line like this:
Bus 002 Device 065: ID 0bc7:0001 X10 Wireless Technology, Inc.

The Bus and Device might be different in your case.

7 ) Launch the mochad daemon:
sudo /usr/local/bin/mochad

It should return to the prompt with no errors.

8 ) Use it!
To use the mochad daemon you can talk to it on port 1099 (by default) on the localhost using netcat (nc) like this example:
To turn on module A1
nc -c "echo pl a1 on" localhost 1099
To turn off module A1
nc -c "echo pl a1 off" localhost 1099

And that’s it. Check out the mochad homepage for further details.


How to install the Java plugin on Fedora 15 64 bits

Posted by on Tuesday, 4 October, 2011

I’ve found these instructions here:

1. Download the Linux 64 bit rpm from Ignore the instructions to download the 32-bit version.

2. Follow the instructions on for how to install JRE

3. Exit firefox

4. Make a link to the plugin:
cd /usr/lib64/mozilla/plugins
ln -s /usr/java/jre1.6.0_25/lib/amd64/

5. Restart firefox and return to to test


How to disable -nolisten tcp in Fedora 14 and 15

Posted by on Monday, 5 September, 2011

On a standard Fedora 14/15 installation, gdm is the gui greeter.
To allow tcp connections to your xserver, do the following:

Edit the “/usr/share/gdm/gdm.schemas” and look for the section:


Change the line <default>true</default> to <default>false</default>

Save it and restart gdm.

This is not a good idea in security terms but some systems do not work well with X11 apps over ssh (the preferred method)


How to get the number of sockets in your server using Linux

Posted by on Monday, 5 September, 2011

Not really the most useful tip, but a couple of days ago I was looking for a way of determine the number of sockets on this box and after googling around I found this forum from where I adapted the following code that should return the number of sockets in your server, by counting the unique number of entries for the “physical id” string.

grep -i "^physical id" /proc/cpuinfo | sort | uniq | wc -l


How to add global proxy settings to xfce4

Posted by on Wednesday, 11 May, 2011

I keep having this problem so I decided to write it down here, after following the instructions from

To add global proxy settings to xfce4, run the following code in order to add a few lines to /etc/environment:


sudo echo http_proxy=http://proxyaddress:port >>/etc/environment
sudo echo ftp_proxy=http://proxyaddress:port >>/etc/environment
sudo echo https_proxy=http://proxyaddress:port >>/etc/environment

Replace proxyaddress and port with the ip address and port (usually 3128 or 8080) where the proxy server is running.
If you need to add username and password authentication, you will need to replace all the commands with

http://user:[email protected]:port