Custom Screensaver in Linux — GL Matrix Cyan Color Mod

I have always liked the Matrix screen saver that is packaged with most linux distributions. However I have a blue backlight keyboard and when the green martix screensaver came on it really clashed with the keyboard. If only there was a way to change the color… wait this is Linux and Linux is all about being able to change anything!

Green Matrix

The Origional Green Matrix

Blue Matrix

I must thank

Posted in Uncategorized | Leave a comment

BASH – Beginners Guide for Quick Learning

I have been learning BASH (Bourne Again Shell) over the few days and I want to share with you my experience so you don’t have to expose your poor computer to any profanity.

Before beginning this tutorial you should have some experience with

  • The basics of using a linux command line terminal (cd and ls)
  • Using a command line editor such as emacs, vim, and pico
  • Basic knowledge of some other programming language

Whitespace Matters

So the first thing I noticed is that BASH is very white space dependent. For example when you initialize a variable do not add spaces on the sides of the equal sign.




Another example of this is the if statement. There must be a space after the if.

if [[ a > b ]]; then
#some action


if[[ a > b ]]; then
#some action

I don’t think it matters if you have multiple spaces as long as you have one space where it is required.

The Basics of Accessing and Setting Variables

Setting a variable and accessing a variable is a little strange especially if you are coming from a php programming background. To set a variable you just write the variable name and the equal sign. To access a variable you have to use the $ sign.

#variableA is set to 1

#variableB is set to 1 notce the $

Posted in Uncategorized | Leave a comment

How To Install Emerald Windows Decorator for Linux

Emerald is extremely customizable and easy to use and produced a lot of marvelous themes including one I made myself. I’ve been though a couple different Linux distributions, and I’ve still never found any windows decorator that could give a desktop linux machine such a nice vibe.


My Starace Tron Inspired Emerald Theme

So recently after I got a new computer, I decided that I was going to get emerald back. My first task was to pick a Linux distribution that could use Emerald. I decided to used Linux Mint Mate Edition. Emerald isn’t for every Linux desktop. It requires a program called Compiz to run. Compiz comes by default on Ubuntu systems and can be installed on many Mint, Debian, Arch, and other Linux distros, but not all, specifically Linux Mint Cinamon Edition can’t use Emerald. I also have a tutorial on setting up Compiz.

I looked online for a apt-get repository for emerald. Unfortunately the ones I tried were broken.So I decided that I was going to compile it from source. I first downloaded the most recent source source for emerald.

I also installed the dependancies

sudo apt-get install intltool build-essential libxrender-dev libgtk2.0-dev libwnck-dev libdecoration0-dev libwnck1.0-cil-dev autoconf libtool gawk

I then extracted emerald and I tried to configure and make it. Unfortunately I came across this error.

/usr/bin/ld: main.o: undefined reference to symbol 'exp@@GLIBC_2.2.5'
/usr/bin/ld: note: 'exp@@GLIBC_2.2.5' is defined in DSO /lib/ so try adding it to the linker command line

Thanks to this post that I found, there was an extra step. I needed to export something called a load flag. So I was able to install emerald by doing the following.

tar -xvf emerald-0.9.5.tar.gz
cd emerald-0.9.5
export LDFLAGS='-lm -ldl'
make install

If everthing worked right you should have installed emerald. You can start the emerald theme manager by typing “emerald-theme-manager” into the terminal. You can then turn emerald on by typing “emerald –replace.” That will turn Emerald on. To have Emerald start as your default windows manager go to the compiz config manger “ccsm.” From there click

Posted in Everything Penguin Related | Leave a comment

How To Setup Bumblebee NVIDIA Optimus Linux – Ubuntu and Mint

I recently got a new laptop

Posted in Everything Penguin Related | Leave a comment

Brainstorming and Initial Design

To come up with a design to defeat the evil spin myself and my team came up with several initial concepts

Posted in Uncategorized | Leave a comment

How to set up an SSD on Linux

I recently bought an awesome new ASUS G53SW and to go along with it I purchased a 128 Gb Plextor SATA III SSD. I wanted to use the SSD for the Mint Linux OS.

It seems that there are a ton of older articles that talk about getting an SSD correctly configured in Linux. I perused through them and I found several conflicting and incorrect instructions. In the following tutorial I am going to try to present what I have learned, both how to configure and why it is configured that way.

These instructions should work for all Debian based Linux Distros (Ubuntu Mint). Some of the commands may need to be tweaked for Fedora or others.

Before I begin let me just gloss over the paradigms behind SSD drives. SSD drives are fast compared to the traditional hard drives. Traditional hard (7200 rpm) drive get less than 100 Mb/s read rate which degrade over time. SSD’s with SATA III I have seen with speeds at 500 MB/s. So with SSD’s your application load times are reduced by 80%. However SSD’s are more expensive smaller and as they are written to they lose disc space, leading to a short life time if they are written to too much.

Hard Drive Speeds:
More on SSD Technology:

Before you Buy — Is the SSD compatible with your Hardware?

If your computer is new chances are it supports SATA III for its hard drives. If your computer is older check to see what SATA your computer supports. No sense in buying a SATA III device if your computer only supports SATA II. SATA III is completely backwards compatible with SATA I, II but will only get speeds at the SATA I, II levels.

Before you Install — Linux Partition Type

Before you install Linux you will want to consider the partition type. The partition types for a Linux install are ext2, ext3, ext4. There is a fair amount of dispute as to which is best. There are a lot of fans of ext2 and ext4. The default install of most (or all?) linux distros is ext4. Ext4 is a journaled file system. The journal is there for redundancy in the event of hard drive error/failure. It is a lot easier to recover your data with and ext4 system, however the journal adds writes to your SSD. The ext2 partition type does not have a journal so the life of the SSD is lengthened, but it loses the recovery features. Ext3 is a journaled file system with less features than ext4 so it is typically rejected in favor of ext4.

More info on ext2, ext3, ext4:

In the article listed below a pro ext4 person explains his viewpoint that the lifespan of the SSD is so long that having a journaled file system won’t be a big deal unless you plan on using the drive for more than 10 years. I would suggest that for any desktop user ext4 is a good choice. If you are installing the ssd for a server then you might think about ext2 as long as you keep good backups.

Ext4 suppoter:

After Linux Installation — Know Your Hard Drives

If you have multiple hard drives connected to your Linux machine you will want to know which hard drive the name of the hard drive. If you go to your terminal and type in “df -h” you should see something like this.
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdb6 89G 9.2G 76G 11% /
none 4.9G 588K 4.9G 1% /dev
none 4.9G 536K 4.9G 1% /dev/shm
tmpfs 4.9G 1.6M 4.9G 1% /tmp
none 4.9G 396K 4.9G 1% /var/run
none 4.9G 0 4.9G 0% /var/lock
tmpfs 4.9G 0 4.9G 0% /var/tmp
/home/chris/.Private 89G 9.2G 76G 11% /home/chris
/dev/sda2 466G 54G 413G 12% /media/Windows Starace
/dev/sdb1 26G 9.5G 16G 38% /media/Windows SSD
/dev/sda1 100M 25M 76M 25% /media/System Reserved

Looking at this screen you can tell that I have two hard discs and a couple partitions on each disc. The entries with /dev/sda and then some number are partitions that are on my 7200 rpm Seagate traditional hard drive while entries with /dev/sd2 are partitions on my 128 Gb Plextor SSD. Knowing that the the ssd’s name is “sdb” is important for the upcoming steps. Most people will probably have their ssd name be sda so I will use that in the rest of the tutorial.

After Installation — Changing the Linux Disc Scheduler

The hard drive scheduler attempts to organize hard drive requests in a way that is efficient. However organization is so old school. With SSD’s the memory access is instantaneous and many of the schedulers that were designed for spinning hard drives will only get in the way of SSD performance.

There are four types of schedulers in the Linux World. Anticipatory, Completely Fair Queuing, Noop, and Deadline. Anticipatory scheduling tries to arrange hard drive reads in a way that will maximize efficiency on a spinning disc. Completely Fair Queuing (cfq) is an anticipatory scheduler that adds in a ranking system for important disc reads. Neither of these are suited for an SSD.

The noop is a simple first in first out queue. The deadline is a biased noop queue that allows an application to get some access to the disc even if another application has already requested it.

The deadline is the best scheduler because it has more features than the noop and doesn’t worry about a rotating disc like cfq. To see what scheduler you are currently using go to your command line and look at this file

cat /sys/block/sda/queue/scheduler

You should get something that looks like this

noop deadline [cfq]

The option in brackets is the scheduler that is currently being used by your system, notice that this is currently the cfq. We want to change this to deadline. To do this we are going to edit the file /etc/default/grub. Type “sudo gedit /etc/default/grub” to edit the file. There should be a line of code that looks like this

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=deadline"

To make the scheduler add in the elevator=deadline option that is highlighted in red. Be sure to put a space after the previous option. You may have more options than I do and that is perfectly fine. After you make this change reboot your computer. Run the “cat /sys/block/sda/queue/schedule” command and deadline should be bracketed.

Wikipedia on Schedulers:
Tombuntu on Grub:

Prolonging SSD Life Eliminating relatime and adding Trim.

Posted in ASUS G53SW Setup, Everything Penguin Related | Leave a comment

Linux Is My 2nd Best Friend

I switched to Linux on my Main Laptop 3 months ago on May 20th 2010. I had several concerns about it when I started.

  • Will my wireless card work?
  • What will happen if I don’t have Microsoft Office to rely on!
  • How will Linux affect my gaming?

Of course my girlfriend is my best friend.

Posted in Everything Penguin Related | Leave a comment

How to Setup Private Internet Access VPN for Ubuntu and Linux Mint

Virtual Private Networks (VPNs) are great to help you keep your Internet traffic secure. VPN’s do two things. First they encrypt your data so no one can tell what you are looking at. Second, VPN’s also encrypt the location of the data that you are requesting. This keeps groups from blocking access to public websites or modifying the content of the websites you are looking at. I recently purchased a VPN service from the “Private Internet Access” company for approximately $40 / year. I followed this guide install the VPN on my computer via this guide. For some reason it didn’t quite work. Perhaps because the guide was for Ubuntu 12.04 and currently I am running Linux Mint 17.2 (which runs off the same source list as Ubuntu 14.04). Here is the guide to how I installed the VPN’s.

I first followed the tutorial by getting the script that Private Internet Access has on their website and running the script:

chmod +x

This script successfully added the VPN connections under the VPN connections tab. However when I went to click on them I got an error.


The error said “The VPN connection failed because there where no valid VPN secrets.” I did some Googling and finally found a way to fix the issues. The script we ran earlier created a bunch of files in the /etc/NetworkManager/system-connections/ folder. We need to edit these files to change


and add the following lines


There are a bunch of “PIA – Location” flies in the /etc/NetworkManager/system-connections/ folder so rather than edit each one by hand I wrote a quick script to edit them. You can use the following script

Create a file with the contents of the script below

for f in /etc/NetworkManager/system-connections/PIA*;
sed -i 's/password-flags=1/password-flags=0/g' "$f"
echo "
" >> "$f"


Then make it executable with the chmod +x and run the script with a sudo.

And there we go you should be able to access your VPN.

Posted in Everything Penguin Related | 4 Comments

How to Retrieve Data From Matlab Figures

I was using MATLAB to make several figures and I had saved them in the “.fig” format. A while later I misplaced the original data and I wanted to see if I could regain access to the data from the figure file. It took me a while and I had to dig pretty deep to find it but I finally found it and I’m posting it here to hopefully help you.

First click on your figure. Then go to the Matlab command line and type in the following commands.
line_handles = get(gca,'children')

x = get(line_handles(1),'xdata');          
%(1) is for first data line, (2) for second, etc.
y = get(line_handles(1),'ydata');

And viola you’ve gotten your x and y data back from any of your line plots on that figure. If you have subplots it works as well just be sure to click on the subplot plot that you want to get the data on before you enter the commands above.

Posted in Uncategorized | Leave a comment

Upgrading Your Kernel – The First Thing You Should Do After Installing Linux

Whether you are installing linux for you desktop or for your server, the first thing you should do after installation is update your kernel. You kernel is the backbone of Linux and updating it to the latest version will help ensure that all of your computer’s hardware will work with Linux. If you have a newer computer this could be vital to ensuring that the features of that computer are fully enabled. For example backlight keyboards, new Intel CPU features, wireless cards, better solid state drive access times, could all be held back in your new computer because the Linux kernel on your computer is too outdated to implement those features.

You can check to see what version of the the Linux Kernel you have by typing the following command into the terminal:

uname -r

In my case I have 3.8.0-19-generic. Once I see that I can go to the website which lists the latest version of Linux. I can see that the 3.9.9 version is out as a stable version.

From here I have two choices. I can either download and compile the kernel (advanced) or find someone who has compiled the kernel for my Linux Architecture. I am using Linux Mint 15 so I searched google for “Linux Mint 15 64 bit Kernel 3.9.9″ and I promptly found this article with instructions.

Installing the Kernel in Mint/Ubuntu/Debian

If you’re using a Debian based 64 bit architecture (Mint, Ubuntu, and Debaian 64 bit Linux Distributions) you can get the 3.9.9 kernel files with the following terminal commands.

wget -c
wget -c
wget -c

These commands get the necessary files to upgrade the kernel. To install the kernel run the command

sudo dpkg -i *.deb

This installs the kernel. To try the kernel out restart your computer. Now when you type the command

uname -r

You should see the new version listed. For me updateing the kernel had one immediately noticable effect. My fn + f5 ad fn + f6 screen brighness keyboard combinations now work. A couple years ago updating the kernel allowed my new wireless card to work.

If you dual boot your computer you should be the GRUB bootloader menu with the undated kernel version. From grub you can also boot into “Previous Versions of Linux” to get your old kernel back. If something went wrong and the kernel doesn’t work well it is easy to rool your computer back. You can use the synaptic package manage/software manager to remove the kernel. Just search for the kernel version and mark for un-install.

Thank you Linus (the guy who invented the Linux Kernel).

Posted in Everything Penguin Related | 1 Comment