Category Archives: Ubuntu

Install Mcrypt PHP extension on Ubuntu (PHP-FPM + Nginx)

To install Mcrypt PHP extension on Ubuntu / Debian run following command ( this step is same for Nginx and apache )

This will create a mcrypt module in /etc/php5/mods-available directory. If it doesnt we need to create symlink for this.

Now enable mcrypt by running

After this restart php5-fpm service by

 

Enable password authentication and set root password – Ubuntu

To enable Password Authentication

Open file etc/ssh/sshd_config by

Search for PasswordAuthentication no, just change this to

To set root password

it will ask for new root password and confirm root password. To test this logout from current session and try to login using root as user and password that you have just assigned.

 

How to update Geary to latest version

Geary is an IMAP mail client for GNOME 3.

Geary recently released their new version 0.10, with various improvements. To update geary to new updated version add Yorba ppa.

Restart geary and you will see an updated version of geary.

Android Studio – Unable to run mksdcard SDK tool

When I was installing Android Studio on Ubuntu this error occurred which halted the installation

It happened twice and I thought sharing this might help others. It got resolved by running following command.

 

 

JDK Required: ‘tools.jar’ seems to be not in Studio classpath

I was installing android studio on ubuntu and come across this error.

After lots of searching I found this simple soutuion that worked for me.

This is caused by having JAVA JRE installed as opposed to JAVA JDK. Installing JDK resolve the problem.

 

Android – Command not found (Ubuntu)

If you encounter this error, it indicates that your environment variables are not properly set. We will add these environment variables by editing “.profile” file present in your home directory.

If you have installed android sdk through Android Studio, it is likely to be present in /home/your_user_name/Android/sdk, otherwise in /home/your_user_name/android-sdk-linux.

If you have installed it through android studio then add following line in your “.profile” file
export ANDROID_HOME=$HOME/your_user_name/Android/sdk

else add this

$ export ANDROID_HOME=~/android-sdk-linux

Then add the paths to the platform-tools and tools sub-directories

export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH

You should now be able to run android from the shell. Note that you might need to reopen the terminal to make it work

Installing node js on Ubuntu using NVM

Node JS can be installed using various methods, but in this post I am going to show you how to install it using NVM (Node Version Manager)

To install NVM through curl

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.1/install.sh | bash

or Wget:

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.25.1/install.sh | bash

The script clones the nvm repository to ~/.nvm and adds the source line to your profile (~/.bash_profile, ~/.zshrc or ~/.profile).

After this restart PC / VPS to make command NVM available. You will get list of options when you type NVM in your terminal.

Now you can run

nvm install version_name

at the time of writing, latest version of nodejs is 0.12.3. So this can be

nvm install 0.12.3

dev@devenubuntu:~$ nvm install 0.12.3
######################################################################## 100.0%
Now using node v0.12.3 (npm v2.9.1)

You can verify the installation by running

dev@devenubuntu:~$ node -v
v0.12.3

Ubuntu – what to do when everything freezes?

(this post is just for a personal reference)
If it locks up completely, you can REISUB it, which is a safer alternative to just cold rebooting the computer.

REISUB by:

While holding Alt and the SysReq (Print Screen) keys, type REISUB.

R: Switch to XLATE mode
E: Send Terminate signal to all processes except for init
I: Send Kill signal to all processes except for init
S: Sync all mounted file-systems
U: Remount file-systems as read-only
B: Reboot
REISUB is BUSIER backwards, as in “The System is busier than it should be”, if you need to remember it. Or mnemonically – R eboot; E ven; I f; S ystem; U tterly; B roken.

In case you like mnemonics: Raising Elephants Is So Utterly Boring, or Reboot Event If System Utterly Broken. I’ve also seen it as RSEIUB (Raising Skinny Elephants is Utterly Boring)

Reference: http://askubuntu.com/questions/4408/what-should-i-do-when-ubuntu-freezes?page=1&tab=votes#tab-top

“System program problem detected” – Ubuntu

Disabling error-reporting is not a desirable solution!

Ubuntu has an error reporting system called apport which tries to catch all program crashes in the background and report them to help the developers.

It seems that after a dist-upgrade there are stuck some reports that are tried to be resubmitted somehow, but disabling apport is not a desirable solution.

Remove old crash-reports

Open a terminal and remove all old crash-reports that might exist in the crash-report directory:

After a reboot the popups are gone.

If you don’t want to reboot, you can close all open popups with:

(Any further new pop-ups still should be investigated. If you want to see the details,
look in /var/crash/ for any new reports)

Ref : http://askubuntu.com/a/369297