Saturday 4 July 2015

Ubuntu / Debian in any android phone

This is a Tutorial to install Ubuntu/Debian in any Android mobile.
* Installing Ubuntu or Debian Linux does not format your Android OS or change anything to your phone. The Operating Systems run over the underlying Android OS which continues to function as normal 
Choosing your Linux OS:                                                         
There are few things you must be aware of before installing Ubuntu/Debian on youe Android Phone
Ubuntu does not support earlier ARM CPUs like the ones used in the Motorola Cliq. Samsung Galaxy Fit (ARMv6), Samsung Galaxy Y, etc.
( Reason behind this is , Your Android OS must support loop devices.  Most newer Android smartphones/tablets come with this support so we can mount our Ubuntu image as a loop device.  If not, you will either have to build your own kernel with support for loop devices or you can try an aftermarket ROM for your phone as most aftermarket ROMs come with support for it. )
You need at least an ARMv7 CPU like the kind found in the Motorola Droid, Samsung Galaxy S,HTC EVO 3D, Sony Experia Play, etc. most newer phones (Hummingbird, Snapdragon, Tegra2, etc.).So you can Install Ubuntu if you have  ARMv7 or newer Processor.
If you have ARMV6 or any other moderate Processor don’t be sad, because Debian supports the CPU on practically all Android devices, so if you prefer Debian, or you can’t run Ubuntu, choose the Debian download link.
* If you’re not sure what CPU your device has, look up your device on http://pdadb.net/, click the link under CPU, and read the line for “Supported Instruction Set(s)”.
e.g. : My Phone which is a ” Samsung Galaxy Fit”  uses ARMV6 Instruction Sets.
Pre-Requirements:                                                                         
Hardware Required:
an Android Phone
SD Card with more than 2GB of free Space
Android root environment:
Most important! Your Android device should be “rooted” because you need root access to run Ubuntu/Debian off your Android. If your device is not rooted you have to root your device.
Linux Operating System:
Download suitable OS from the following Link:
Applications Required:
BusyBox Installer
A terminal emulator like Better Terminal Emulator (Recomended) or Terminal Emulator.
Optional Apllications:
androidVNC
ConnectBot
Procedure:                                                                                
Step 1:
(Mount the SD card on your computer.)
Extract the .tar.bz2 file you downloaded to your SD card. You should now have a folder named “linux” on the root of your card.
(Unmount the SD card.)
Open Busybox Installer, and install Busybox.
Open Better Terminal Emulator,  and install Better Terminal Emulator.
Step 2:
Open your terminal emulator. (If using ConnectBot, connect to ‘local’, not ‘ssh’.)
Run the following commands:
su
( If Prompt for Superuser Request then allow )
cd /sdcard/linux

sh install.sh
If you don’t see any errors, Linux is now installed.
Step 3:
Open your terminal emulator.
To start a chroot session
su
linux

To start the SSH server
su
linux ssh
You can then use ConnectBot (SSH: user@localhost) on your device, or any SSH client to connect to your device. See Login Information, below.
To start a VNC session
( Firest you need androidVNC to be installed , then type the following in terminal )
su
linux vnc

The first time you run VNC, it will prompt you to create a VNC password.
You can then use androidVNC (host: localhost port: 5901), or any VNC client to connect to your device.
Configure The VNC App as follows:
Note: The default desktop environment is icewm. If you wish to replace it, for example, with LXDE:
Run the following as root in Linux:
apt-get autoremove icewm- lxde+
Secure your Log in Password:
Please remember to change these passwords if you are planning on using the SSH server. Malicious people can do Very Bad things to your device if you don’t.
There are two accounts included in the images:
root
Password:cheesecake
user
Password:dessert
After a successful connection to host you will  be able to use Ubuntu / Debian in graphical interface just like in your PC ! It will keep your Android OS as it is and just run in the upper layer over it 
Linux vs Linux Terminal Emulator :
Terminal Emulator only Emulates Linux terminal, but after Linux Installation you can get full features; more than just the limited commands which runs on Android shell rather than Linux Shell.
Please Leave your Feedback and Queries below. Thank You  

Posted by Riddhipratim Sengupta (original author of this post in several other forums)

Save files before hard drive crash

If you are a computer user then I am sure you have gone through this particular predicament of losing your important files due to the hard drive crash of your personal computer. There is a saying “prevention is better than cure”. Today I shall let you know how to save files before hard drive crash. There are lots of reasons for the crash and some indication of pre-crash scenario are listed below.
  • Clicking or grinding noises while running.
  • Files & Folders disappear randomly. Files and folders can also become corrupt and problem arises in accessing it.
  • During booting the computer freezes and can not complete the boot process.
  • Taking ridiculously longer time even in minor process like opening, closing or copying small files.
  • Though this is regarded as A.M.D special feature (pun intended) but often heating up also is a signal of harddrive failure.
  • Even after proper optimization the computer fails to speed up.
So its scary.. right ? Loosing all the important files which you have created / collected so far. The best way to avoid this disappointment is to use the cloud services offered by the best in the industry. The concept is simple. Your files will be synchronized to a cloud server which will pull data from the allocated folder in local computer once some changes are made or new files are added. The best part is that its free upto a decent usage. If that limit is crossed then there are premium paid plans. But i think from a personal user’s viewpoint the free quota is enough for us. Another factor for this assumption is that not all of us have access to high-speed unlimited usage internet connections in India and thus the free cloud service will not be abused. I am listing some of the best free providers.
  1. Dropbox 
  2. Google Drive
  3. OneDrive
  4. Box 
  5. Copy

Gaming PC within Rs. 45000

If you are in search of a gaming computer within Rs 45000 then you are in the right place. If you are a professional gamer then you may ignore this post and for you specially another post is coming up. If money is not a factor then I must suggest you to go for alienware desktops. They are the best in the market. I do not prefer alienware laptops as they are bulky and moreover gaming is considered to be less locomotory so desktop is much better than a laptop. If you want to buy alienware desktop you can check this link.
If money is a factor and you want to squeeze the value out of every penny then you may choose to assemble your desktop. Its not rocket science. Its very easy and self doable. If you need help regarding that, feel free to ask in comments, I shall help you with that.
For the aforesaid budget the best computer configuration which you can build is an Intel i3 processor based PC. Many, in fact most of the gamers, prefer an AMD based PC and I can not deny that at the same cost you will get a more powerful processor from AMD but if you are looking for hassle free PC experience then go for Intel processor based PC. Or if you are from Greenland, Siberia, Canada, Kashmir where the temperature is always below 10-15 degree Celsius then AMD processor will help you (pun totally intended). I am from India and I have a terrible experience with the fastest processor in the world (of 2012) which is an AMD. It used to average at 60 degree Celsius and on load reach upto 80-90 degree Celsius. My room is the coldest one in my house but I never required a heater in my room during winters. Thanks to the processor. Now don’t ask me about my experience during summers. ðŸ˜›
Its your computer so decision is yours. Here is the computer configuration which you are seeking.

Gaming computer within Rs 45000


Processor : Intel i3 3220 at 3.3 Ghz – Rs 7100
Motherboard :  Asus H61 M-C at Rs 3700
Graphics card :  Asus NVIDIA GTX650-E-1GD5 1 GB GDDR5 at Rs 9000
PSU : Corsair 450 Watt at Rs 2750
Monitor : Dell 21.5 inch full HD monitor at Rs 8850
RAM : Corsair Vengence 4GB at Rs 2900
HDD : Seagate Barracuda 1 TB at Rs 3900
Cabinet : Cooler Master Elite 311 at Rs 2650
Speakers : F&D f203G at Rs  990
Mouse + Keyboard : Dell USB Keyboard Mouse Combo KB212 MS111 at Rs 560
UPS : I highly recommend using a UPS. APC 600VA will be around Rs 2200. Its very good.

Advantages of a Desktop computer over laptop

We are living in an era where everything is pretty much computerized. From building software's, designing websites, monitoring patients in a hospital, booking online tickets, investing in share market, taking an online course (even exam) to finding the perfect soulmate via online dating service, we need computer in our day-to-day life. It has become an integral part of our life and along with time we are getting more and more dependent on it. As per our needs we have different types of computer which is listed as follows.
  • Desktop computer – It consists of separate components like cabinet (where motherboard, CPU, HDD, RAM etc is there), monitor, speakers and keyboard + mouse.
  • Laptop Computer – It has a clamshell form factor and is much smaller than a desktop. The components which I have mentioned above is fitted in one place.
  • Tablet computer – A tablet computer is a unibody design mobile computer having touch-screen display and battery in a single unit which weights less than 1/4th of a laptop.

Advantages of a Desktop computer

In most of the cases when we need a computer for our work a deskTop computer is better than a laptop. ( Considering that we do not have to move from one place to another while using a computer.) Here are some of the most important factors which shows the advantages.
  • Better value for money :  We all know that the configuration which we will get in desktop computer is much more powerful compared to the configuration of a laptop at the same price.
  • Lots of internal memory / storage space : We can have lots of internal memory as well as storage space in case of Desktop. Thanks to the advanced desktop motherboards having support of upto 128GB of RAM and with 6 SATA ports you can have petabytes of storage inside your RIG.
  • Bigger display : You can have bigger display in case of desk-top PC. Buy a big monitor and enjoy the high-definition truly. Laptops are limited to 19 inch only whereas desktop can have 30 inch + monitors.
  • Better hardware available : In case of laptop all the latest hardwares are not available. The processors with lethal speed and efficiency are not available for laptop as laptop can not provide the sufficient power.
  • Easy to upgrade : This problem is faced by almost every laptop user. And if you are into gaming you are doomed. In about every 2-3 years the earlier hardwares gets irrelevant. To start with – Graphics card and then processor which is dependent on motherboard. both of these can’t be upgraded.
  • Comfortable to use : Though this is what I consider a personal opinion, I find deSktop computer comfortable to use. I can work faster whereas a laptop slows me down.
  • Easily repairable : Almost all of us who have an experience using a laptop have faced CD / DVD drive faltering. This is the first inconvenience followed by laptop keyboard leading to battery issue. These three problems are mostly unavoidable.

Reasons :Windows 8.1 a better choice

Have a PC running Windows 8 or capable of the same ? Windows 8.1 provides useful tools and fixing some of Microsoft’s unpopular design choices thus providing you with a heap of reasons to upgrade the new version. For those using earlier versions of Windows, the updated OS fulfils many of the stipulations Microsoft began to deliver on with Windows 8. Providing the option to boot up straight to the desktop,the touch- first modern UI is made even more convincing. Listed here in are a few essential reasons why Windows 8.1 is a better choice
  • Introducing several new features, with Windows 8.1 , Microsoft affirms a significantly smaller footprint to win you back 8-15% storage space.The search results for a subject are organised in a visually driven page “hero” that calls upon basic facts and relevant links thus taking the ease of search to a greater height with Smart Search powered by Bing.
  • The better multi-tasking Snap allows you to resize the smaller window to virtually any size with just a finger swipe and enables opening multiple windows simultaneously in case of high-res monitors.Windows 8.1 refreshingly comes with two new sizes of live tiles : a smaller square enabling power users to cram a number of shortcuts into their screens and a bigger size worthy of apps with lots of “glanceable” info, like Bing Weather.
  • Windows 8.1 automatically updates apps in the background. Having the same background image on both the Desktop and Start Screen,it may have immense potential to make modern UI friendly.
  • Getting email notifications and taking Skype calls is made easier without having you unlock your device. Upgrading Windows8.1 gives you access to run the official Facebook app for Windows giving your PC an innate experience.The app does not appear when you call up the Share charm from another app,however the responce is smooth and the interface helps you explore parts of the service that you have overlooked.
  • Windows 8.1 users will have more control over how contents furnishes on second display , giving more flaccidity to tablets. Microsoft has made Onedrive the default space for saving new documents in Windows8.1, and improved things on the back end to ensure the system views them as local files from all perspectives.

LINUX / UNIX COMMANDS FREQUENTLY USED

These are some of the frequently Used Unix Commands which may be of help to you. have a look
Starting and Ending
login: `Logging in'
ssh: Connect to another machine
logout: `Logging out'
File Management
emacs: `Using the emacs text editor'
mkdir: `Creating a directory'
cd: `Changing your current working directory'
ls: `Finding out what files you have'
cp: `Making a copy of a file'
mv: `Changing the name of a file'
rm: `Getting rid of unwanted files'
chmod: `Controlling access to your files'
cmp: Comparing two files
wc: Word, line, and character count
compress: Compress a file
Communication
e-mail: `Sending and receiving electronic mail'
talk: Talk to another user
write: Write messages to another user
sftp: Secure file transfer protocol
 
Information
man: Manual pages
quota -v: Finding out your available disk space quota
ical: `Using the Ical personal organizer'
finger: Getting information about a user
passwd: Changing your password
who: Finding out who's logged on
Printing
lpr: `Printing'
lprm: Removing a print job
lpq: Checking the print queues
Job control
ps: `Finding your processes'
kill: `Killing a process'
nohup: Continuing a job after logout
nice: Changing the priority of a job
&: `What is a background process?'
Cntrl-z: Suspending a process
fg: `Resuming a suspended process'

Commonly Used Linux Commands for you.
  1. Linux comes in several versions. The following commands will help you determine which Linux distro is installed on your host, what’s the version of your Linux kernel, the CPU model, processor speed, etc.
$ cat /etc/issue $ cat /proc/version $ cat /proc/cpuinfo
  1. Find the total amount of RAM available on your Linux box and how much is free.
$ free -mto
  1. The command cd.. takes you up one directory level but cd – will move you to the previous working directory. Or use the command pwd to print the full path of the current directory that you can copy-paste later into the shell.
$ cd – $ pwd
  1. The command history will show a list of all the recently executed commands and each will have an associated number. Use !<number> to execute that command again. Or, if the history is too long, use grep to search a particular command.
$ !<command number> $ history | grep <some command name>
  1. You can remove any particular command from the shell history by number.
$ history –d <command number>
  1. If you made an error while typing a command name, just enter the correct command name and then use !* to reuse all the previous arguments.
$ <command> !*
  1. Re-run a command but after replacing the text abc in the command with xyz.
$ ^abc^xyz
  1. This will list the size of all sub-folders of a directory in KB, MB or GB.
$ du –sh */
  1. A better version of the ls command that displays file sizes in KB and MB.
$ ls –gho
  1. You can use man <command> to learn more about the syntax of a command but what if you don’t remember the name of the command itself? Use apropos then.
$ apropos <search phrase>
  1. Compare the content of two text files to see what has changed.
$ diff wp-config.php wp-config.php.old
  1. Find lines that are common in any two text files.
$ grep –Fx –f file-A.html file-B.html
  1. Compare the content of two directories recursively.
$ diff –urp /old-wp-directory /new-wp-directory
  1. Find all files under the current directory that are larger than 10 MB in size.
$ find . -size +10M -exec du -h {} ;
  1. Find all files on the system that have been modified in the last 2 days.
$ find . –type f –mtime -2
  1. Find all files on the system that were modified less than 10 minutes ago
$ find . –type f –mmin -10
  1. Find all PHP files that contain a particular word or phrase.
$ find . -name “*.php” -exec grep -i -H “matt mullenweg” {} ;
  1. When copying or moving files, Linux won’t show a warning if you are overwriting an existing file. Therefore always use the –i switch to prevent overwrites.
$ cp –i abc.txt xyz.txt
  1. Backup the content of the current folder into a tarball file using gzip compression.
$ tar zcfv backup.tar.gz /wp-directory/
  1. Find processes with the highest CPU usage. Then use kill –9 pid to kill a process.
$ ps aux | sort -nrk 3 | head
  1. Execute the following command in your Apache logs directory to determine hits coming from individual IP addresses.
$ cat access.log | awk ‘{print $1}’ | sort | uniq -c | sort –n | tail
  1. Monitor hits from Google bots to your website in real-time.
$ tail –f access.log | grep Googlebot
  1. To find all files and web pages on your site that return a 404 error, run the following command in the Apache logs directory.
$ awk ‘$9 == 404 {print $7}’ access.log | uniq -c | sort -rn | head
  1. Find the 100 most popular pages of your site using Apache server logs again.
$ cat access.log | awk ‘{print $7}’ |sort |uniq -c |sort -n |tail -n 100
  1. Quickly find and replace a string in or more files.
$ find . -type f -name “*.php” -exec sed -i ‘s/wordpress/WordPress/’ {} ;
PC FASTER IN SIMPLE WAYS
I am using the fastest processor along with abundant ram and a good motherboard and thus never face any issues with computer being slow. But I know many of you are frustrated with your computer which becomes terribly slow few days after fresh formatting. So your only procedure is to format it again and enjoy good speed for 1-2 weeks and then again it becomes slow. To get out of this ridiculous cycle there are other ways also which will help you keep your computer considerably fast to its limits (please do not expect that this tutorial can help you transform your i3 to i7
I am writing this post to help you how to make your computer faster and utilize its maximum potential. There are certain process which will speed up your computer which is described as follows.

Wisely choose the Operating System

Install the particular Operating System which you exactly require for your needs. e.g, if you use your computer for surfing internet, watching movies, playing songs, edit photos & videos then I think you must go with Linus distros like Linux Mint, Peppermint, Elementary OS. Ubuntu will be preferred by newbie, self-proclaimed linux gurus but considering an average / slow computer Ubuntu is a bad choice. If you are a diehard Windows fan and can’t live without it then go for Windows 8 and if that is not available and your are left with Windows 7 then install Windows 7 HOME PREMIUM if not Home basic. It contains all the necessary functions for your use. Remember Windows 7 Ultimate is not required for all the home user unless you are super protective and use Bitlocker which I personally find irritating.

Install necessary softwares

If you plan to go with linux then connect your computer to internet to install necessary software's which is available in Software center and update your computer . In the process it will also download the drivers for your computer though most of the drivers are already there and will be pre-installed. Best part if you use Linux is that you don’t have to pay for any anti-virus software or install any pirated version of anti virus as there is almost ZERO virus in Linux. Only thing you have to do is to update you computer regularly whenever updates roll out. And if you plan to go with Windows install the softwares which you use regularly and keep it minimal. If you think that you may require another software in the near future, install it then only when required.

Disable unnecessary start apps

In case of windows you have to make certain tweaks in order to make your computer faster. You have to start with startup process or softwares. These are the softwares which automatically start themselves after you turn on the computer and thus use resources which is limited in your case or precisely not abundant like me ðŸ˜› . So first thing is to stop them from initializing themselves automatically. You can do so by going to SYSTEM CONFIGURATION which can be accessed by typing MSCONFIG in RUN. Then click startup and there you will find a list of softwares. Right Click there over the software which you do not want immediately after startup and select disable.

Restrict remote access to registry

To restrict remote access to registry.
Type services.msc in RUN
Now look for the following entry in the list:
“Remote Registry”
Double-click on it and set its Startup type as “Disabled”
This will restrict any unknown / unauthorized connection into your computer.

Defragment your hard drives

Once in 1-2 months its a good practice to defragment the disks. It will considerably make your computer faster then earlier. To do so –Open Disk De-fragmenter by clicking the Start button, clicking All Programs, clicking Accessories, clicking System Tools, and then clicking Disk De-fragmenter.‌ First it will analyse and then de-fragmentation will take place.

Speed up Browsing

You may experience that your computer is faster but browsing is slow. Easiest method is if your are not using Google Chrome then start using it you will feel the difference and if you are already using Google Chrome and its slow then its time you clean up the cache files stuck in your browser. To do so press simultaneously CTRL SHIFT DEL. Select every option and chose “Begining of time” from the dropdown list and then click Clear Browsing Data.
After following all the process restart your computer once and be happy that its easy to make your computer faster.