Jan 10, 2015

Reversing scroll direction in Ubuntu

sudo vi /usr/share/X11/xorg.conf.d/50-synaptics.conf

add the following lines in the Section "InputClass"
  • Option "VertScrollDelta" "-10"
  • Option "HorizScrollDelta" "10"
reboot and you will be scrolling the proper way!

if you want to try your settings without rebooting the following two commands will do the trick:
  • synclient VertScrollDelta=-10
  • synclient HorizScrollDelta=10

Mar 9, 2014

Adding multiple magnet links to rtorrent at once

I recently started using rtorrent for handling downloads on my Samsung Series 3 Chromebook. I came up with the following method for adding multiple magnet links at once in batch. This is assuming you've already put your Chromebook into developer mode and installed Linux in the crouton environment.

  • Write the following script in your Linux installation:

          for m in $(cat /home/bob/Downloads/Magnets.txt); do cmd=$cmd' '$m; done;
          echo "" > /home/bob/Downloads/Magnets.txt; 

  • Create a text file in your Downloads folder so that it will be easily accessible from both Chrome OS and from Linux.
  • Edit your text file using your favourite cloud text editor. Currently mine is Caret.
  • Copy and paste your magnet links into the text file. Each magnet link is on it's own line.
  • When you're ready to start your downloads, flip over to Linux and run the script.
  • You should see rtorrent start up with all your downloads.

I like this method better than installing a browser on the Linux side and starting the downloads the standard way. The browsers don't run as smoothly as they do on Chrome OS. This is probably not the case on the newer Intel Chromebooks. 

Jan 15, 2014

How to watch any video format on an iPad

I bought my wife an iPad mini for Christmas. She loved it!! I learned that technology and jewelry have the same effect on women (well at least one woman anyway!)

We've loaded a few videos on her iPad some in iTunes format and some in various other formats. The latter took me awhile to figure out with the help of Google so I thought I would share.

  • Open the Apps Store and download and install the VLC video player app. It's free!
  • Plug your iPad into a computer with iTunes installed.
  • In iTunes you should see a button for your iPad near the top right hand corner.
  • Click the iPad button. (be careful not to click the eject portion of the button or else you will eject your iPad and will have to unplug it and plug it back in)

  • You should start off in the "Summary" tab of your iPad. Click the "Apps" tab.
  • Now scroll down to the "File Sharing" section. 
  • The "File Sharing" section will list all the apps that use File Sharing. VLC should be one of these apps.
  • Select the VLC app under "File Sharing" and then under the "VLC Documents" section click the "Add..." button.
  • Select the file(s) that you want to add and click the "Add" button.
  • The file(s) will be transferred to your iPad.
  • When the file transfer finishes, click the "Done" button in the upper right hand corner.
  • Eject your iPad and unplug it from your computer.
  • Open VLC and watch your movies!

Sep 13, 2013

Installing Pantheon Theme on Chromebook

I discovered Elementary OS a couple of weeks ago and fell in love with this distro and wanted to install it on my chromebook. I soon discovered it wasn't possible to install the full Elementary OS on my chromebook, so the next best thing is some sort of theme.

This blog post details the steps I took to install XFCE on my Chromebook and tweak it to look like the new Elementary OS!

  • First you'll need to enable developer mode on your chromebook.
    • Note: this will wipe all your local data, most of your stuff should be in the clouds anyway, but quickly backup your local data first.
    • Press and hold Esc and Refresh and then press the Power button.
    • Your Chromebook will reboot into Recovery Mode.
    • As soon as you see the Recovery Mode pop up, press Ctrl+d. Press Enter.
    • This will take about 15 to 20 minutes.
    • Eventually it will reboot into Chrome OS and you are now in developer mode.
    • Note: some older chromebooks have a physical switch that enables developer mode. If you're not sure just do a search on how to enable developer mode for your particular model.
  • Now download the crouton script from this page:
  • Press Ctrl-Alt-t to start a new crosh session (chrome os terminal)
  • shell
  • sudo sh -e ~/Downloads/crouton -t xfce
    • this will run for awhile
    • it will prompt you for a username / password
  • sudo startxfce4 
    • this brings you into your new linux install.
  • Here's what it looks like so far: 

Note: Ctrl-Alt-Back and Ctrl-Alt-Forward will toggle you between Chrome OS and XFCE.
  • sudo apt-get install vim python-software-properties
    • vim for editing
    • python-software-properties is added to get add-apt-repository
  • sudo add-apt-repository ppa:elementary-os/stable
  • sudo apt-get update
  • sudo apt-get install wingpanel slingshot-launcher plank elementary-theme elementary-icon-theme
Ok, so now that all the programs and themes have been installed, it's time to start adding some tweaks.

Window Manager:
  • Select Greybird theme
  • Increase font size to 12
  • Change button layout to Close - Title - Maximize

Window Manager Tweaks:
  • Check Enable display compositing
  • Check the options you want under compositing.

  • select elementary style
  • select elementary icons
  • increase font to 12 and tweak to your liking.

Session and Startup:
  • remove xfce4_panels from Session. you can't really delete it so just select Never for Restart Style.
  • add wingpanel and plank to Application AutoStart

Now logout and login. It should look a lot better now!

At this point you've disabled the default xfce panels and replaced them with the wingpanel and plank programs. The slingshot-launcher works from the wingpanel applications link. Now just cleanup the Desktop and add your own custom tweaks.

  • remove icons by unchecking all the Default Icons
  • change wallpaper

Now you should have something that looks a lot like the Elementary OS!


Please write your comments, I'd love to hear how you like your new "Luna Chromebook"!

Aug 16, 2013

Importing and Exporting XBMC Libraries.

I just went thru the process of figuring out the best way to Export and Import XBMC libraries in such a way that I can export a library from one XBMC installation and import that same library into another XBMC installation without using the Internet (my Parents don't have internet!).

So I'm about 99% sure I've found the cleanest way to do it.

  • Put a bunch of movie files in a folder somewhere.
  • make sure you're connected to the Internet at this point and have XBMC installed.
  • in XBMC go to Videos / Browse / Files / Add Videos...

  • Enter the path to your folder
  • Give the Media Source a name (I always use "Movies")
  • click OK.

  • Select under "This directory contains..."
  • uncheck "Movies are in separate folders that match the movie title"
  • uncheck "Scan recursively" (i always have my movies in one folder)
  • uncheck "Exclude path from library updates"
  • click OK

  • let it Scan the internet and build your video library.
  • When it's done go to XBMC / Settings / Videos / Library
  • click Export video library

  • specify separate files

  • say Yes to export thumbnails and fan art

  • say No to export actor thumbs. I haven't experimented with the Actor thumbs yet as I want to save space on the Raspberry Pi for more movie cover thumbnails.

  • say Yes to Overwrite old files.

  1. Now you should have 2 additional files for every movie file.
    • A .nfo file (xml file holding meta data for the corresponding movie file
    • A -poster.jpg file
  2. The .nfo files will contain a bunch of useless tags with URL addresses that point to the movie posters on the internet. This is useless if you want to be able to import without using the internet, so we're going to need to strip out the tags from all the .nfo files and add our own tags using the local MovieName-poster.jpg file.
  3. The following command line magic will strip out the tags from all the .nfo files and add our own tags using the local MovieName-poster.jpg files:
    1.  perl -ni -e "print unless <thumb" *.nfo
    2. for f in *.nfo; do perl -pi -e "s/\/mpaa>/\/mpaa>${f//.nfo/-poster.jpg}<\/thumb>/" "$f"; done;
  4. Now copy your movie folder to any other computer with XBMC installed and go thru steps 3 - 12. You will NOT need the internet to build your library! You have everything you need with the .nfo and .tbn files.

Mar 1, 2013

Suppressing repeating x-axis date labels

For those of you familiar with Highcharts, you are probably aware that if you make an axis a datetime type that it will automatically and intelligently label your axis. There are some limitations with the standard formatting options though. Sometimes you want to tweak something a certain way and there doesn't seem to be a way to do it.

I came across a scenario where the users wanted the date labels to be just the year. I thought it would be easy, all I'd have to do is give it a dateformat of "%Y" to get a four digit year. The only problem with this was depending on how many ticks there were on the x-axis I would get the same label repeated multiple times. Not good! There is no option in highcharts to suppress repeating labels.

I came up with this solution that handles this problem perfectly!

I made use of a label formatter callback function like so:

xAxis: {
    type: 'datetime',
    labels: {
       formatter: function() {
var year = Highcharts.dateFormat('%Y', this.value);
if (prevYear == year) {
} else {
prevYear = year;
return year;

The formatter callback function will be called in a loop, once for each label. Javascript doesn't have a static variable so I just made use of a global variable "prevYear". I used the prevYear variable to suppress repeating labels. After making this change to my highcharts code, I just had to ensure that there was a global variable named prevYear available on the page that uses the highchart code and everything worked great!!

The following are screen shots of the results:

In this example there were enough labels that there was no repeating problems so this chart shows no change, it looks the same as it did before adding the suppressing logic.

In this example, the chart has been zoomed and there are fewer labels and the labels were repeating.

The label suppressing logic took care of this and here is the result:

If you look closely you can see ticks with no label. The two ticks after the 2005 label would have been 2005 repeated. Same with 2006 and 2007.

I hope this helps someone looking to suppress repeating axis labels.


Jan 20, 2013

Transferring files between Android 4+ and Xubuntu 12.10

Apparently Google has removed USB mass storage capabilities from their latest releases of the Android operating system. It used to be easy to transfer files from Android to Linux, simply plug in the USB cable and start copying files back and forth.

For now, until I can find a way to plug my LG Optimus G into my laptop and mount it, here is my work around. Install AndFTP on my Android, and install vsftp on my laptop and transfer using FTP.

Installing vsftp.

  • open terminal
  • sudo apt-get install vsftpd
  • edit /etc/vsftpd.conf and make the following config changes
    • anonymous_enable=YES
    • write_enable=YES
    • ftpd_banner=Welcome to my FTP Server
  • /etc/init.d/vsftpd service restart
  • place files to transfer on /srv/ftp/
  • type lfconfig and make note of inet addr:


  • open Google Play
  • search for and install AndFTP
  • start AndFTP and add an FTP Server. 
    • Enter the ip address from above in the Hostname field
    • Enter an existing Linux user name in the Username field

Once connected you will see all the files that you placed in /srv/ftp on your android device.
Simply select the ones you want to download and click the download button!

To upload files from Android to your Xubuntu, simply click the "Device File Browser" button
and you can browse the files on your Android and select the files you want to upload and click the Upload button.