Sumon Selim

Homo sapiens by Born. Coder by Heart. Entrepreneur by Passion.

In search of happiness…

Hi, I am Muhammad Sumon Molla Selim (mostly known as Sumon Selim) from Dhaka, Bangladesh. I’m a coder by <3.  Love to write codes mostly using PHP and Laravel. I will talk more about this later. But let’s move on to something else – myself, my life.

I was going through much hardship in last few years – mostly mentally. But now I have decided to move on. I’m sacrificing all my dream and hope. Instead I will live from now only to fulfill my responsibilities – responsibility towards my family, responsibility towards humanity!

I’ll write regularly from now to tell stories about my Life, Thoughts, Experience and my Coding journey.

While I start my journey, here are some lines I would love to mention:

In my search for freedom
And peace of mind
I’ve left the memories behind
Want to start a new life
But it seems to be rather absurd
When I know the truth
Is that I always think of you…

Installing LAMP (PHP 5.6, Apache 2.4, MySQL 5.6) Stack on Elementary OS Freya

I’m a web and mobile application developer by profession and developing on LAMP (Linux, Apache, MySQL and PHP) stack for last couple of years. Now it’s time to get development environment ready on my newly installed elementary OS “Freya”. I will install everything separately instead of using the tasksel command.

At the time of writing this article, I’m installing the latest stable version of all the things I am going to need.

  • PHP 5.6
  • Apache 2.4
  • MySQL 5.6

Installing Apache 2.4

We will add the repository of the latest Apache version to our system by using the following command:

Then run the following two commands to install Apache 2.4:

Installing PHP 5.6

First, we will add the repository of the latest PHP version to our system by using the following command:

Then run the following two commands to install PHP 5.6:

This will install PHP on our system.

Installing MySQL 5.6

We will add the repository of the latest MySQL version to our system by using the following command:

Then run the following two commands to install MySQL 5.6:

This will install MySQL on our system.

You will be asked to set password for the “root” user for the MySQL server during the process.

Voila! Our development environment is ready now :)

If you visit http://localhost now, you will see the Apache2 Ubuntu Default Page.

Apache2 Ubuntu Default Page

Now let’s write some PHP code to check if everything is working properly. Let’s create a PHP file named info.php on the default document root folder of Apache web server which is /var/www/html and add the following code to the file:

Save the file. Then visit the file on your browser: http://localhost/info.php

You should get an output like this:

LAMP on elementary OS Freya

 

You may need to install some other PHP extensions and libraries according to your need manually. I will cover this in future. Feel free to comment if you have any queries.

Customizing Terminal with Guake, oh-my-zsh and screenFetch on Elementary OS Freya

As I stated previously that I am a great elementary OS fan and installed the latest beta of elementary OS titled “Freya” few days ago. Now, it’s time to customize it and making it ready as my primary development environment. The first thing I am going to customize is my terminal because I am not that much fan of the default bash terminal.

First, I am going to install Guake to change the appearance behavior of my terminal. I really liked the drop-down approach of Guake which helps me to work without any flaw with so many things within the workspace.  I can just press the “F12” key to toggle the visibility of my terminal after installing Guake. There are couple of others handy customization options available too.

So, let’s install Guake. First we may update our system by running the following command on the terminal:

Then run the following command to install Guake:

There may be some others dependencies that need to be installed. If needed, you may install those.

After installing Guake, you may run it from the terminal by just running “guake” on the terminal or from the Applications menu.

You can customize the preferences according to your need by right clicking on the Guake terminal and clicking on the Preferences option.

properties Preferences for Guake Terminal

To use it instead of your default Terminal, you will need to add it on the Startup Applications so that every time you run your system you can use Guake immediately by just pressing “F12″. You may also change it according to your need.

To add Guake on the Startup Applications, go to your “System Settings” and select “Applications“. Then click on the “Startup” tab. Click on the “+” icon placed at the bottom left of the screen and select “Guake Terminal” from there.

Add Guake Terminal on Startup

From now, every time you start your system, Guake will run automatically.

Next, I am going to install oh-my-zsh as I like it very much. But first, I need some other things to install first such as curl, git, vim and zsh.

To install them run the following:

Then we can use the automatic installer to install oh-my-zsh on our system easily.

After installation, we just need to set oh-my-zsh as the default terminal from our Guake terminal. To do that open the Preferences option and just set “/bin/zsh” as the default interpreter.

Re-start the terminal now. And we will be ready to go :)

oh-my-zsh terminal with guake

At last, I will add screenFetch to add some system/theme information in terminal. For elementary OS, run the following commands on terminal:

Thanks to memoryleakx for his screenFetch special version for elementary OS.

At last, we have to add the following line to the end of our .zshrc file:

Here’s the final look of my terminal:

guake, oh-my-zsh and screenfetch on freyaLet me know what you think of it!

Fixing Date and Time Visibility Problem on elementary OS Freya Beta

I am a hardcore elementary OS lover and was using Luna for a long time. But couldn’t wait more for the new version of elementary OS Freya and decided to move onto it. So installed Freya Beta 1 64 bit on my HP ProBook 4420s as my primary OS replacing Luna 32 bit.

The Problem: But I found that time and date is missing on the top bar (wingpanel).

Date and Time problem on Freya Beta 1The solution:

After googling, I found out that the solution is to add a single line of information on the /etc/environment file.

I’m a terminal lover. So, I typed the following command on the terminal to edit the file. Remeber, you will need administration access to edit the file.

And the result was:
Editing the /etc/environment fileAll I need to do was to add the following line on it and save it.

You can set your locale (e.g. bn_BD.UTF-8) too as a value.

After a restart the problem was fixed and date and time was visible on the wingpanel.

Date and time visibility problem fixed on Freya Beta 1Alternatively if you are not comfortable editing on the terminal, run the following command on the terminal.

This command will open the /etc/ folder on the Files browser and then you can edit the environment file using your default text editor.

If gksu is not installed, you can install it by using the following command:

Basically gksu is a graphical front-end for sudo that allows graphical command to be run without the need to run an X terminal emulator and using su directly. It’s effectively just a GTK+ skin for the superuser commands.

© 2014 Sumon Selim

Theme by Anders NorenUp ↑