Sunday, August 23, 2015

BQ Ubuntu Phones launching finally in India!

It is about time Ubuntu Phones are launched in India. The Spanish smartphone manufacturer BQ has finally launched them worldwide recently.

The 8 GB BQ Aquaris E4.5 Ubuntu Edition features a 5 MP front camera and a 8 MP rear camera which has auto-focus, dual flash and full HD 1080p for real sharp video recording. It boasts a MediaTek Quad Core Cortex A7 processor and a 1 GB RAM for a faster experience. It has a 2150 mAh battery.

The 16 GB BQ Aquaris E5 Ubuntu edition comes with a lot more impressive features such as a 5" IPS HD (720 x 1280 pixels) display. The device features a 5 MP front camera and 13 MP rear camera, equipped with HQ Largan lenses and BSI sensors. It also boasts a 2500 mAh battery.

They both have a micro-SD slot with which you can increase your storage space up-to 32 GB. The batteries are non removable which maybe a negative aspect for some.

While the E4.5 goes for nearly Rs. 11,999/-, the  E5 goes for nearly Rs. 13,999/-. They both are for sale only on snapdeal for now. It is recommended to go for the E5 which has a better camera, a bigger battery and a better screen.

If you have more money to buy a better Ubuntu phone wait for the Meize MX4 Ubuntu version to launch soon.

Windows Fastboot and Linux

Windows 8 hibernates in fast boot mode so you can boot faster. This will cause problems when you switch to other OS make changes to filesystems and then boot back to windows. Read about it here.

And as far as i tested it no issues! Still it is only read only access better than nothing. More details on the process below:


Source:

Unable to mount Windows (NTFS) filesystem due to hibernation

Workaround for all versions of Windows:
There are three ways to mount a hibernated Windows partition:

  1. Boot into Windows and power down the system by shutting it down completely. You may then boot back into Ubuntu and the partition will mount in read-write mode automatically when you open it in Nautilus.Note that the "Shut Down" option may not be the one displayed in your start menu by default. You may need to click the button next to it to see further options.
  2. Manually mount the filesystem in read only mode.
    • Check to see if you have a mount point (folder for mounting your partition in) for your Windows partition in the folder /media using this command:
      ls /media
    • If you don't see a folder for your Windows partition, you should create one with the following command:
      sudo mkdir /media/windows
    • Next, mount the partition in read-only mode onto this folder with this command:
      mount -t ntfs-3g -o ro /dev/sda3 /media/windows
      Note that you should change /media/windows if your mountpoint is called something else.
    • Now you will be able to view/open files on your Windows partition using any program in Ubuntu. However you will not be able to write to the partition or modify any files as it is in read only mode.
  3. If you need to mount the partition in read-write mode and are not able to or willing to boot into Windows and shut it down completely there is a third option. However, it is not included here because it completely deletes hiberfil.sys and will cause you to lose all unsaved information in the hibernated Windows programs. The following is a quotation from man ntfs-3g about the option that would be used to do this.
    remove_hiberfile               Unlike in case of  read-only  mount,  the  read-write  mount  is               denied  if  the  NTFS  volume is hibernated. One needs either to               resume Windows and shutdown it  properly,  or  use  this  option               which  will  remove  the  Windows hibernation file. Please note,               this means that the saved Windows  session  will  be  completely               lost. Use this option under your own responsibility.
Solution (only for Windows 8):
There is a new feature in Windows 8 called Fast Startup. If this feature is enabled (which it is by default), Windows 8 does not actually completely shutdown when you choose shutdown. Instead, it does a "hybrid shutdown". This is something like hibernating; it makes booting Windows 8 back up faster. So, you need to disable this feature to be able to shut it down properly, and be able to mount the Windows partitions. To do this, boot into your Windows 8 and:

Note: disabling Fast Startup will most likely make your Windows 8 take a longer time to boot. There are no "exact" numbers, but let's say that if it took you 10 seconds to boot into Windows 8, it will now take you 50 seconds after disabling this feature.
1. Open Control Panel in the small icons view and click on Power Options.
2. Click on Choose what the power buttons do.
3. Click on Change settings that are currently unavailable.
4. Uncheck Turn on fast startup (recommended).
Click on the numbers above to see screenshots.
Click on Save changes. Now, shutdown Windows 8 and boot back into Ubuntu.
If you still aren't able to mount without getting errors, you may need to turn off hibernation completely. Open an elevated Command Prompt (right click on the shortcut, click on “Run as Administrator”), and input:
powercfg /h off
Source: Fast Startup - Turn On or Off in Windows 8.

Ubuntu Linux Versions

All even year .04 are LTS versions in Ubuntu. They get Five years of support from Ubuntu community and Canonical Inc.. 

LTS versions - Every even year April - 5 years of support from then.

Non - LTS versions - Every 6 months on April/October except the LTS cycle - 9 months of support from then.

If you want a more stabler smooth system LTS versions are recommended. For gaming purposes too this applies. But you would be better of with newer releases on this one. Mesa and Kernel updates mostly improve with latest versions.

For Testing out the current live test build you can go here:

http://cdimage.ubuntu.com/daily-live/current/ (updated daily)

Currently, for Nvidia gamers on Ubuntu they can use this ppa to get their driver updates easily,


To add the PPA run the following in a new Terminal window:
sudo add-apt-repository ppa:graphics-drivers/ppa && sudo apt-get update
To undo this addition of ppa you can use the ppa-purge command. Not always does a driver update in Linux or any other OS for that matter goes smooth so research online forums before doing your graphic driver update!


Friday, February 20, 2015

Delete files older than certain period of time in UNIX

It is often required to delete old unnecessary archived files when administrating a UNIX system. So to make this work easier I have written the following command:

find /directory/path  -type f -mtime +1  -print | xargs -I {} rm {}

By executing this command, all files in the specified folder that are older than a day i.e. 24 hours will be deleted

If you want to specify the time in minutes do this

find /directory/path  -type f -mmin +360  -print | xargs -I {} rm {}

Specify your time instead of 360.

You could also write a shell script and schedule it in crontab to run it any time you want to.

CAUTION: slightest error could cause the loss of invaluable data. So do it at your own risk.

Monday, February 16, 2015

File systems usage in UNIX

It is hard to parse the output of the df unix command with the human eye. So I have written a simple solution for it. The following command will fetch you the list of filesystem whose usage is greater than eighty percent in descending order.
df -g | awk '{print $4 "\t" $7}' | sort -nrk 1 | egrep "([89][0-9]|100)%"
Output will be like this:
85% /filesystem1
82% /filesystem2
82% /filesystem3
81% /filesystem4

You can remove the final egrep to view all the file systems. Like this:
df -g | awk '{print $4 "\t" $7}' | sort -nrk 1
Feel free to comment below!

Unlocking user account in AIX

When you have a locked user account but still have root access and the old password you can unlock it by entering the following two commands:
chsec -f /etc/security/lastlog -a "unsuccessful_login_count=0" -s username 
chuser "account_locked=false" username
The first command sets the unsuccessful login count back to zero and the second command unlocks the account. The user can use his account without resetting his/her account.
Obviously the second command by itself wouldn't unlock the account so you would have to enter both the commands.

If you do not have the old password then do this in root:
echo username:password | chpasswd -e
If you feel insecure about giving your password like this then you can give your password in encrypted for :
perl -e'print crypt("password","salt")'; echo -e
echo username:cryptedPass | chpasswd -e
Please feel free to share your comments below

Friday, February 13, 2015

Guide to root your Moto G! Step 3 of 3

This is a important step. You have rooted your device and you have full access to your Moto G! So does your apps. Grant permission to only those apps that you feel right about or atleast Google them before granting full access. Granting root access to malicious apps puts you in danger so think twice before doing it.

Now That we have rooted your Moto G. We can do whatever we decide to do. However, There are three options..

Option 1: Install Xposed Framework

Xposed is a really awesome framework but it is only for stock roms. We can get access to most options and stuff you get by installing a rom. This is for those who feel stock rom is enough!

A few apps come to mind. You can install Greenify, LMT Launcher.

Option 2: Install a ROM

You can really enter into the world of Android and swim in its awesomeness by venturing into the the ROM arena. You have lots of options lots of customizing optiona and a ton of ROMs!
You can start by looking this XDA thread:
XDA Moto G ROMs and Kernels Index

You could also install a custom Kernel if you know what your doing.

I have tested a lot of ROMs. Only few have made a significant impact:
Xperience ROM
Cyanogenmod 11

Xperience rom with Lollipop 5.02 is currently my daily driver right now. If you find a better one say it in the comment below!

Option 3:Unroot

Rooting isn't for everyone. and might feel happier if their device is unrooted and locked.
Unrooting and locking the bootloader is also fun. Expect a Guide to unroot your Moto G in the Future!

I am open to your reviews and your experience doing this Guide. Please share your comments below!!