CyberKeeda In Social Media

Ubuntu: Stop pdf to open with default ImageMagick

Surprisingly after migrating from Unity to Cinnamon DE, i found a very annoying and strange behaviour or my default  application  for PDF .

Instead of Document Viewer, it's using ImageMagick to open each PDF document, though i have adobe reader within my Ununtu 16.04, but it's not ready to leave ImageMagick at all.

So now , as always our friend is Terminal, follow the below steps to get rid of ImageMagick.

  • edit the file   ~/.config/mimeapps.list

Now remove the lines that associates PDF to imagemagick in the file:

  • image/pdf=display-im6.desktop
  • image/pdf=display-im6.q16.desktop;display-im6.desktop;
I have performed these steps within my Ubuntu 16.04, hope this gonna work for you too.

Read more ...

Ubuntu : Touchpad and right click not working on Lenovo ideapad 320-15ISK

So these are the problems I encountered after a fresh Ubuntu 16.04 installation on my new Lenovo ideapad 320-15ISK.

  • Strange confusion between right and left click ( functioning opposite ).
  • Couldn't drag any window from touchpad.
  • Right click not working..seems to be disabled.

So below is the code snippet that work like a charm for me.

Do open the below file from terminal.

cyberkeeda@Linux-Maniac:~$ gedit /usr/share/X11/xorg.conf.d/51-synaptics-quirks.conf 

 Copy paste the below snippet at the top of the file.

Section "InputClass"
    Identifier "touchpad catchall"
    Driver "synaptics"
    MatchIsTouchpad "on"
    MatchDevicePath "/dev/input/event*"
    Option "TapButton1" "1"
    Option "TapButton2" "2"
    Option "TapButton3" "3"
    Option "ClickPad" "true"
    Option "EmulateMidButtonTime" "0"
    Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"

Save and restart your system, hopefully everything must work now.

Thanks to the mint forum

Read more ...

How to SSH in git behind proxy on windows

SSH into GIT behind proxy.


  • Open Git Bash on the repository folder.
  • Create a new ssh config file to store values  ~/.ssh/config

cybeerkeeda@Linux-Maniac:~ vim ~/.ssh/config
  • Copy paste the below lines within the file.

ProxyCommand connect.exe -H yourproxyip:proxyport %h %p 

     user git 
     port 22 
     IdentityFile "c:\users\cyberkeeda\.ssh\id_rsa" 
     TCPKeepAlive yes 
     IdentitiesOnly yes

  • Edit few lines out of it.
  1.           ProxyCommand connect.exe -H yourproxyip:proxyport %h %p 
  2.           IdentityFile "c:\users\cyberkeeda\.ssh\id_rsa" 
      Use your proxy ip/url and port 
      Use your Identity file.

Once configuration saved check again.
cybeerkeeda@Linux-Maniac:~ service sshd restart
If required, do export http_proxies into command lines too.

export http_proxy=http://yourproxyip:port/
export https_proxy=http://yourproxyip:port/
Read more ...

How to SSH and authenticate to github central repository

How to authenticate your computer to pull, push, fetch, commit to your central github account.

  • Generate your SSH-Keys.
cybeerkeeda@Linux-Maniac:~ ssh-keygen
Provide the details that it's asking from you, these details are optional you can even hit enter every time.
Generating public/private rsa key pair.Enter file in which to save the key (/home/cyberkeeda/.ssh/id_rsa):Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /home/cyberkeeda/.ssh/id_rsa.Your public key has been saved in /home/cyberkeeda/.ssh/ key fingerprint is:SHA256:j6S60jQqGdhgaikn7W37h4//fWIxfuuPn8/O8hxxeTBeS8 cyberkeeda@Linux-ManiacThe key's randomart image is:+---[RSA 2048]----+|              . .||               +o||               ++||  .   .       E =|| o o o .S      ..||o o = .o.o   o . || + + ...o.... * .||o o ..  .o. .=.*o|| . .o. ++ ...o*B%|+----[SHA256]-----+

So your key has been generated, now we will be using the public key  /home/cyberkeeda/.ssh/ kto authenticate your computer.

  • Copy your key.

cybeerkeeda@Linux-Maniac:~ cat /home/cyberkeeda/.ssh/
 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxzpbwBvPJ3LHJQpfxff860P4jKISitz+MueO2DFih9y97vldDhC9Ih0Q6Enw6J0YA9Z9IN+aSR7oBhwVgJGmYp1MqoS7NRuJ+EBo6ggl4ff9SJJznZMAN1/5xXGgv8lMs0KxV14aCn0KZUej2gJnkACSEilYRjU4/Fxsf+PSRNgABkQ0aFM8XodFZtlX5oTdtkkF9A16DpCGslkdCDgWR0MCxs5nB+MOIEnTTRfIPqxq7JgieVblCdW7O+7Lo8ugb0/wwv6I1AXH5Nf6h38uO3tZuM0ipc338dkTO94iCAp8129EOBqH74+tOey54WjS7m8eAtOs2W+JpUMI873qp cyberkeeda@Linux-Maniac

  • Login to your github account.
  • Click on Settings from from the drop down menu.

  • Click on SSH and GPG Keys
  • Click on SSH Key in order to add your ssh key

  • Copy paste the public ssh-key that we have copied earlier
  • Add any title to identify your machine 

So we are done with github part, now lets authenticate our computer to github.
Below command will help you to complete authentication.Note : It will ask for your github credentials, do provide it.
cybeerkeeda@Linux-Maniac:~ ssh -T
A success welcome message will appear in case if everything went successful.

Read more ...

BASH : Redirection STDOUT and STDERR into a file using 2>&1

How to redirects script output or error outputs
Let take three files named as  file1, file2, file3

Every file has the same content as " Hello World "
cybeerkeeda@Linux-Maniac:~ cat file1 file2 file3 
Hello World
Hello World
Hello World
Now lets assume fourt file named as file4 , which doesn't  exists 
cybeerkeeda@Linux-Maniac:~ cat file1 file2 file3 file4
Hello World
Hello World
Hello World
cat: file4: No such file or directory
Now compare with some of your shell script, you might want to log the errors or whole output into a file, in that case redirection comes into picture.

Case 1 : If you want to log every STDOUT irrespective of expected output or Errors, you can use the below parameter along with your shell script.
cybeerkeeda@Linux-Maniac:~ cat file1 file2 file3 file4   > mylog.txt  2>&1
Case 2 : If you want to log only STDERR ( Errors ), you can use the below parameter along with your shell script.

cybeerkeeda@Linux-Maniac:~ cat file1 file2 file3 file4   2> outfile

The above set of example will be used in log custom shell scripts outputs ( STDOUT / STDERR ) and one more example of it's usage in cron too.

Here is an example, usage of redirection with 2 and 1 to stop cron job sending mail for each execution. 

Read more ...

How to reset GNOME 3 Desktop

If you too have ended up messing up your GNOME DE like me, below one liners will surely your key to make your desktop look fresh again.

Use the below commands to Reset GNOME desktop.
rm -rf .gnome .gnome2 .gconf .gconfd .metacity .cache .dbus .dmrc .mission-control .thumbnails ~/.config/dconf/user ~.compiz*

Now,if you want to have a backup of your existing desktop Enviroment.

Run the below command to backup and Reset GNOME3 Desktop enviorment.
It's a one liner, you can make it multiples too ;)

mkdir ./.old-gnome-config/ && mv ./.gnome* ./.old-gnome-config/ && mv .gconf* ./.old-gnome-config/  mv ./.metacity ./.old-gnome-config/ && mv ./.cache ./.old-gnome-config/ && mv ./.dbus ./.old-gnome-config/ && mv ./.dmrc ./.old-gnome-config/ && mv ./.mission-control ./.old-gnome-config/ && mv ./.thumbnails ./.old-gnome-config/   && mv ~/.config/dconf/* ./.old-gnome-config/

Read more ...

Ubuntu : How to access Android device media files through USB

How to  access Media files from Android device, whether it's internal phone storage or external microSD card.

Steps to access Android Devices in Ubuntu, Linux Mint.

Here MTP stands for Media Transfer Protocol, which comes to existese when we connect our Smartphone through USB cable into computer/laptops.

Just Install libmtp, FUSE file system for MTP enabled devices mtpfs using below commands.

# sudo apt-get install go-mtpfs
sudo apt-get install libmtp
sudo apt-get install mtpfs mtp-tools
mtp-detect  ==> Run this command to verify your Android Device.

  • Rejack your Android device using USB cable in Ubuntu.
  • In your Android device, swipe down from above in the home screen and click Touch for more options. 
  • In the next menu, select option “Transfer File (MTP)“.
  • If required then, restart your device manager to
    sudo service udev restart

And you are done :) 

Read more ...

RUBY Installation on Centos with RVM

Install Required dependency mandatory Packages
Install all required packages for ruby installation 
# yum install gcc-c++ patch readline readline-devel zlib zlib-devel
# yum install libyaml-devel libffi-devel openssl-devel make
# yum install bzip2 autoconf automake libtool bison iconv-devel sqlite-devel
Install RVM
Install latest stable version of RVM
# curl -k | gpg --import -
# curl -L | bash -s stable
Setup rvm environment.
# source /etc/profile.d/
# rvm reload
Ensure RVM Dependencies
Now use following To verify all dependencies are properly installed.
# rvm requirements run

Checking requirements for centos.
Requirements installation successful.
Install Ruby 2.5.0
RVM is ready now, lets use it to install Ruby.
# rvm install 2.5.0
[Sample Output]
Searching for binary rubies, this might take some time.
No binary rubies available for: centos/7/x86_64/ruby-2.5.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for centos.
Requirements installation successful.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.5.0, this may take a while depending on your cpu(s)...
ruby-2.5.0 - #downloading ruby-2.5.0, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 12.7M  100 12.7M    0     0  33.5M      0 --:--:-- --:--:-- --:--:-- 33.6M
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.5.0 - #extracting ruby-2.5.0 to /usr/local/rvm/src/ruby-2.5.0....
ruby-2.5.0 - #configuring...................................................
ruby-2.5.0 - #post-configuration..
ruby-2.5.0 - #compiling.....................................................
ruby-2.5.0 - #installing............................
ruby-2.5.0 - #making binaries executable..
ruby-2.5.0 - #downloading rubygems-2.4.8
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  437k  100  437k    0     0  2367k      0 --:--:-- --:--:-- --:--:-- 2376k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.5.0 - #extracting rubygems-2.4.8....
ruby-2.5.0 - #removing old rubygems.........
ruby-2.5.0 - #installing rubygems-2.4.8......................
ruby-2.5.0 - #gemset created /usr/local/rvm/gems/ruby-2.5.0@global
ruby-2.5.0 - #importing gemset /usr/local/rvm/gemsets/global.gems...............................................
ruby-2.5.0 - #generating global wrappers........
ruby-2.5.0 - #gemset created /usr/local/rvm/gems/ruby-2.5.0
ruby-2.5.0 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.5.0 - #generating default wrappers........
ruby-2.5.0 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.5.0 - #complete
Ruby was built without documentation, to build it run: rvm docs generate-ri
Set Current Installed Ruby to Default Ruby Version
Use rvm command to setup default ruby version.
# rvm use 2.5.0 --default

Using /usr/local/rvm/gems/ruby-2.5.0
Check Current Ruby Version.
Like other programmes you can also use -v or --version to check ruby version
# ruby --version

ruby 2.5.0p230 (2015-12-16 revision 53155) [x86_64-linux]
Read more ...

BASH : How to delete blank lines from a file using SED.

A quick one liner to delete blank lines from a file

cybeerkeeda@Linux-Maniac:~ cat /tmp/hosts.txt






I will be using this file later on within LOOPS and intended blank spaces will be avoided.
Below mentioned SED one liner will sort out the requirement
cybeerkeeda@Linux-Maniac:~ sed -i '/^$/d' /tmp/host.txt

Read more ...

How to run C and C++ codes within Atom

Why to move ahead from your favorite IDE, when t's capable to run your C, C++ Scripts/Programmes.

Find here, how to run it.

Read more ...
Designed By Kunal Saha