Ubuntu on Asus R558U

I had to mess around for some time to figure out how to get Ubuntu 16.04 to work well, in Asus R558U. Had to mess with some GRUB parameters, and display config file, to get it on track. Below, I am sharing the details of the steps that I followed:

  • After, installation, from the first boot-up onwards there were some errors regarding some PCI issue, which happened all the way through booting and in the Virtual terminals as well, this was fixed by adding the GRUB parameter:

pci=nomsi

This can be added in the /etc/default/grub file, at the end of GRUB_CMDLINE_LINUX_DEFAULT line, which usually looks like:

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”

So, after this change it’ll look like:

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash pci=nomsi”

Then we have to run the command:

sudo update-grub

so as to reflect the changes in GRUB settings.

  • The next issue was that the Brightness Fn combinations were not working, experimented with some of the suggested options from various online resources, this is what worked for me:
  • At the end of the GRUB_CMDLINE_LINUX_DEFAULT line, in /etc/default/grub file, add the following acpi_osi=”, so that the line now looks like:

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash pci=nomsi acpi_osi=””

Note: In the above line, for acpi_osi=” it is two single quotes, and the quote after that is the closing double-quote. Again update GRUB to reflect the new changes:

sudo update-grub

  • Now we have to create the file 20-intel.conf in the directory /usr/share/X11/xorg.conf.d/ with the following content:

Section "Device"
Identifier "card0"
Driver "intel"
Option "Backlight" "intel_backlight"
BusID "PCI:0:2:0"
EndSection

  • Now restart the system, and the Brightness controls should be working at Fn+F5 and Fn+F6, as expected.

Courtesy:

 

Logitech MK345 Wireless Keyboard and mouse combo review.

The MK345 is a well designed wireless keyboard and mouse combo. The first thing that catches our attention is the beautiful design, though not anything over the top, its pretty good. The keyboard is not one of those clumsy, congested wireless keyboards which tries to mimic the key placement of laptops, which ends up being even more unusable than the laptop keyboard. The keyboard and mouse has a pretty, tiny USB receiver, which is one of those unobtrusive, fit it and forget kind. It goes without saying that this receiver stands a good chance of getting lost, if kept somewhere carelessly.

The keys of the keyboard are fairly well spaced, and there is as well positioned sloping arm pad extension, resulting in an amazing ease of typing. I could even type comfortably, placing the keyboard on my lap. The keyboard also has an small green indicator for Capslock, located just adjacent to the On/Off key.

The mouse is contoured with a ridge to place in the thumb finger, which feels really good. And the mouse wheel is slightly wider and rolls well, adding to the ease of use. This optical mouse uses an invisible light(not visible to us), rather than the regularly seen red light.

So, in summary the ergonomics of this combo is pretty good. It worked very well with my LG Smart TV. Both the keyboard and the mouse has separate On/Off buttons. The keyboard is powered by 2 AAA batteries, whereas the mouse is powered by an AA battery. All the batteries were positioned in their proper positions, within the packing itself, and a plastic splinter was put in it to prevent it from discharging, we simply have to pull out the splinters gently and remove it to get the batteries and thereby the Keyboard and mouse working. The build quality also seems to be pretty decent, and feels to be capable of withstanding quite many key-cycles.

The only con that I felt that some people might feel is that the keyboard is not fully soft-touch, and has a distinct chub-chub sound when you type. It may have to do with my slightly forceful typing style. But nevertheless, am happy with the keys and its touch sensitivity and its typing sound as well, it perfectly suits my typing style. And another rather weird key that I found is the ‘Fn’ key combination with the F12 button, which seems to be triggering the Printscreen functionality when there is a distinct and separate Printscreen button located just adjacent to the F12 key.

Kudos to the Logitech team for their attention to the detail. I bought this from Snapdeal, they had done an excellent deal with packing this, putting the box, sandwiched between two thermocol pieces, which was then wrapped in a thick packing of bubble wrapping. Brownie points to Snapdeal for making the delivery available at my home location, albeit with a minor adjustment in the pincode, which I did after discussing with their customer care personnel, who did a pretty good job handling my questions. There was a slight delay in the initial estimated delivery, but well that had to be expected at this location. Anyhow Fedex delivered it at my home, so all in all this was a pretty satisfactory online purchase to say the least.

This is my first try at reviewing a product that I bought online, as and when I started using it. Actually this is one of the first things I am typing with this new keyboard and mouse combo that was delivered to me today. I started typing this, as a way of testing the keyboard and mouse extensively, but as I typed, it seemed to shape pretty decently, that I decided to share it online. Do let me know your thoughts on it.

Comparison of PostgreSQL and MySQL

The following are the points that I could gather about PostgreSQL vs MySQL(It has been collected from multiple sources, and based on personal experience, please point out any errors or incompleteness that might have inadvertently crept in):

  • WITH queries, also know as Common table expression(CTE) is not available in MySQL, is available in PostgreSQL.
    (It has been requested from 2006 onwards: http://bugs.mysql.com/bug.php?id=16244)
    More Details: http://stackoverflow.com/a/325243
  • PostgreSQL offers more enterprise DB features, provides PL/SQL support.
  • PostgreSQL offers a more detailed and low-level query EXPLAIN result, along with the execution plan, if required. In comparison MySQL EXPLAIN/DESCRIBE results are more limited.
  • PostgreSQL has only one DB engine, whereas MySQL has many like INNODB, MyISAM, etc..
  • MySQL is natively supported in cPanel(widely used server admin panel), for PostgreSQL it has to be installed manually, and support is partial,
    so its easy to find a hosting provider with MySQL support, when compared to PostgreSQL.
  • PostgreSQL follows proper SQL standards compliance, but MySQL doesn’t, so integration with other RDBMSs might cause problems.
  • PostgreSQL supports multiple schemas per database, in MySQL, a datbase and schema can be considered the same, for all intents and purposes.
  • PostgreSQL supports INTERSECT, EXCEPT ( set operations), MySQL does not.
    https://en.wikipedia.org/wiki/Set_operations
  • PostgrSQL supports merge joins( also calles Sort merge joins), MySQL does not
    http://use-the-index-luke.com/sql/join/sort-merge-join
  • PostgreSQL supports more types of index, like Inverted index, GiST(used in postGIS), bitmap index, reverse index, partial index.

 

For more details, check out:

MongoDB installation in Ubuntu 14.04

We’ll be seeing how to install MongoDB and get it working with PHP.

If you had followed the step of installing mongo PECL extension you can undo it by doing the following, as this will be provided by the php5-mongo package, including the required changes in the php configuration, which we’ll be installing shortly afterwards.

  • Removing any entry in the php.ini file that you made for mongo extension.
  • Remove the PECL extension by:
sudo pecl uninstall mongo

Now do the following steps to complete the installation:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
sudo apt-get update

sudo apt-get install -y mongodb-org
sudo apt-get install php5-mongo

After this restart your computer, only after that the MongoClient class will be available for use.

References

How to get an undetected android phone mounted in Ubuntu 14.04

Usually for the older Android phones, Ubuntu 14.04 detects the devices out-of-the-box in most cases, but for some recent devices that is not the case. If you’re one of those guys like me, who had tried to connect your Android phone to Ubuntu 14.04, and didn’t see any reaction in the Ubuntu File Manager(Nautilus), worry no more, there is a solution to this.

First find the device as detected by Linux’s USB system, by using the following command:

$ lsusb

See the sample output below:


saji@geeklap:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 0bda:0139 Realtek Semiconductor Corp. 
Bus 001 Device 004: ID 0489:e00d Foxconn / Hon Hai 
Bus 002 Device 003: ID 04f2:b272 Chicony Electronics Co., Ltd Lenovo EasyCamera
Bus 002 Device 011: ID 05c6:9039 Qualcomm, Inc. 

The line that is of interest to us is the bottom-most one(in this case), which is the Android phone:

Bus 002 Device 011: ID 05c6:9039 Qualcomm, Inc.

In the sample, the device is a Yu Yureka (AO5510). Usually you can make out the device entry from the listed name. In the output the most relevant part is: 05c6:9039

Of that, 05c6 is the Vendor id and 9039 is the Product id.

We now have to create the file: /lib/udev/rules.d/69-mtp.rules with the following content:


# Yu Yureka
ATTR{idVendor}=="05c6", ATTR{idProduct}=="9039", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"

The line starting with the hash(#) is a comment, so you can out any descriptive, understandable line there. Depending on your device, the Vendor id and the Product id will differ, just use the relevant values to create this file. Now disconnect and reconnect your device.

Presto! The device should now be shown in the File manager.

The android device has now been detected in the file manager.

Android phone detected in file manager

Note: If it still does not work for you, try enabling the USB debug option, in the Developer Tools Menu of your android phone. I have already enabled it to get my phone detected properly.

Courtesy: http://ubuntuforums.org/showthread.php?t=2226702

A train journey of self reflection

Met with a guy in the train today. He is just out from his college, now doing an internship in PHP, at IPSR, hoping that it’ll help him nail his first job, as companies out there was asking him for ‘experience'(The classical chicken/egg problem). He reminded me a lot about myself, more than three years ago.
Just out of the college  I was also looking onto get a straw to hold on(get my first job). It was during that time that the three of us Reshil, Mohazin and I, joined Keltron Bigleap Finishing School(KBFS) for the LAMP internship program  they were conducting. We were also told that the 6 months of internship there, will be counted on as experience, and help us get the first job.
The internship at KBFS taught me, and the others a lot of industrially useful things about LAMP, and helped us get our first jobs, mainly owing to George sir, who was our instructor there, and had a lot of years of experience working in the industry(He was a knowledge bank, I used to pester him with doubts, and he used to answer all those with utmost patience). But, no company considered our time(6 months) as experience. We got our first jobs because we were able to make our respective employers understand that we have learnt and knew how to use a thing or two.
Down the line, more than three years later, now in my second job, I have learnt a lot about LAMP and more. What guided then, and keeps guiding me now, is my all-time friends: curiosity and the want to learn more. I explained the usefulness of both these, to that guy. In our brief conversation, I explained to him how PHP actually executes, why PHP is not exactly an interpreted language, the importance of coding standards(indentation, naming, etc. ) in programming languages, PHP’s standard(PSR)(I feel like I’ll want to put up an article about each of these individually, let’s see where it goes). It always feels good to share what I know with others, especially when the person(s) on the other side is actually interested. I also suggested him go looking deeper, and deeper to understand how things work, it’ll help us appreciate and understand those things better, and make us better equipped to handle those.
He also made me understand how things that I talk about so easily these days, were totally alien to me, when I was at the same stage. I believe that I have been able to spur an interest in him to look deeper, and understand PHP better.(This makes me feel so happy)
So, to programmers out there(at all stages) I would like to say, keep that fire to learn, understand things, that curious person in you, burning brightly. It’ll give you that satisfaction, and help you move ahead. Also, make it a habit to share what you know with anyone who is interested, it’ll only make yourself a more intelligent/knowledgeable person.
I know that I have reached nowhere in my career, but still I see nothing wrong in sharing things that I feel important and true. 😀

N.B:
1. I haven’t attended the internship program of IPSR, so I don’t know if they’re providing actual projects to ‘interns’, and so, if it’ll actually be considered as experience.
2. This is my first blog post in a long time, and the first one typed from my mobile phone. It was prepared quickly, and is basically a rundown of my thought-train at the moment. So, bear with any mistakes that I might have inadvertently made.

Zend Framework 2.0.0 has arrived

Zend Framework 2.0.0 Stable has arrived, five years after the release of version 1.0 in June 2007.

Major new features:

Courtesy: http://www.h-online.com/open/news/item/Zend-2-0-0-Stable-adds-modules-and-events-1702028.html
Official Post: http://framework.zend.com/blog/zend-framework-2-0-0-stable-released.html

How to add an entry for Zend Studio in your Ubuntu programs list

I had been trying to add a shortcut/entry for Zend studio in my Ubuntu 11.10.  Finally I could find a way to make Zend studio entry come up in the Unity Application search or Filter. Actually its a rather straight forward procedure. Create a file zendstudio.desktop in the /usr/share/applications/ as root, add the following contents to it, using your editor of choice(I used vi editor).

[Desktop Entry]
Version=9.0
Name=Zend Studio
GenericName=PHP IDE
Type=Application
Comment=Zend's PHP IDE
Exec=/opt/ZendStudio/ZendStudio
Icon=/opt/ZendStudio/icon.xpm
StartupNotify=false
Terminal=false
Type=Application
Categories=Programming;


Courtesy:

Create icon in Unity – Ubuntu 11.04 Natty Narwhal


(You could check out the above link to find way to add antry for any custom software using the same method).

N.B: Its my first blog post after nearly one year. Hope that I can follow it with more such useful posts.
The above method was tested by me in Unity based Ubuntu. But it should work fine in any GNOME based OS.

How to type New Indian Rupee Symbol(the right way)

Pre-Requisite

To display the Indian rupee symbol , you must have a font—such as the Ubuntu Font Family—with support for the character.

Windows users may use the new Rupkara font which has the Unicode postion mapping for the symbol. For  downloading the font, please visit-http://blog.foradian.com/rupakara-first-font-with-indian-rupee-symbol

How-To

For K/Ubuntu 10.10 users, this is automatic.The sign can inserted in your own documents using copy-and-paste from another location, or using the Unicode-entry method, which is the correct way of doing it, and it is as follows-

  • Ubuntu 10.10:<Ctrl-Shift-u>20b9<enter>
  • MS Windows: <Press-and-hold Alt>20b9<Release Alt>
  • Kubuntu 10.10: Copy-and-paste ‘₹’
  • HTML: insert “&#x20b9;”

History:

The codepoint at U+20B9 was assigned by the Unicode consortium on 11 August 2010 (2010-08-11).

A fact-

Ubuntu 10.10 is the first operating system to ship with out-of-the-box support for displaying the Indian Rupee Sign, and this happened on 10 October 2010 (2010-10-10).

Courtesy:http://font.ubuntu.com/rupee/

How to clear the MySQL Server Command-Line

Have you ever felt that your MySQL command-line prompt is getting too untidy and you want to clear it.
Here is how you do it-
To clear the terminal when using MySQL, from within the MySQL server prompt.

mysql>\! clear

Note: \! operator is to run any terminal command from within the mysql server prompt.
e.g. mysql>\! ls
Executes ls command and shows it output, i.e, the contents of the current working directory.