XBMC on Dell Inspiron 400 (Zino HD)

Of late, I have been trying to wean myself off Windows systems. First my Laptop, then my desktop and now my HTPC unit. Linux systems just feel snappier and they have come a really long way in terms of “just working” on common hardware.
Yesterday I did full volume install of XBMCbuntu (“Gotham”), wiping out the old Windows 7 OS installed on the unit. Once again, the results were extremely impressive, and reinforced my belief that Linux systems (esp ubuntu/debian based distros) are here to stay. Based on my experience, I can confidently say that unless you have archaic hardware, Linux should provide a much better experience than Windows.

Here is the config of my Zino HD HTPC (purchased in 2010):

1.5GHz AMD Athlon X2 3250e
256MB ATI Radeon HD 3200 (integrated ATI graphics chip)
250GB, 7,200 rpm HDD
DVD burner
Gigabit Ethernet
Dell Wireless-N WLAN 1520 Half MiniCard

Lenovo Wireless Multimedia Remote (A fully working remote when I tried the live cd was a welcome surprise:-)

Connected to a 40 Inch LCD TV (Sony Bravia KDL-40S4100) via HDMI.

The setup itself was super smooth – pop the installation media, select install, standard Ubuntu installation steps. ALL hardware was detected and fully functional right after the install and reboot. The system takes about 3.5 GB of disk space. Suspend, Hibernate, Shutdown work as expected. The UI is very intuitive and responsive, and I definitely consider it an upgrade over Windows Media Center!

To make the UI align perfectly on your display, there is a setting (they really have thought of everything !)

System->settings->system->Video Calibration

If your TV is like mine, you will not see the corner markers shown at http://wiki.xbmc.org/index.php?title=Calibration#Video_calibration… (Pay close attention to the top left and bottom right screen markers in the images – You want them to perfectly align with the corners of your TV screen). Move your mouse cursor to the top left – the caption will change to indicate that you are adjusting the top left corner, then use cursor arrows to move the markers into position. Repeat for bottom right corner, and subtitles.

I tried a bunch of themes (after installing the Fusion repository), however none were as sleek and well rounded as the “Confluence” theme installed by default. The linux open source driver (Gallium 0.4) DOES NOT support hardware decoding (yet). However the CPU seems perfectly capable of rendering videos smoothly – The max load I noticed using the video overlay option was each core at 50% while playing some videos on my NAS).
I am quite happy with 720P video playback as my internet speed is definitely a bottleneck for streaming 1080P videos.


My Linux Environment Setup

Install tlp to manage battery (gave me an extra 20 mins or so. Also laptop runs cooler):

sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tlp-rdw
sudo tlp start

Linux Mint makes setting defaults a snap via the “Preferred Applications” dialog box (Under Preferences)

Screenshot from 2014-07-13 04:24:19






Install awesome themes – My favorite is “Metro”.

Set fonts to work for your resolution. This is what my “Fonts” screen looks like (Works great for 1920X1080 15 Inch screen)

Screenshot from 2014-07-13 07:16:38






PHP Development/Laravel related stuff

Install Virtualbox:

sudo apt-get install virtualbox-dkms
sudo apt-get install virtualbox virtualbox-qt virtualbox-guest-additions-iso

Install Vagrant:

Download the latest deb file from vagrant (The default packaged version is outdated and not suitable for installing homestead)

Download and install PHPStorm – My preferred IDE for PHP development

Install Sublime text – an awesome text editor (also check my commonly used plugins)

sudo apt-get install sublime-text

install Git – Required for cloning various repos
Install php-cli – This is required for composer install via phpstorm

sudo apt-get install php-cli

Install composer (globally)– This is required for composer install via phpstorm

Other than the software listed above, I install all other programming environment related utilities within the Vagrant box.

Dell Latitude E6510 & Linux Mint 17 Cinnamon 64 bit (Qiana)

Finally, A version of Linux that is on par with Windows in terms of ease of installation and use! I have tried numerous times in the past to get a “fully” functioning Linux install on my (various) computers; However, I was never completely satisfied – It would invariably be lacking support for some hardware component or the other.

Yesterday, I finally succeeded in installing a fully functional, robust Linux environment on my main work laptop (Dell Latitude E6510) with Linux Mint 17 Cinnamon (Qiana).

Here are my laptop specs:

Screenshot from 2014-07-12 18:02:39





I am happy to report that ALL hardware components work as expected. Most notably, these nagging problem areas that I faced with Linux distributions in the past (almost all) seem to be resolved – I have tried various flavors of Ubuntu, LMDE and Fedora:

  • Wireless
  • Suspend/Hibernate/Shutdown support – Including Lid close options
  • Backlit keyboard
  • Touchpad (vertical and horizontal edge scrolling)
  • Support for all “FN” combinations on keyboard (increasing brightness, volume etc)
  • Keyboard pointer (located in middle of keyboard)
  • High resolution support(1920*1080)
  • Inbuilt webcam

Why I decided to switch (from Win to Linux) for my Development box:

Pretty much all the tools I commonly use for programming are built primarily for the Linux environment (for the most part windows alternatives are secondary) For example: Git, Virtualbox, Vagrant, all LAMP related software such as composer, PHPUnit, etc. Getting Node.js to work properly on Windows is nightmarish. Not to mention the hurdles one has to cross when you are using an ordinary user account. Modern web-based programming workflows requiring the use of grunt/gulp/yo is so much easier on Linux. So, it just makes more sense to use a pure Linux box for (web) development. Additionally, using the Ubuntu/Mint package manager for various requirements is so much more convenient than downloading and installing software in windows. So far I have been using Vagrant in Windows;however, the system was never as stable as I would like (requiring frequent box rebuilds, lack of symlink support etc.)

The Linux software environment is unbelievably efficient. I can run the entire Linux mint OS (bundled with LibreOffice, Firefox, VLC all the default stuff), Vagrant box (Homestead – complete with webserver, database server etc), development environment with PHPstorm, Sublime, Java etc and it takes less than about 8 GB of space! The equivalent windows software requirement exceeds 60GB. Also, I have rarely seen the RAM use exceed 2 GB.

I did run into a couple of issues along the way:

1. Immediately after I installed Linux mint Cinnamon, I found that GRUB (boot-loader) was not created. So, the system booted directly into Linux. The Windows partition was intact. For some reason, it was not visible to Linux Mint. The fix was quite easy – Install the Boot Repair utility – https://help.ubuntu.com/community/Boot-Repair

2. Driver for Nvidia NVS3100 graphics card: The default Nouveau driver caused the system to hang on resume from suspend and hibernate. To fix this, I used the driver manager utility to install the recommended Nvidia driver (Version 331). After about a day of use I noted random system hangs (with gray blank screen) and figured it must be the Nvidia driver because Noveau did not cause this behaviour. I then installed an earlier version (304), and it has been stable as a rock. The suspend and hibernate functionality work perfectly with this version of the video driver. So much so that I have stopped doing a full shutdown – resume from suspend takes about 2 seconds and resume from hibernate takes around 6 seconds!

3. The default icon/font rendering was tiny on my hi-res monitor(1920X1080). To fix this, I set font scaling to 1.5, installed default-zoom extension in Mozilla to scale up to 150%.

So far, I am super impressed with the level of finesse offered by a free OS. I hope to make the Linux partition my primary development workspace.

Ubuntu 10.04 (Lucid) and VPN (Cisco) @ UF

VPNC is a VPN client for use with Cisco IPSec servers. Network manager applet now perfectly integrates with VPNC making establishing a VPN connection as effortless as with Windows 7 (once it is setup). The advantages of using VPNC are:

  1. Native 64 bit support
  2. Integration with NM applet (you no longer have to keep a terminal window open for the duration of the connection)
  3. No more ‘Kernel Tainting’ using the Cisco proprietary drivers – VPNC runs entirely in user space

The required components are not installed by default. However, it is trivial to setup using apt-get:

sudo apt-get install vpnc network-manager-vpnc network-manager-vpnc-gnome

Now, the VPNC plugin is added along with the default PPTP plugin to the network manager vpn options.

The next step is to download your organization .pcf (profile config file) file. UF VPN users can Download it from here (requires gatorlink auth).. Look for the link labeled “VPN Configuration file” at the bottom of the page.
The .pcf file contains, among other parameters:

  • Server name/Gateway
  • Group name
  • Group password (encrypted)

This file can now be imported using the vpnc plugin. From the NM applet, click on ‘VPN Connections’->’Configure VPN’->’Import’:

Using the ‘Select File’ dialog box, select the downloaded .pcf file, and click on “Open”. All essential fields will be imported and displayed:

A few changes need to be made to the imported settings:

  1. Change the group name from vpn-auth-mga to vpn-auth (mga stands for “mutual group auth”.. it is not currently supported by VPNC on Ubuntu)
  2. Replace ‘username@ufl.edu’ with your gatorlink username followed by “@ufl.edu”
  3. Set the domain as “ad.ufl.edu”
  4. The “Group password” field is already filled in .. This is in encrypted form in the .pcf file (enc_GroupPwd)

Click on the “Apply” button.

You will be prompted to unlock your keyring. DO NOT ENTER YOUR PASSWORD HERE .. JUST CANCEL OUT- This is critical. There seems to be some issue with vpnc accessing the keyring. Once this is done, close out the nm dialog.

Now, you are ready to connect to the VPN server. Go ahead and click on “VPN connections”->”UF Gatorlink ..”. You will be prompted for your keyring password first… Enter your admin password(Ubuntu).. thereafter, you will be prompted for your gatorlink password.

If all goes well, you should be connected. An easy way to check if traffic is going through the vpn is to use the “Network tools” application under “System”->”Administration”:

You should find data being transmitted through the VPN tunnel as shown above.

Note that connecting using username@ufl.edu results in a “Full vpn”.. that is, ALL your traffic is encrypted through UF servers. This causes a load on the vpn service when multiple users tunnel in. It is more bandwidth friendly to use a “campus only” vpn – Substitute “username@ufl.edu” with “username@ufl.edu/campus” in the “username” field. This will ONLY cause traffic to and from ufl.edu to be encrypted (and should suffice for most needs. Library e-book access, however requires full vpn).

LAMP and Zend Framework on Ubuntu 10.04 (Lucid)

I got my main development tools setup on Ubuntu this weekend. My workstation has 64 bit Ubuntu installed and I did not want to have to install the 32 bit libraries (used by XAMPP). So I opted for installing all the components from the ubuntu repositories.

Ubuntu makes it super easy to install ALL the required components using 1 single command! You no longer have to go into Synaptic and check all the required software!

Open up a terminal and type

sudo tasksel

Select LAMP from the options presented and follow the prompts. Seriously.. It could not get any easier!

Ok.. so now, you have Apache2, PHP and Mysql server setup. The default web directory is /var/www.

You should now be able to navigate to http://localhost on your browser and see the “It Works!” default page. Now, if you try to add any of your own scripts/pages to this folder, you will get a “insufficient privileges” error. This is because the var/www by default belongs to user ‘root’ and group ‘root’.

I have noticed so many websites/blogs suggesting granting super cow rights to ALL to this directory to get around this.. I strongly recommend against doing that. Instead, I suggest creating a group named ‘web’ with rwx permissions to /var/www. Then, if you want other users to be able to author pages, add them as members of the ‘web’ group.

  1. Click on ‘System’->’Users’->’Manage Groups’->’Add’

Go ahead and enter the new group name ‘web’ and make yourself a member like so:

2. Next, setup ‘web’ as the group for /var/www

sudo chgrp -R web /var/www
sudo chmod -R g+rwx /var/www

The first command changes the group ownership from ‘root’ to ‘web’
The second command adds read, write and execute permissions to the group (web)
(the -R signifies recursive flag.. so files and subfolders inside /var/www will inherit these settings as well)

At this point, this is what “ls -l /var” should look like:

3. log out and log back on (Group membership is only processed on login) . You should now be able to save to the /var/www folder. Also, if you need any other shared user to have web permissions, simply add them to this group ‘web’.

Go ahead and create a “phpinfo” page in /var/www:

Point your browser to http://localhost/phpinfo.php and confirm that php is successfully installed.

The next task is to install the Zend Framework. Download the most recent version from the Zend Framework website and extract it to the /opt folder. To enable us to easily switch out different versions, we will create a symbolic link to this folder (just right click and select the ‘Make link’ option.. name it ‘Zend’)

Next, we will tell php to include the zend framework in the include_path.

sudo gedit /etc/php5/apache2/php.ini

Add/Change the include_path in to :

include_path = “.:/opt/Zend/library”

Note that I used the symbolic link in the include path.. This way, when there is a new version of ZF, we can just switch out the symlink without having to edit the ini file!

In order to use the zend framework command line tool (/opt/Zend/bin/zf.sh), we need to install the php command line interface (php5-cli).

sudo apt-get install php5-cli

Note that the CLI uses a different version of the php.ini file (NOT the one in the apache2 folder but in the cli folder!). We need to tell CLI also where the zend framework directory is located.

sudo gedit /etc/php5/cli/php.ini
and set:
include_path = “.:/opt/Zend/library”

The final step is to include the path to /opt/Zend/bin in the unix PATH variable (this way, you can use zf.sh instead of /opt/Zend/bin/zf.sh). Edit file named ~/.bashrc (an easy way to get to this is to click on ‘view’->’show hidden files’ in nautilus in your home directory). Add the following line at the end:


The Zend Framework relies on the apache “rewrite” module. So, go ahead and enable the “rewrite” module using the following command:

sudo a2enmod rewrite

Restart apache.. and you should be all set 🙂

Netbeans 6.9 beta includes a plugin to create Zend Framework projects (using the zf.sh tool).. I have it installed, and it works great!

Ubuntu 10.04 (Lucid Lynx) on My Optiplex GX260

I always look forward to new Ubuntu releases – not because I use Ubuntu a lot, but because it usually presents a challenge!

I was finally able to install Lucid on my trusty GX260 desktop alongside Windows 7. As with all Ubuntu releases, the components that did not install smoothly were:

  1. Wireless USB – Airlink 101 Golden N mini USB (Model: AWLL6075)
  2. PCI graphics card – GE Force 6200 256 MB Ram

However, I am happy to report that I finally have my desktop running Lucid perfectly (Suspend/Hibernate also work well!). Here’s a summary of the steps I had to take:

Wireless Internet

After some research, I realized that the drivers to run this are already present (I did NOT have to download, and compile the drivers from realtek).. All that is missing is the “firmware”. Click here to download this. Extract it and place it in the /lib/firmware/RTL8192SU directory like so :


(If the RTL8192SU directory does not exist, go ahead and create it)

Now, if you insert your mini USB, it should detect the wireless signals around. I have WPA2 encryption enabled and it works fine (via the network-manager applet)

Oh.. and one other thing.. Once you are connected to your AP, go into the wireless configuration and click on “Enable for all users”.. Doing this ensures that you are not prompted to unlock the Keyring on every boot.

Video Card

My Optiplex has an inbuilt intel extreme graphics card and Ubuntu works fine without hooking up my GEforce card. However, when the PCI adapter is plugged in, Ubuntu does not boot (It displays a bunch of error messages and freezes).

Here’s how I got the boot process working:

  1. Allow ubuntu to boot normally after removing the pci card
  2. Once you are logged in

Navigate to

>sudo nano blacklist.conf

Add the lines:

blacklist intel_agp
blacklist agpgart

3. Shut down

4. Install the PCI card and restart

Ok.. that took care of the boot problem and I was successfully able to login. However, Compiz refused to enable desktop effects (the main reason of installing a graphics card in the first place!)

Running compiz –check gave me the following message:

Blacklisted PCI ID 8086:2562 detected

I tried the compiz recommended solution to this problem (added SKIP_CHECKS=”yes” in the config file). However, the problem persisted.

Finally, I stumbled upon this page http://ubuntuforums.org/showthread.php?t=1467202 that presented a novel solution to the problem. It turns out the compiz executable has this blacklisted id hardcoded. The solution involved modifying the compiled code.

sudo apt-get install ghex
sudo ghex2 /usr/bin/compiz

Search for the string 8086:2562 in the hex code (I was unable to use the search feature.. found it by scrolling somewhere near the end). I replaced the ‘2’ to a  ‘4’ (any other number should work as well) and saved it.

Once this is done, go ahead and enable desktop effects. If all went well, you should have all the compiz bells and whistles!