Finally, I install gnupg-2.0.30 after struggle

From last one day, I was trying to install gnupg-2.0.30 for file
encryption and decryption. But I was unable to install it after
downloading. Error (No target found) was coming whenever I execute
“make” after “./configure”. But “make” was there in gnupg-2.0.30’s
folder. I searched alot and also saw youtube videos, But nothing found
regarding installation of gnupg. I was following same procedure as in
README, But I didn’t know where I was wrong. So, I leave it.

Today, I tried again. I read README again, some packages name was
defined in README before installation. So, I thought, I should install
all, after that I will be see error. After package installation, I
execute ./configure again. Now error was different :-). It was giving
only 2 errors, regarding installation of 2 libraries (zlib and
libpth-dev) and previous errors was solved. So, I install that 2
libraries. After that I run “./configure”again, it was succesfull. Now
“make” was ready to run. Finally I installed gnupg-2.0.30 after “make”and
“make install” commands :-).

Push code via SSH keys

I was facing problem i.e I was unable to push code on GitHub from home network. Whenever I tried to push or clone code, it  was giving below error:

error: RPC failed; result=7, HTTP code = 0
fatal: The remote end hung up unexpectedly

This problem was coming with https protocol. Then I tried to solve problem with another method. I used SSH to fix above error.

How I solved  above error?

I used SSH keys instead of https. In this method, you will generate your public key and attach that key with  your GitHub account.

Step1: Install OpenSSH:

sudo apt install openssh-server

Step 2: clone repository with ssh:

screenshot-from-2016-09-19-224033

But it will give below error because you did not generate and connect public key.

screenshot-from-2016-09-19-224817

Step 3: Generating public/private rsa key pair:

$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

Step 4: List the files and directories in your ssh folder:

$ ls -al ~/.ssh

Step 5: Check that you are connecting to the correct server:

To make sure you are connecting to the right domain, you can enter the following command:

screenshot-from-2016-09-19-231205

Note the IP address (the numbers within the [] brackets). The connection should be made to a GitHub IP address, on port 22.

Step 6: Add your SSH  key to the ssh-agent:

$ ssh-add

Step 7: Verify that you have a private key generated and loaded into SSH. If you’re using OpenSSH 6.7 or older:

$ eval "$(ssh-agent -s)"
$ ssh-add -l

Step 8: Add your SSH key to your account:

$ sudo apt-get install xclip 
$ xclip -sel clip < ~/.ssh/id_rsa.pub

Then add the copied key to GitHub. Go to Settings->SSH keys(Personal settings side bar)->Add SSH key->fill out form(key is on your clipboard, just use ctrl+v)->Add key.

Done 🙂

Now you can clone and push code via SSH keys :-). See

screenshot-from-2016-09-19-234927

Enjoy 🙂

 

Root Android phone to create more space for Apps

Sometimes, our Android phone don’t have enough space  for Apps. And we are unable to install our favourite Apps due to short space. Some people do reset their phone to get space But reset can release space of User Applications not System Application. In other words,  reset can’t  release space occupied by builtin Apps (System Application).

So, to release space of unnecessary  builtin Apps (System Application), you should Root your Android phone. Now what is Root? Root is “su” power on your device. You can work as developer in your device If you have knowledge.

Root Android phone using following steps:

Download and install Kingo ROOT in Android phone.

41

Open Kingo ROOT to Root your phone. But my phone is already rooted.

6

After root, new App “SuperUser”  will be installed. Just open it. It will give you su power on phone. You can delete Built-in Apps to create space.

Step 1

71

Step 2

1

Step 3: You can delete unwanted Apps or Games that are unecessary.

547

Now restart your phone.

Enjoy 🙂

July 15, 2016 (Makefile)

Today, Amrit gave a presentation on Make. It was a very good presentation. Anyone can make makefile who listened to his presentation.

Before start, he presents difference between script and make. When  the script is used, all files are compiled during compilation, even only single file is changed. But when we make makefile, it will compile only that s changed. And make is beneficial only if there is a large project.

After that he shows us demo of a makefile. Basically, to create makefile We must know the steps of compilation to get final result. We must know commands that will be used to get the final output. Then follow same steps in a makefile.  But must create object file that is needed to  get  final output.  And there is one option “-I “, when this option used compiler search current directory to get header file (.h file created by us). If this optoin “I” is not used then the compiler will search standard library to get your header file. And .PHONY is most important in  a makefile. Using it, compiler recognised that there are commands under the variable assigned to .PHONY. For example: If I define .PHONY=CLEAN and write some bash commands under CLEAN then compiler will run that commands. Without assigning CLEAN to .PHONY, a compiler will consider CLEAN as a file.

ngrok in Linux

Today, I install and use ngrok. ngrok is similar to Teamviewer which is used in windows and Linux to connect computers from any remote location and does not require to be on the same network. I thought that ssh can access computer only on the same network. So, I used Teamviewer instead of ssh.

Later on, Amrit told me about ngrok and he said that we can connect computers  from any remote location using ngrok.  So, I  install it 🙂

ngrok is easy to use. Follow below steps:

  • Just  download its zip file from : https://ngrok.com/download.
  • Then unzip it. It will  create binary file  ngrok. Then run this binary file using ./ngrok.
  • Now login on : https://ngrok.com/download and Install your authtoken using :
    ./ngrok authtoken 2CAB7**************************
  • Now read its README file and apply command for your purpose.
  • for example: ./ngrok tcp 22 (if you want to provide  your computer as server on terminal). just give its link to client computer.
  • ./ngrok http 80  (if someone wants to access your computer from a browser).

Create Bootable Pendrive of window 7 in Ubuntu

Yesterday, I created bootable USB of window 7. Normally, we use Startup Disk Creator to make bootable Pendrive from Linux-iso in Ubuntu. But we can’t make bootable Pendrive of the window using startup disk creator in ubuntu. So, we need another software to do this. Yesterday, Amrit suggested me to use winusb  for this purpose. I wanted to search But he told me, My Bad Luck 😛 . Then I install winusb in ubuntu and make bootable Pendrive from window-iso.

How I solved mount error (\mnt\8426CA2726CA1A56) occurred during booting

Today I solved error that I am facing from a month ago. Actually, whenever I start the laptop, it gave error during booting. An error  was :  An error occurred while mounting \mnt\8426CA2726CA1A56. But every time I ignore this using ‘S’ and continue booting. But Today, I solved that.

jk

The reason of this error is, When Ubuntu boots, it tries to automatically mount this partition but it does not work because Windows fast startup is enabled. So, to solve this error, disable ‘Mount at startup’ option of windows partition. Window is located at NTFS so uncheck  ‘Mount at startup’  option from that.

Steps to remove above error:

  1. Open disk in ubuntu.
  2. Open windows partition.
  3. Go to edit mount option of window partition.
  4. uncheck ‘Mount at startup’ option.
  5. Click Ok and restart your laptop.

Done 🙂