Introduction to shell scripting

Shell scripting basically means writing commands that can be read my shell program for execution on a unix system . There are a number of shell programs like

  • Bash – Bourne Again Shell
  • Ksh – Kornshell
  • Zsh – Z shell

Each of these shell programs does the same job with differences in syntax and built in functionality, but for these series of blog posts i will focus on the Bash shell program.

In order to interact with a shell program using modern day Unix operating systems like Ubuntu Linux you will need a program called the terminal. on Ubuntu you can use the keyboard shortcut ctrl + alt + T  to open the terminal. Also note that if your Linux installation doesn’t have a (GUI) graphical user interface then you can interact with the shell using your already available command line interface.  If you have access to ny of these then you are ready to start shell scripting.

terminal
terminal

Shell scripting might sound a little intimidating for some but trust me its not difficult and it is a useful skill. I hope you enjoy the rest of the series.

 

Advertisements

Installing H265/HEVC Codecs on Ubuntu

I was about to watch a documentary this afternoon when I came across an error. It seems like the file wouldnt play no matter what media player I used. I run check on the format and it was an mkv file with a H265/HEVC format.

Never heard of that before? Yeah, me too.

According the Cnet, H265/HEVC (High Efficiency Video Coding) format is the new successor to Advanced Video Coding (AVC), also known as H.264, which is one of the compression schemes used by Blu-ray. The new successor to Advanced Video Coding (AVC), also known as H.264, which is one of the compression schemes used by Blu-ray.

codec

So how do you install the codecs on Ubuntu if your system doesn’t already have it? First you open your terminal (ctrl + Alt + T) and enter the following commands

sudo apt-add-repository ppa:strukturag/libde265
sudo apt-get update

This will add the needed repositories to allow you to install the codecs

sudo apt-get install gstreamer0.10-libde265
sudo apt-get install gstreamer1.0-libde265

 

And finally if you have VLC media player you can enter the following to add the necessary vlc plugins.

sudo apt-get install vlc-plugin-libde265

Now you can enjoy your movie. 🙂

 

 

 

BOEING 747-400 VIRGIN ATLANTIC GIGANTIC RC AIRLINER MODEL JET

I saw this video recently on YouTube through one of my favorite blogs. It amazing how interesting the world of miniature design can be,  especially when they are working RC models (Remote controlled models). This model is of a Boeing 747 and it is truly amazing. I think I have found something I should be taking up as a hobby.

Details

Model: RC Boeing 747-400 from Adi Pitz
Wingspan: 4,95m
Length: 5,43m
Weight: 68 Kg
Scale: 1:13
Turbine: 4x IQ Hammer 140
Pilot: Rainer Kamitz

Blue Origin’s New Shepherd makes historic flight

If you are into space like I am you should have heard this pretty cool announcement by Blue Origins( a space company owned my Amazon CEO Jeff Bezos). Blue Origin successfully launched their New Shepherd launch system into space and landed it safely for RE-USE!!!  This kind of thing gets me excited!

rocket_full_lightblue
New Shepherd

Up until now rockets have never been reusable. After launch the entire system is discarded or burns up in space and a new one is created but with the New Shepherd system it is possible to reuse the entire system. Literally refuel it and launch again.  Whats really important is that this greatly reduces the cost of space transport making it more likely that in the near future space travel will be affordable.

Poor Sound Quality on Ubuntu? Try PulseAudio Equalizer

If you have been having some problems with sound quality on Ubuntu then this software might help you. I have been having some issues with my new Ubuntu 14.04 installation and one of those was with the sound quality.

Music is a big part of my life. I listen to music all the time and like most music lovers it is difficult to ignore when you are listening to music and cannot hear it with good sound quality. That was what I experienced after installing Ubuntu 14.04. I immediately noticed a significant reduction in sound quality. I couldn’t find any issues with my sound card which works perfectly with windows. So I searched online for a solution and this one seems to work quite well.

PulseAudio Equalizer
PulseAudio Equalizer

The PulseAudio Equalizer worked for me and has been the best solution at the moment. If I find a better one I will surely update this post.

Enter the following into your terminal to install.

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install pulseaudio-equalizer

Or you can check out the post on Web Upd8 for more details.

You can drop a comment and let me know what you think about it and if it worked for you.

How to solve Ubuntu Software Center getting stuck when installing software

Installing software on Ubuntu can be challenging for the newly initiated but is made easy through the use of the Ubuntu Software Center. This works much like an App Store or a Google Playstore making software installation easy for Ubuntu users. But from time to time you might face challenges with certain software like i did when installing Dropbox. For some reason I lost my internet connection for a few minutes and when I tried to continue it just wouldn’t work. The installation got stuck and wouldn’t continue even after closing the software center and reopening it. I found a solution that could help you and it did help me, just follow these simple instructions.

Open your terminal. You can do that by using the keyboard shortcut Ctrl + Alt + T

Type the following command and hit enter.

sudo lsof /var/lib/dpkg/lock

You would be prompted to enter your password, enter your password and hit enter.

From there identify the PID(Process ID) of the process causing my dpkg to lock. Then enter the command below and hit enter.

sudo kill -TERM <PID>

Next, enter the command below and hit enter.

sudo dpkg –configure -a

Wait for the results and then enter the command below and hit enter.

sudo apt-get update && sudo apt-get upgrade

Screenshot Terminal showing commands
Terminal showing commands

I hope this helped you. You can comment if it worked for you or if you faced any challenges.

VirtualBox Error in Ubuntu: Kernel driver not installed (rc=-1908)

After installing virtualbox on Ubuntu from the Ubuntu Software Center if you have a problem that pops up like the one in the image below then please follow the instructions below to resolve it.

“Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing

‘/etc/init.d/vboxdrv setup’

as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.”

Screenshot

The error message asks you to simply install dkms

From your terminal enter the following commands

sudo apt-get install dkms

sudo /etc/init.d/vboxdrv setup

This should usually help resolve the issue, but if this fails just head on to the VirtualBox website and download the latest version Virtualbox 5.0 .

virtualbox site

This version should work since bug fixes would have been implemented. When you have downloaded virtual box. Double click or right-click it and select Open with Ubuntu Software Center.

Screenshot

This will open the package in the software center and you can install by clicking the install button.

This should resolve your issues and you can user virtualbox in Ubuntu with no issues.

Top 3 Laptops for College 2015

I am sure you have in recent times tried to acquire some  piece of technology and you had some difficulty in finding the right device. Today i would like to talk about laptops. First let’s get into what makes a laptop suitable for college.

First thing to consider is the design and the weight of the laptop. Typically college students carry their devices around wherever they go and as a result taking the design and weight into consideration is very important. The laptop should be small(but not too small) thin and light to make it convenient to carry around and use.

The next and I will say the most important thing is the battery life. When you are in college you typically wouldn’t get a charging station in most places where you can sit down to research, even in the class when you are taking notes. Having a laptop that can carry enough power to get you through the day is important. The longer the battery power lasts, the better. So now let’s get into the list.

1. The DELL XPS 13  2015 edition

Dell XPS 13 2015 [image from Dell.com]

Dell XPS 13 Specs

2. The MacBook  Pro 13 inch

MacBook Pro 13 inch [image from Apple.com]

MacBook Pro 13 inch Specs

3. Microsoft Surface Pro 3

Surface Pro 3[image from microsoft.com]

Surface Pro 3 Specs

I hope this lists help you in choosing a laptop for college. There are other laptops out there but these should serve as a guide for your decision in buying a laptop for college.

Why I am not buying the iPhone 6S or 6S Plus

Apple had its yearly event on Wednesday 9th September 2015. And as usual with any apple event there were new products that were launched and according to Apple like with all their events these were the best things in the world and you have to get out there and buy them.

There was the new 12 inch iPad Pro, a new Apple TV and others but of course the star of the show which is responsible for two-thirds of apples profits was the new iPhone, the iPhone 6S and 6S Plus.

The iPhone 6S [Image from apple.com ]
But wait before you go out and buy one probably you might be interested in hearing why I wont be getting one.

  1. It’s too damn expensive: Those phones are too expensive for the work that they do. Honestly if your livelihood doesn’t depend on having the new iPhone then you shouldn’t be thinking of buying one. If you have the older version stick with it. Your life will be so much better.
  2. My android device does all that I need it to do for me: I am able to run all the apps I need for communication of entertainment from my android phone and until its time for an upgrade you can count me out. No need throwing out a perfectly good device just to have a nicer camera.
  3. The new iPhone is a modest upgrade of the previous version with only minor specs added to the new one there isn’t much of a reason to switch to the new iPhone. Be a little patient surely the iPhone 7 might give you a better reason to upgrade.

Share your reasons for buying or not buying the iPhone 6S or 6S Plus in the comments section. Also if you are interested in watching the entire Apple event click here.

Fixing your Logitech Unifying receiver

If you have purchased a Logitech mouse or any other Logitech product that uses a Logitech unifying receiver then I am sure after some months of use you realized that it wasn’t working. If you can relate to this story then take a look at the solution below, it should help you fix your unifying receiver.

DSC06566

  1. First pull out he black cover on your unified receiver.

DSC06568

2. Pull out the controller module(it is the part that looks like a circuit board)

DSC06573

3. Then fold a piece of paper and put it at the bottom of the module and inset it back into its holder. This ensures that the module doesn’t lose contact.

DSC06568

4. Put the black cap back test to see that it is working and then you can glue the black cover in place.

I hope this helps and if you found it useful please comment and share this post to help other facing the came issue.

This YouTube video shows what I just talked about

https://www.youtube.com/watch?v=1NlYRsVJB74

This YouTube video shows what I just talked about

https://www.youtube.com/watch?v=1NlYRsVJB74