Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Thursday, February 25, 2016

The Day Microsoft Windows Displays Advertisement on Your Laptop

Today I learned that Microsoft displays advertisement on its Windows 10 Lock Screen. This is a very bold move from Redmond considering advertisements are typically displayed on free products instead of paid-for products. I'm not sure how I would react if I was greeted with an ads for a product I fully paid since I have not updated my Windows 7 to Windows 10.

Our household keeps a Windows 7 installation mostly for transferring pictures and videos via Picasa, a soon-to-be-retired product from Google which me and my wife love to use, from various devices to multiple (backup) storage devices.

On the bright side, some of these events force us to completely move away from Windows Operating Systems to another platform that I have, personally and professionally, been using for the last 3 years: Ubuntu Linux.

Ubuntu Linux is an excellent Operating Systems for both Server and Desktop systems. It is powerful, extensible, pragmatic, and here's the best part: it's FREE. Free as in Beer. Free as in $0.00.

I've been following the growth of Ubuntu for a few years and I began to notice that its ecosystems have expanded beyond the typical Linux ecosystems to the point that commercial hi-tech companies, such as Spotify, HipChat, Steam, ship and support Linux native desktop app for their products. These products tend to support Ubuntu Linux exclusively by either providing debian package or prepared their own apt-get repository (which makes life of their users easier because the software will be listed in the Ubuntu Linux Software Center and will be included as part of autoupdate).

In our household, the number of installed Ubuntu systems have steadily increased by 1 every year. Back in 2013, I installed a Ubuntu Server 12.04 on a very old hardware dedicated for our Media Server. Maintenance was close to zero: all updates for both Plex (the media server software) and Ubuntu itself have always been smooth without any issues. In 2014, I made another move to dual-boot my one and only workstation (that has Windows 7 installed in it) and I have been using Ubuntu majority of the time ever since.

At the end of 2015, I decided to resurrect an old Macbook White (also known as Macbook 5,2) by installing Ubuntu 14.04 thanks to Apple for making it harder for us to install its latest Operating Systems past Snow Lion, not to mention that it was as slow as turtle after the upgrade. As Apple is moving toward AppStore model, this does not fit well with me since most of the developer tools and FOSS apps I relied won't be there.

Apple also has the habit of deprecating older hardware (no longer support) rather quick by my standard: we acquired the MacBook in 2009 (for free) and by 2013/2014, we were having a bit of a difficulty to upgrade the base OSX. Meanwhile, my old workstation has been with me since 2007.

Current Setup
The old complain that installing (any) Linux distribution will cost you a day or two since you will be fixing the gap to make Linux useful when compared with OSX/Windows is no longer true. I successfully installed the latest Ubuntu Linux in to Macbook without any problem at all. Everything just works. All hardware components continue to work as-is. Yes, that's right, a Macbook: unusual since it's tricky to be able to install a non-Apple Operating System to an Apple hardware and not long ago the only way to install Windows in to a Macbook is via "bootcamp". These days you just need to pop-in a Ubuntu installation CD and you're ready to install that awesome software :).

My network wireless printer works. I can watch Netflix. The OS can identify my Lumix camera when I attached it to the laptop. I can Skype with my parents fine. My wife does not complain and quite happy to use it. It does not need an anti-virus or firewall setups as the default configuration is good enough for a long period of time.

As a software developer in the era of SaaS/Cloud, I realized that I am more productive when I'm working on the same environment where my work will be deployed. This is probably the key as to why I chose Ubuntu Linux (could have been my past-time favourite: FreeBSD but alas!). And as I use and learn Ubuntu every day, I'm gaining valuable skill, which in turns, will hopefully increase my usefulness and my compensation as a knowledge worker :).

I've listed why I believe Ubuntu Linux is the right choice for me. If you're thinking to make a move away from Windows (or OSX), I would strongly recommend to give it a try since it's easy to install and you've got nothing to lose other than your leisure time.

Sunday, July 29, 2012

Ubuntu, PostgreSQL, pgAdmin

I've been interested to play with PostgreSQL for a while and it looks like now is the right time to have fun and go mad at it since my new work requires it.

My machine/initial setups is as follows:
  1. Ubuntu Server 12.04 64bit running on VirtualBox (love free stuff!)
  2. PostgreSQL 9.1 as part of Ubuntu Server installation
  3. pgAdmin installed in OSX
I've encountered a few hiccups when trying to connect the pgAdmin to the PostgreSQL server and here are the steps to avoid that in the future.

0. Configuration Files

The locations for the main configuration files specifically for Ubuntu Server is at:
/etc/postgresql/<version>/main 
For example, because at the time of this writing I installed the PostgreSQL 91, the configuration files are located at:
/etc/postgresql/9.1/main
The content of the configuration directory should contain the following files:
enathaniel@ubuntu:/etc/postgresql/9.1/main$ ls -la
total 52
drwxr-xr-x 2 postgres postgres  4096 Jul 29 00:34 .
drwxr-xr-x 3 postgres postgres  4096 Jul 28 23:50 ..
-rw-r--r-- 1 postgres postgres   316 Jul 28 23:50 environment
-rw-r--r-- 1 postgres postgres   143 Jul 28 23:50 pg_ctl.conf
-rw-r----- 1 postgres postgres  4693 Jul 29 00:28 pg_hba.conf
-rw-r----- 1 postgres postgres  1636 Jul 28 23:50 pg_ident.conf
-rw-r--r-- 1 postgres postgres 19250 Jul 29 00:24 postgresql.conf
-rw-r--r-- 1 postgres postgres   378 Jul 28 23:50 start.conf

1. Modify the PostgreSQL configuration file: postgresql.conf

Find the listen_address entry, uncomment if necessary, and modify its value to asterisk (*), which means to bind the PostgreSQL server service (daemon) to any IP Addresses of the server machine:
 listen_address = '*'
The default PostgreSQL installation does not bind itself to any particular IP Address of the server. One can also bind the PostgreSQL server service (daemon) to a specific set of IP Addresses if the server has more than one by using comma between values:
 listen_address = 'localhost, 192.168.0.114' # my server address is 192.168.0.114

2. Modify the PostgreSQL Client Authentication Configuration file: pg_hba.conf

Insert a line to pg_hba.conf file to grant client access to the database.
host    all             all             192.168.0.0/24          md5
In short, the above lines will do the following: grant client, via network connection TCP/IP with or without SSL (host), access to all (first) database for all (second) users from the IP addresses of 192.168.0.0 to 192.168.0.255 and use md5 password encryption.

3. Change password of the postgres user

Access PostgreSQL via command-line "psql" and update the password
enathaniel@ubuntu:/etc/postgresql/9.1/main$ sudo -u postgres psql postgres
psql (9.1.3)
Type "help" for help.

postgres=# \password postgres
Enter new password: 
Enter it again: 
postgres=# \q
The psql command must be run as postgres user (hence the sudo -u postgres) because that is the only user that has an account in the default installation of PostgreSQL.

4. Install adminpack extension

pgAdmin typically would give warning when it detects that the PostgreSQL instance does not have adminpack installed. To install the adminpack extension, the following psql command would do the trick
enathaniel@ubuntu:/etc/postgresql/9.1/main$ sudo -u postgres psql
psql (9.1.3)
Type "help" for help.

postgres=# create extension adminpack
postgres-# \q

5. Connect to PostgreSQL instance from pgAdmin
The following screenshot should give some idea how to connect to the PostgreSQL instance.


Voila, we're done!

PS: Yes, there's no food, fruits, or traveling story in this post.