Enabling middle button paste in real vnc for MAC

If you are used to vnc to a linux machine using the real vnc viewer for MAC, then for sure you have faced this big question, How do I paste the clipboard content to the xterm window over vnc. I have googled a lot and was not able to find a good solution. Finally I got a great solution from my company’s internal mac-wiki and thought of sharing the same so that others can benefit out of it

Best free VNC viewers for MAC

Before we start of with the tip, lets see some of the free vnc viewers for MAC

1. Real VNC  (Free)

2. Chicken VNC (Free)

3. Jolly fast VNC (trial version can be renewed multiple times)

I have tried all the above 3 and I personally like real vnc the most for being the fastest of all the above 3. besides thats its free which makes it the best. Only problem with real vnc is that pasting the clipboard content over vnc may not work for some applications if you are vncing to linux. One such example is xterm. Xterm doesnt give the option of Paste in the right click context menu. Generally mouse middle button is the shortcut to paste in xterm which doesnt work through MAC.

On the other hand chicken VNC allows to modify the keyboard mappings to work around the above issue which is discussed above. But chiken vnc is very slow compared to real vnc. You will feel the difference when your internet connection speed is very less. In Chicken vnc, you can emulate middle button paste via Option+click on trackpad by changing the below setting

“Go to Connection Menu and select the Connection Profiles: –>Emulation” and change to below


Emulating middle button mouse click in Real VNC

As mentioned above, I prefer Real VNC over others and I needed a solution for middle button mouse click. There came the app called middleclick to your rescue.

Run a small app called middleclick (http://clement.beffa.org/labs/projects/middleclick/). This allows you to emulate the middle button mouse click on a Mac book Pro with a three-finger touch. Then in realVnc options, enable the three-button emulation mode. Once you have this set up, you will be able to cmd-c in your mac and three-finger tap in vnc to paste.

Also do the follwoing as well Go to System Preferences -> Trackpad and uncheck “Look up”

Categories: MAC

Configuring ZTE AC2738 3G modem on MAC OS X 10.9.3

May 31, 2014 34 comments

I have recently got  a Mac book Pro and was trying to connect to internet through my Reliance Netconnect Dongle. Since I am new to Mac and since the Reliance software doesnt work on the New Mavericks OS, i had a difficult time trying to configure it up. This post helps in configuring the same.

Note: After I wrote this post, there have been numerous MAC OS updates which came in that can cause the below hack to not work. So please note down the bottom of this page, if you are running the latest MAC OS.

Reliance Netconnect 3g dongle which I am using was a ZTE AC2738 model and this post is mainly for that though it may be applicable for other 3g dongles provided you have the driver for the same.

Issue: Reliance Netconnect provides MAC drivers and dialer software, but the dialer software doesn’t work on OS X Mavericks version, Which is what this post is trying to solve

Solution: Mac supports inbuilt dialer software and this post is basically making use of that to get connected. But this works only if the driver for the 3G modem is successfully installed

Step by Step guide

  1. Connect Reliance connect to the USB port of the MAC
  2. Automatically a virtual CD drive will appear and open the zip file corresponding to mac installer and follow the instructions.
    Note: You can download the MAC driver package directly from my dropbox link as well. Dropbox link
  3. Double click the installer and follow the installation process until complete.
  4. Once installed you will have a “Reliance Netconnect+” icon in your desktop. This is the dialer and its of no use. So you can move it to trash.
  5. Now open “Network Preferences page” from system Preferences->Network
  6. There on the left pane you will be able to see some new entries corresponding to “ZTE”
  7. Select the ZTE Wireless Terminal in that list and put the below info
    Telephone Number: #777
    Account Name: net
    Password: net
  8. Keep the Other values as it is and click on apply and select connect. Once connected you should be able to browse.

ZTE 2738 on MAC








Maverick users for whom the above hack didnt work or the dongle stopped working after getting updates.

Courtesy: The below hack is originally provided by ruchirs in the apple community and I am posting it here. Original thread can be found at Apple community thread for Mavericks


  1. Go to network preferences
  2. Lookup ZTE wireless terminal
  3. enter on right side: telephone no as #777
  4. account name and password as your dongles mobile number.
  5. and click connect!!.

Elcapitan users for whom the Dongle stopped working after upgrade.

Courtesy: The below hack is originally provided by rochishnudutta in the apple community and I am posting it here. Original thread can be found at Apple Community thread for Elcapitan . Also special thanks to Anuj Gupta who mentioned the same in the comments.


  1. Boot into Mac by pressing CMD + R (Recovery Mode)
  2. Go to Terminal under Utilities.
  3. Type in csrutil disable. A comment will be displayed that your csrutil has been disabled.
  4. Reboot
  5.  Install the driver as usual and it will require a reboot again.
  6. Then go to network preference. Fill in all details (account and password) by selecting the driver name (in my case, ZTE Wireless Terminal) on the left panel. Save it and connect.
Categories: Gadgets, MAC

Configuring external DVD drive on Xbian/Raspberry Pi

April 22, 2014 3 comments

As mentioned in my earlier posts, raspberry Pi when combined with Xbian or Raspbmc forms a great and affordable HTPC. I was in the market to look for a cheap DVD player as my panasonic BD player doesnt support Divx formats. Then this idea came to mind that why not buy a external USB dvd drive and hook it up to raspberry Pi. Did some googling and found that lot of people are using it that way. So finalized on a cheap DVD drive and tried configuring it on Xbian. But as it turned out this was not straight forward so thought of sharing the “How to” which I found after googling a lot. Since this time I had two SD cards lying around I tried both Xbian and Raspbmc and turned out that on Raspbmc it was easier to get it working. So I will share the method on both the OS.

Hardware Info

1. Raspbberry Pi

2. Powered USB Hub (Optional)

3. External USB dvd drive (I used Buffalo MediaStation 8x Portable CD/DVD Writer)

Pros of Buffalo Drive

* LED indication to say if it requires more power

* Comes with a Y USB cable (which seperates Power and Data USB cable)

Note: My USB hub was not able to power up the DVD drive, hence I connected the power USB cable to a Nexus 7 Power adapter.

Most of the info below is taken from http://forum.stmlabs.com/showthread.php?tid=7623

Configuration in Raspbmc.

Configuration in raspbmc was simple. Just download the PlayDVD addon zip file from the below link and install the add on through the XBMC menu (System->Addon->Install from Zip file). Once done go to XBMC->System->Addon->Programs->PlayDVD->select install). This takes some time as it has to download some additional packages from net.

Download link: http://forum.stmlabs.com/attachment.php?aid=527

Once installed automatically the PLay CD button will come when you insert the DVD.


Configuration in Xbian

Configuring on Xbian is not straight forward as some how the addon python script was not working on xbian (There are ways to fix it, but I thought the manual process is easier as in Xbian the DVD drive was not getting automounted due to permission issues.
1. Get Required Programs
sudo apt-get update
sudo apt-get install -y bzip2 make mplayer curl lsdvd

2. Compile libdvdcss
wget http://www.videolan.org/pub/libdvdcss/1.2.13/libdvdcss-1.2.13.tar.bz2
tar -xvjf libdvdcss-1.2.13.tar.bz2
cd libdvdcss-1.2.13
sudo make install
cp /usr/local/lib/libdvdcss* /lib
sudo apt-get -y -f install

3. Setup Filesystem
sudo mkdir /media/LARGEFILES
sudo mkfifo /media/LARGEFILES/dvd.mpg
sudo chmod o+w /media/LARGEFILES/dvd.mpg

4. Add xbian user to cdrom group.
sudo usermod -a -G cdrom xbian

5. Add the below entry to the /etc/fstab file (assumption is the dvd drive is detected as /dev/sr0)
/dev/sr0        /media/LARGEFILES               auto                    noauto,ro,user  0 0

6. Once done just reboot or do mount -a. Now the play CD option will be available on XBMC

Categories: Audio/Video

Ipv6 Logo Interoperability Test using Tahi Vel tool

August 23, 2013 11 comments

I found that lot of queries in the tahi forums are regarding setting up of the Ipv6 interoperabilty testbed and thought of sharing my experience which may help others.

This is a continuation of my previous post “IPv6 logo certification using Tahi Self test tool

As mentioned there to get the ipv6 logo certification, two tests are mandatory,

  1. ipv6 logo conformance test using the Selftest tool
  2. IPv6 interoperability test using the Vel tool

Goal of this test

The primary goal for this test is to make sure that, the unit under test’s (UUT) ipv6 implementation is interoperable with other vendor implementation.

Hardware Requirements for the test.

  • VEL tool.
  • 2 x PC’s(Reference Node) running free BSD OS with 3 NICS
  • 1 x PC(Vel Manager Node) running Free BSD OS with 1 NIC
  • 1 x PC (Dumper Node) running Free BSD with 4 NICs
  • 4 X PC’s (Target Nodes) running 4 different OS with 4 NICs each. Recommended Target OS are         – FreeBSD 7.0
            – NetBSD 4.0.1
            – OpenBSD 4.3
            – Fedora9
    – KAME
    – USAGI

*  I have used the bold ones as my target OS

So as we can see we need total 8 PC’s/Servers in total. We can reduce the number of PCS to 5 by running all the 4 Target OS installed in 1 single PC as well. Also please note the number of NICs which are required as well. Because of this requirements its a very difficult to have this topology. but fortunately the new virtualization technologies can help us with solving the issue and this post is about how we can optimize/achieve the same topology using a virtualization enabled server using  Vmware’s Esxi.

Optimized Setup/resources which I used

  1. Server Hardware: Cisco UCS C250M1 Rack mount server running ESXi 5.1 (Instead of this any server/hardware which is supported by ESXi can be used as well)
  2. Number of Physical Nics on the server: 1
  3. Virtualization Software/Hypervisor: ESXI 5.1

Understanding the topology for Interoperability test

First of all lets understand how to read the topology which is mentioned in the Vel tool’s read me file. Following is the topology mentioned in the README file of vel tool

                                      Network 1
              |              |           |      |
              | 1            |           | 1    +-------------+
       TG +-----------+      |        +------+                |
   +------| REF-1 (V) |      |        | LOGO |                |
   |      +-----------+      |        +------+                |
   |          | 2            |                                |
   |          |              |        Network 2               |
   |    ------+------+------------+------+-----+--            |
   |                 |       |    |            |              |
   |               1 |       |    |            +------+       |
   |       TG +----------+   |    |                   |       |
   | +--------| REF-2 (V)|   |    |                   |       |
   | |        +----------+   |    |                   |       |
   | |             2 |       |    |                   |       |
   | |               |       |    |   Network 3       |       |
   | |  ------+------+------------------------+---    |       |
   | |        |              |    |           |       |       |
   | |        | 3            |    |           |       |       |
   | |  TG +----------+ 1    |    |           |       |       |
   | | +---| TAR* (V) |------+    |           |       |       |
   | | |   +----------+           |           |       |       |
   | | |      | 2                 |           |       |       |
   | | |      +-------------------+           |       |       |
   | | |                                      |       |       |
   | | |                                      |       | 2     |
   | | |     Network for TG                   |  +---------+  |
  -+-+-+----+-------+-                        +--| dump (V)|--+
            |       |                          3 +---------+ 1
         TG |       |                                 | TG
      +---------+   +---------------------------------+
      | vel mgr |

the above one doesnt give a clear picture on how the connections are. So lets see how the topology can be interpreted.

  • Each Square/rectangular boxes are devices or PCS
  • LOGO : device under testing or your device.
  • vel mgr : vel manager, device on which velm program runs (Runs Free BSD OS)
  • TAR* : 4 interoperable devices from other vendors devices (Target nodes running target OS) including 2 hosts and 2 routers.
  • REF-1 : reference node running Free BSD OS
  • REF-2 : reference node running Free BSD OS
  • dump : packet monitor running Free BSD OS
  • (V) : device which vela and velo programs run and they are TAR*, REF-1, REF-2 and dump
  • The number around the box/device indicates the Network interfaces
  • The dashed lines (—) are the links/connections from the NIC cards
  • Network1, Network2 and Network3 are Hubs (Remember its a hub not a switch)
  • Network for TG is the management network and can be a switch.
  • “+” sign on the dashed line indicates that those two lines merge there, if there is no “+” sign that means those lines dont merge.

How to setup the same topology in the virtualized Server.

The same setup can be easily set up using Vmware’s ESXi.

  1. VM Creation: Create VMs corresponding to all the 8 devices in the topology in the same ESXi server. While creating VMs, allocate the required number of Virtual NICs as well to the VM.
  2. Vswitch Creation:  Now our job is to simulate three different network hub’s(network1, network2 and Netowrk3). For this in Vsphere Client go to ESXI Host->Configuration->Networking->Add networking–>Virtual machine(as the connection type)->Select no Physical adapters->Give a network label(network1)->Finish. Repeat the same for Network 2 and network 3. For Network TG select the physical NIC corresponding to the NIC which is conencting to the Management NIC.
  3. Mapping Network Labels to Virtual NICs: Now map the virtual NICs of each of the VM to the appropriate Network labels(Right click on the VM–>Edit Settings->Select the NIC adapter->Enter the network Label as Network1/2/3 depending on the topology.
  4. Configuring the Vswitches to behave like a hub: Another requirement is to configure the vswitches created in step 2 to behave like a hub. For this go to ESXI Server->Configuration->Networking->Select the Vswitch Name(Networ1/2/3)->Properties->Security Tab->Enable promiscuous Mode and Change it to Accept and OK.
  5. IP address Assignment:  The Virtual NICS which are mapped to Network TG will be assigned with IP address which is used for management as well as for velmgr to interact with vel clients.

Installing and Running the tool.

This is already covered in the README file of the Vel tool.

Important input file for the vel tool is a file called “config” in the “vel-5.0.1/interop_ph2” directory.

Following are the most important items which needs to be changed.

# LOGO TYPE: type of your device [host or router]
LOGO_TYPE router
# LOGO_NAME: name of your device

LOGO_IF1 Ethernet1/1
LOGO_IF1_MAC 00:00:00:00:00:01
# LOGO_IF2 : interface name and mac address on your device
# If LOGO_TYPE is router, you need to edit LOGO_IF2
LOGO_IF2 Ethernet1/2
LOGO_IF2_MAC 00:00:00:00:00:02
Similarly put the corresponding NIC mac address for the other devices in the file. Mac address can be found from the ifconfig command output.

Edit the following to change the ip address for the management or TG network
TAR1_IFTG eth0 "Put the interface name here"
TAR2_IFTG eth0 "Put the interface name here"
TAR3_IFTG eth0 "Put the interface name here"
TAR4_IFTG eth0 "Put the interface name here"
REF1_IFTG eth0
REF2_IFTG eth0
DUMPER_IFTG_V4_ADDR 192.168.20.

Some Tips

  • Make sure the firewall is disabled in all the devices which you are using. Else, vel manager may fail to connect to the vel clients.
  • Some of the tools wont be there in fedora by default. rtadvd is such a tool which I had to install.
Categories: IPV6, Technical

TCL Tips

August 22, 2013 7 comments

Note: Credits for the tips mentioned here goes to multiple people
and internet sites.  I just consolidated them together for my reference.

Hex Codes for special key combinations to be send to routers/PC

Refer the following table for the hexa decimal code for each of the special key combinations. Most frequently used one is CTRL+C. This can be used in tcl/expect to send these key combinations to a router/PC.

KeyCombination Hexadecimal
CTRL-@ 0x00
CTRL-A 0x01
CTRL-B 0x02
CTRL-C 0x03
CTRL-D 0x04
CTRL-E 0x05
CTRL-F 0x06
CTRL-G 0x07
CTRL-H 0x08
CTRL-I 0x09
CTRL-P 0x10
CTRL-Q 0x11
CTRL-R 0x12
CTRL-S 0x13
CTRL-T 0x14
CTRL-U 0x15
CTRL-V 0x16
CTRL-W 0x17
CTRL-X 0x18
CTRL-Y 0x19

Dynamic variables in Tcl (Eval command to the rescue)

Most often I ran in to issue how to reference or retrieve value from a dynamic tcl variable (or value of a variables, variable)..Got confused!!!? let me explain with an example what the problem is and whats the solution?

set vlanid "11 12 13"
set iplst " 12.0.1 13.0.1"
#Now you want to have the below mapping
#vlan 11->
#vlan 12->
#vlan 13->
#Now lets say i have to store the ip of vlan 11 in a name referenced by the vlan id like below

foreach id $vlanid ip $iplst {
set vlan$id $ip

#Now we have the following variable to value mapping
#vlan11 -->
#vlan12 -->
#vlan13 -->
#The above is called dynamic variable as the variable name is dynamically changing

#Now comes the real question, how to get the value of a dynamic variable
#I cannot use puts "$vlan$id" as it will error out saying cannot read "vlan" no such variable.
#This is where the power of eval comes in to picture and below is the solution

foreach i $vlanid {
puts "The ip of vlan $i is [eval set vlan$i]"

The above code will give the output

The ip of vlan 11 is
The ip of vlan 12 is
The ip of vlan 13 is

Categories: TCL, Technical

Configuring Reliance Netconnect(ZTE AC2738) with TP-Link TL-MR3020 3G Wireless Router

August 12, 2013 177 comments

This post is about how to configure a Reliance Netconnect (USB 3G/4G dongle) with a TP-Link TL-MR3020 Wireless 3G router.

Prelude:  TP-Link MR3030 3G/4G wireless router is a small portable device which helps in sharing an internet connection from 3g/4G USB sticks/connections like Reliance Netconnect/Tata Photon/BSNL EVDO/Airtel etc over a Wifi network.

Some of the highlights of this produce are

  • Very small and lightweight and aesthetics are pretty good (Have the looks of a apple product 🙂 )
  • Powered via a mini USB port and the charger cable is a mini USB to regular USB which means you can power it by simply connecting it a laptop. Also if you have a car mobile charger you can power it up in the car and make your car a mobile wifi hotspot
  • Have a RJ45 Ethernet port which can act as a wan port as well as a lan port depending on the mode of operation
  • Supports 3 modes of operation
    3G/4G only mode: Primary internet connection is from the 3G/4G dongle connected to the USB port of the router and the RJ45 port will act as a LAN port.
    WAN/3G/4G mode: Primary internet connection is from the WAN and if its not working then it will fall back to the 3g/4g usb dongle. Note in this mode the RJ45 port will act like a WAN port.
    Note: This can be used in home as a always connected internet redundancy option
    WAN only mode: Primary internet connection is from the WAN port and 3g/4G is not used In this mode the RJ45 port works as a WAN port.

Out of the box, this router doesn’t support Reliance Netconnect (ZTE AC2738). The router will keep on identifying the device and then say conencting to it and then will get disconnected.   Following are the steps which I followed to make it work. Thought of sharing it as it may help others.

  1. Firmware Upgrade: The default firmware which came with the device needs to be upgraded to the latest one for this to work.(
    Default Firmware which I got was: 3.14.2 Build 120817 Rel.55520n
    Upgraded firmware version : 3.15.2 Build 130326 Rel.58517
    Date of release of the new firmware: 18th April 2013
    Firmware Download Link:  http://www.tp-link.us/support/download/?model=TL-MR3020&version=V1 (if the site is down you get the same from here.
    Firmware file name: TL-MR3020_V1_130326
    Installing the firmware: Unzip/extract the downloaded firmware to a folder. Now go to the the TR3929 websetup click on SystemTools->Firmwareupgrade->and point to the extracted firmware image location.  Upgrade will take about 1 minute, wait for it to be complete and then proceed to step 2.
  2. Configuring the 3G router: Now in the TR3020 websetup, click on Quicksetup, select 3G/4G router only mode ->Next->Select Country as India->Select the Service provider as “Reliance Netconnect” (there are multiple reliance profiles, so select the one with Dial number as #777 and APN is blank (read blank as nothing)”, Select manual option of entering username and password and put username as “net” and password as “net”->Next->Click next until you get finish

Thats it you are done, Now you should be able to connect to the internet.

Categories: Gadgets, Technical

Configuring Raspberry Pi as a HTPC/Music Source

July 31, 2013 5 comments

This post is a continuation from by previous post My Audio Video Setup. This post describes how to configure Raspberry Pi (A credit card sized ARM based board/miniPC) for HTPC and music usage.

Disclaimer: Whatever info I have put here is based on numerous webpages/forums which I referred  for setting it up. So all the credits go to them(www.forum.xbmc.org, http://www.audiohobby.com http://www.lifehacker.com, http://www.raspberrypi.org, http://www.xbian.org etc are the major sites which helped me).

As a prelude, would like to say that I am extremely happy to have bought raspberry pi and I dont regret it as for my purpose its more than enough. Quoting from the user vertigo in the xbmc forums one of the post which clearly explains the pros and cons of it, than me trying to rephrase it

I see a lot of people have trouble assessing whether or not a Rasberry Pi is a viable platform to run XBMC on. Let me try to help and summarize what it can and cant do.

Contrary to what you sometimes read, the Pi can indeed decode 1080p30 high-profile (ie, bluray) stutter free. It will even do 3D. But there are some caveats you should be aware off:

– if your media uses VC1 or Mpeg2 as opposed to h.264, divx, etc, then you need to purchase a license to enable hardware accelerated decoding of these codecs. Prices are €1.45 and €2.89 respectively. http://www.raspberrypi.com/license-keys/

– the Pi is not always fast enough to decode DTS or Dolby Digital 5.1 (AC3) to stereo on the fly, but it has no problems passing through these codecs over HDMI to a DTS or AC3 decoder/receiver. If you have an HDMI receiver (or TV) that allows these audio codecs, you will be fine (the work is done by the AVR decoder). If you dont have that hardware, there isnt too much point in using a DTS track, so if possible, you should select a stereo or AAC track instead. Most DTS/AC3 media will have such an audio track. If your source only has DTS audio, and you dont have a DTS capable receiver, you may have a problem.

*update: I actually tested this with my own library. I dont have straight bluray rips, so the highest bitrate I saw was short bursts around ~30Mbps (h264 1080p23.9 + DTS), and my Pi had no problem playing it while decoding the DTS signal, at least when playing it back from a local drive. While playing the same file over the LAN, the Pi did stutter during the high bitrate peaks. One might think its a bandwith issue (100Mbit), but the Pi can serve the same files to my x86 machines, and they wont stutter. In short: it appears to be a problem when playing big files with DTS over the LAN. Local files from a USB drive seem to be fine, though it may not do full rips with DTS decoding, it may not work with some video formats, its widely reported the Pi struggles decoding DTS, but Ive not been able to reproduce this with local files. YMMV.

If you read somewhere that Pi will stutter playing back 1080p, its almost certainly because the user was unaware of one of the above restrictions. It has given the Pi a reputation it doesnt deserve IMHO. When used properly, 1080p playback is utterly smooth, and I would even say it looks better than on my x86 machine.

One more little known feature of the Pi that deserves highlighting, is its built-in HDMI CEC capability. Unlike any x86 videocard Im aware off, the Pi can send and receive HDMI CEC commands. This allow you to use the remote of another HDMI CEC compliant machine, like TV or AVR to control XBMC. On x86 you can achieve the same only buy purchasing a Pulse-Eight adapter kit. HDMI CEC is also known as Easylink, Vierra Link, BRAVIA Sync, Anynet+, etc.

That said, there are a few other aspects of the Pi that may steer you away from it:

– The Pi has no SPDIF out.
If you can not use HDMI audio, the only other option is analog stereo. As an alternative, you can buy a HDMI splitter that splits audio and video and gives you HDMI video and SPDIF audio (example: http://www.amazon.com/ViewHD-Premium-Aud…o+toslink) , but such a device will cost about the same as the Pi and be about as big. The combination is still rather cheap and small, but no longer as impressively so as the Pi alone.

– The Pi currently has no support for HD audio (TrueHD and DTS-HD/MA), even in passthrough. This is a software issue that might be resolved in the future, but for now, playing a DTS-HD stream will result in a DTS signal on your AVR, and playing TrueHD will probably yield nothing or noise.

– While its GPU and videodecode capabilities are respectable, the CPU of the Pi is slow.
There is no way to sugarcoat it. The CPU is an ARM11 based design, which puts it roughly in the performance ballpark of the iPhone 3G (not 3GS) or HTC Legend. In PC terms, roughly a Pentium 2 – 300 Mhz for those of you old enough to remember. This CPU is considerably slower than the better known ARM Cortex A8 cores found in Samsung Galaxy S1 or iPhone 3GS, and far slower than all the cheap Cortex A9 based android devices you can buy today. Oh and incomparable to even the slowest celeron on the market. You do notice this slowness. Not while playing video, but while using the XBMC GUI, its not quite as buttery smooth and responsive as x86 media centers. If you use simple skins like confluence or Quartz, IMO its completely acceptable, and far from frustrating; but dont expect miracles. If in doubt, I would advice you to watch some video’s on youtube and see if it lives up to your expectations. Here is one I just uploaded myself:

(note that the white screen corruption is mostly solved now)

– The network interface is 100T.
Even using USB to Ethernet adapters, you will still be limited to 100T. It wont do gigabit ethernet.

– It uses Linux
Yeah, it does, but that doesnt mean you have to know anything about Linux. Think of your (smart) tv or AV receiver; it probably runs on Linux too, but its not like you need to use a command line interface or edit text files in VI to use it Smile. Same with openelec. It turns your Pi (or x86 box for that matter), in to a real consumer appliance and almost completely hides the fact there is an OS underneath XBMC. But for those that do know Linux, there is still SSH thank God Smile

– Its not much good as a general purpose PC
XBMC linux distro’s are stripped down to the bone. You wont even find a browser. If you intend to use your HTPC for other tasks besides XBMC, like internet, social media, gaming, etc, you want to look elsewhere. Sure, you can dualboot openelec with some more general purpose linux distro for the Pi, but if you can figure that out and think thats an acceptable solution, then you are far more of a geek than me, and not likely to be reading anything in this post you didnt know already.

– The hardware is old, almost obsolete, why not buy a much faster android device?
In the near future, and for XBMC users, the Pi will almost certainly be obsoleted by far more capable hardware (typically designed for Android). Some of them already hardly cost more than the Pi today, while giving you goodies like dual core A9 chips and more adequate IO. Thing is, the Pi is (probably) fast enough, while having the advantage of being very popular among 1+ milion geeks for almost a year now, and as a result, it has a pretty mature software stack. Android devices arent there yet. Im sure they will eventually, so if the time comes to switch to Xios or some other Android device, at least know that thanks to its GPIO interface there are a million other uses for your Pi. Like serving as the brains of a home made pinball machine, a quadcopter, coffee machine, or whatever else you can come up with Smile.

If none of the above issues are show stoppers for you, the Pi will offer you a ridiculously small, cheap ($35-$50 if you count codecs, case, etc) , power efficient (~3,5W!) and surprisingly capable media center.

Original Thread link is http://forum.xbmc.org/showthread.php?tid=152339&highlight=raspberry+pi

Some people always ask, why do you want raspberry Pi/XBMC if you have a smart TV which can do most of the things. The quick answer to that is XbMC on raspberry pi can do much more things than a smartTV, some of which are

  • Scraper: XBMC has some built-in scrapers which can automatically search the contents of the media and autodownload information related to it from popula sites like IMDB etc. What it means if you select a movie, it will say a brief plot of the movie, its IMDB rating etc.
  • Subtitle download: Downloading subtitles for a movie is very easy in XBMC using the subtitle add on.
  • Automated torrent downloads: Using XBMC add-ons like couchpottato, sickbeard,headphones and transmission torrent client you can automate the process of movie/TVshows/Music downloads. [This is one of the biggest advantage]. In couchpotatto  you can mention what movies are you looking for and the quality of the movie file (HD,DVDRip,Blueray rip etc], couchpotatto will look into popular torrentsites/NZB sites for the movie of your choice and automatically download the movie using the transmission bittorrent client, the movie.

So much said about the Pi and XBMC. Now lets move to the OS which I want to load in the Pi. Following were the options for me

  • Xbian : Based on Raspbian and have a good support community. Currently in Beta.
  • OpenElec: Already successful in other platforms (x86) and gives an appliance feel to the XBMC.
  • Raspbmc: One of the first distro’s that came up when Pi was out. Only disadvantage is its not that stable compared to the others and only one single developer behind this,

I choose Xbian primarily based on the reviews as it was slightly faster than other distro’s.


  • Raspberry Pi
  • SD Card (I used a 16GB Class-10 Transcend Card)
  • USB DAC (Optional, you can use the onboard sound if you are ok with the sound quality)
  • An HDMI TV which supports HDMI CEC (Braviasync, LG Simplink, VierraConnect etc)
  • A laptop/Desktop PC with a SD Card reader
  • An android phone/tablet/ipad/iphone
  • External hard disk which has all the movies/music.
  • LAN Connectivity to Pi through a wireless router/any other means.

Installing Xbian

Since already the Xbian installation wiki is there I dont think I have to explain it here. Refer the below link for the Xbian Installation wiki.

  1. Installing Xbian
  2. Configuring Xbian

XBMC User guide

If you are new to xbmc refer the XBMC quick start Wiki.

Adding Media to the Xbian

Connect the External USB hard disk to one of the free USB ports in the Pi. Note that if you are having a hard disk of 1 TB/more capacity its recommended to connect it via  a powered USB hub as raspberry pi wont be able to give enough power to bring up the harddisk.

Notes: At the time of this writing, Xbian latest version was 1.1 beta and that somehow dont automatically show the USB hardisk in the XBMC menu. You have to go and manually add the folder from /media/. Hopefully this will be fixed in subsequent versions. For adding the folder in the XBMC (Refer http://wiki.xbmc.org/index.php?title=Quick_Start_Guide#Adding_videos_to_the_library )

Now enjoy the movie collection.

Custom Remote key mapping for LG TVs

Even though the HDMI CEC great for basic navigation and playback functionality, I noticed that there was no remote button for the right click/Conterxt menu in USB. This is a higly required one if you want to play lot of videos at once by adding it to play list or if you want to do some scrapper functionality(More of scrapper functionality can be found in the quick start guide). Xbmc uses a file called remote.xml which stores the keybindings for remotes and forunately I was able to get a keymap.xml file created for LG tv’s in one of the forums (I think its stmlabs forum). So thought of sharing the XML file here so that people having LG HDMI TV can make use of that. Currently as per the keymap file, the context menu is assigned to the fastforward button in the LG remote.Download the remote.xml and keep it in the folder ‘/home/xbian/.xbmc/userdata/keymaps/’

Get the remote.xml from this link

Some Commonly required shortcurts

To get XBMC ContextMenu Press the FastForward button when in Menu’s

To get the OSD (On screen Display) Press the FastForward button when playing a movie

To Fastforward  Video, Press the right Arrow Key (this will skip slowly)

To FastForward a video but want to skip more portions then Press the UP Arrow key.

Installing Couchpotato/Sickbeard/headphones Add-ons for Xbian

Before starting with the installation, I will briefly touchup what these tools will do

Courtesy: http://forum.xbmc.org/showthread.php?tid=120406

  • Sickbeard (For TV shows): This is a web application that automatically downloads your favourite/wanted TV shows as soon as it is available on torrent sites. As soon as a Show is aired, Sickbeard searches the torrent search sites and downloads the episodes which matches your desired video quality.
  • Couchpotato (For Movies):  This is almost the exact same type of service as Sickbeard, but this works with Movies. You put movies in your Wanted list and Couchpotato checks for releases in your desired quality and with the meta data, subs, trailers and so on, that you have asked for.
  • Headphones (For Music): This is yet another web application, but this one takes care of Music Artists and Albums. You scan your library or add new artists, and Headphones keeps a lookout for new albums of your favorite artists.
  • Transmission:  Its a light weight bit-torrent client.

There are two ways for installing

  1. Follow the steps in http://www.xbian.org/2013/01/a-one-in-all-download-package/
  2. Do it manually (Courtesy: http://forum.xbian.org/thread-196.html)

Manual Installation

SSH to the pi and issue the following commands

sudo apt-get update
sudo apt-get install xbian-package-transmission
sudo apt-get install xbian-package-headphones
sudo apt-get install xbian-package-couchpotato
sudo apt-get install xbian-package-sickbeard

Once the installation is done, Managing it is easy. Open a web browser on your laptop/tablet/minipc and enter the below

Transmission: http://x.x.x.x:9091/
SABnzbd: http://x.x.x.x:9092/
Headphones: http://x.x.x.x:9093/
Sickbeard: http://x.x.x.x:9094/
Couchpotato: http://x.x.x.x:9095/

where x.x.x.x is the xbian IP.
Default username and password is xbian and raspberry respectively.

Setting up the same Pi which has Xbian as a Music player

The same Pi can be used as a audio source/music player by installing the following packages.

  • Music Player Daemon (MPD) : This is a small program which acts as a music player server and can be controlled via a client
  • Music Player Client (MPC) : MPC is a music player client which can connect to a MPD server and allow users to play,skip, add playlist etc. MPC can be installed on the Xbian itself, but then you need a ssh access to the Xbian shell and control via CLI which is difficult. So for that we use the below tool.
  • MpDroid: Its a Music Player client for android/iphone/ipad/tablets. It has a good GUI and can be controlled from the phone or tablet. I personally use a 1st generation Nexus 7 for the same.

P.S: You may ask why I cant use XBMC itself for playing back audio. There are three reasons for that

  1. XBMC on Raspberry Pi as of now doesn’t support audio engine, so from XBMC you can’t direct the audio output to a external USB DAC.
  2. Due to the point 1 only option left is to play the audio through HDMI, but for that to happen my TV has to be turned on when ever I want to listen to audio.

Another alternative option is to use the analogue audio out in the Pi for both Audio and video. But that’s not a good quality one(Still I think its ok kind of thing for most of the people). But if you are specific to sound quality then MPD is the way to go.

Installing MPD on Xbian/Pi

Before installing MPD we need to install alsa-base and alsa-utils package. Issue the below command to install them

xbian$ sudo apt-get install alsa-base alsa-utils

Since already a great blog is there for the MPD installation and configuring it for a USB DAC. Please refer the audiohobby blog. Here is the link.

Note: In the audiohobby.com link, it hasn’t mentioned how to get which is the DAC device which we are having. It assumes its hw:0,0 . This can vary if you have the DAC connected to a USB hub. So below command will help you find that

xbian:~$ sudo aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: Device [Schiit USB Audio Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

So in My case also its hw0:0. What we need look is device and the subdevice numbers.

Now the remaining things are

  • Install the MPDROID on the android phone/tablet/iphone/ipad (This I hope most of the people knows)
  • Configure the MPDROID to connect to the Xbian IP
    Go to settings in MPDRoid–>Connection Settings->Add the server IP. Put the Port number as default.
  • Start Playing and enjoy

Controlling MPD using USB MCE remote

One of the problems with my above setup was that, you always need a tablet/smart phone/PC to play, pause or stop songs, which I felt is not good. So I decided to connect my unused Windows MCE (Media center Edition) remote to my PI to control the music play back.

Now you may ask why you need an MCE remote for the same when pi supports CEC, the reason is HDMI CEC works only when the TV is on and for music playback i dont want to turn on the TV, So I used the old MCE remote. I got the steps from the below sites and the credits goes to the owners of that thread/site

Xbian thread

XBMC Forum Thread

For Xbian I have summarized the steps below

“get rid of Lirc. Remove it from the default services.
install ir-keytables (apt-get install ir-keytables)
copy the appropriate keytable to /etc/rc_keytables
modify the keytable as you need – it creates keyboard events, so you can tailor your remote to the keys expected by xbmc.
add the command “ir-keytable -c -w /etc/rc_keytables/<your keytable>

And that’s it. It is simple, it survives reboots. It doe NOT require changing the lirc keyboard.xml”

Tips ‘N’ Tricks for Customizing Xbian

Note: All the below tweaks are collected from xbian forums and the credit goes to the original poster.

Changing the Xbian Boot Logo: 

The steps to change splash logo are very simple and require no system edit / changes (simply no hacking).

1) Logo and supplemental graphics is under /usr/bin/splash.images as jpg files
2) change logo.jpg, start splash you will see result immediately
3) if ok, just run “sudo xbian-update-initramfs”

Workaround:  check /boot/initramfs.gz.old, if is still in tact. rename it to /boot/initramfs.gz and try to boot.

Miscellaneous performance tweaks

– disable “Show RSS news feeds” in Settings>Appearance>Skin
– disable “Download actor thumbnails when adding to library” in Settings>Videos>Library
– disable “Extract thumbnail and video information” in Settings>Videos>File lists


File: /etc/mysql/my.cnf
– use the ip adres instead of server name
– disable “use dns lookup” in mysql settings

Categories: Audio/Video, General