Zhixian's Tech Blog

2014-11-26

How to add WordPress to BloGTK

Filed under: computing — Tags: , , , , , — Zhixian @ 22:00:11 pm

This blog post describes how you would configure BloGTK to add your WordPress blog.

After you start BloGTK, click on the Settings button on the top toolbar.
As Edit Settings popup dialog will appear.

BloGTK 2.0_038

In the Edit Settings dialog popup,

  1. Enter an account name
  2. Enter the url of your WordPress blog
  3. Click on the Autodetect Settings button.

BloGTK - Edit Settings_039

After the dialog finished detecting settings, you should see that the Endpoint and Blogging Tool should be updated.

Enter the username and password to your WordPress blog into the Username and Password textboxes respectively.
Then click on the Accept Changes button to close the dialog.

BloGTK - Edit Settings_040

BloGTK - Edit Settings_041

At the BloGTK main screen, click on the Refresh button to fetch your latest blog posts.

BloGTK 2.0_042

How to install BloGTK on Ubuntu 14.04, Trusty Tahr

BloGTK (http://blogtk.jayreding.com/) is an offline blogging client on Ubuntu that is written in the programming language, Python.
However it only exists in source code form.

What this effectively means is

  1. You have to download the source code
  2. Install the dependencies needed to run BloGTK and
  3. Finally, run BloGTK

This blog post describes how to get and install the dependencies required by BloGTK and how to install BloGTK onto Ubuntu.

Assumptions

This blog post holds the following assumptions:

  1. You know how download files from the Internet.
  2. You know how to extract files from archives into folders.
  3. You know how to use a file manager to navigate to locations in the file system.
  4. You know how to enter commands into a terminal session.

Dependencies

The readme file in BloGTK’s source files indicate the following dependencies:

  1. PyGTK
  2. python-gnome2
  3. python-gnome2-extras
  4. python-gdata
  5. python-webkit
  6. python-feedparser

PyGTK

You should already have this installed.
To check, go to Ubuntu Software Center and search for python-gtk2.
I will be using this version (2.24.0-3).

Ubuntu Software Center_018

Python-Gnome2 (Python bindings for the GNOME desktop environment)

A version of this library is available in Ubuntu Software Center (search term: python-gnome2).
I will be using this version (2.28.1).

Ubuntu Software Center_019

Python-Gnome2-Extras

This library cannot be found in Ubuntu Software Center.
Apparently, the sub-components of the library are segregated out into their respective libraries.
I ignored this library requirement and compensate it with its segregated libraries (see section Compensation for Python-Gnome2-Extras below).

Python-Gdata (Google Data Python client library)

A version of this library is available in Ubuntu Software Center (search term: python-gdata).
I will be using this version (2.0.18).

Ubuntu Software Center_020

Python-Webkit (WebKit/Gtk Python bindings)

A version of this library is available in Ubuntu Software Center (search term: python-webkit).
I will be using this version (1.1.8-3).

Ubuntu Software Center_021

Python-Feedparser (Universal Feed Parser for Python)

A version of this library is available in Ubuntu Software Center (search term: python-feedparser).
I will be using this version (5.1.3-2).

Ubuntu Software Center_022

Compensation for Python-Gnome2-Extras

As mentioned, this library does not exists in Ubuntu Software Center.
However, BloGTK will not run properly since it depends on some components in this library.

By trial-&-error, I found the sub-components that BloGTK requires are really as follows:

  1. python-gtksourceview2
  2. python-gtkspell

Python-GtkSourceView2 (Python bindings for the GtkSourceView widget)

A version of this library is available in Ubuntu Software Center (search term: python-gtksourceview2).
I will be using this version (2.10.1-2).

Ubuntu Software Center_024

Python-GtkSpell (Python bindings for the GtkSpell library)

A version of this library is available in Ubuntu Software Center (search term: python-gtkspell).
I will be using this version (2.25.3-13).

Ubuntu Software Center_025

 

Installing BloGTK

To install BloGTK, start a terminal session and navigate to the folder where you extracted BloGTK’s source files.

zhixian@SARA: ~-Downloads-blogtk-2.0_032

 

Type the following at the command prompt to install BloGTK:

sudo make install

zhixian@SARA: ~-Downloads-blogtk-2.0_033

Assuming everything went well, you should be able to see BloGTK menu item from the Applications menu if you are using Mate.

Workspace 1_037

 

Click on the BlogGTK 2.0 menu item, to run BloGTK.
After clicking it, you should see BloGTK start page.

BloGTK 2.0_031

Running BloGTK without installing

If you are not inclined to install BloGTK into your desktop environment, you can still run it.
After you have finished installing the dependencies, navigate to the folder where you extracted BloGTK’s source code.

Downloads_026

In this folder, there should be a bin folder.

blogtk-2.0_027

Inside the bin folder, there should be one Python script file, blogtk2.

bin_028

Double-click this file.
You may get a dialog like the below, click on the Run button.

bin_030

At this point, you should see BloGTK running.

BloGTK 2.0_031

2014-11-23

Useful applications to install to Ubuntu

Filed under: computing — Tags: — Zhixian @ 22:58:11 pm

The following is a list of software that I think maybe useful for developers.

Note taking

Tomboy Note (Ubuntu Software Center search term: tomboy)

Browsers

  1. Chromium Web Browser (Ubuntu Software Center search term: chromium)
  2. Opera (http://www.opera.com/computer/linux)
  3. Maxthon (http://www.maxthon.com/)

Cloud Storage

Yandex.Disk (Ubuntu Software Center search term: yandex)

Mindmapping

Freemind (Ubuntu Software Center search term: freemind)

Image Editing

GIMP (Ubuntu Software Center search term: gimp)

2014-11-21

How to install MongoDB 2.4 on Ubuntu

This blog post documents how to install MongoDB 2.4 onto Ubuntu 14.04, Trusty Tahr.

Summary

1. Add MongoDB public key to apt-get

sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv 7F0CEB10

2. Create MongoDB source list.

echo ‘deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen’ | sudo tee /etc/apt/sources.list.d/mongodb.list

3. Update apt-get

sudo apt-get update

4, Install MongoDB 2.4.12

apt-get install mongodb-10gen=2.4.12

Screen Dumps

1. Add MongoDB public key to apt-get.

zhixian@SARA: ~_001

2. Create MongoDB source list.

zhixian@SARA: ~_002

3. Update apt-get

zhixian@SARA: ~_003zhixian@SARA: ~_004

4, Install MongoDB 2.4.12

zhixian@SARA: ~_005zhixian@SARA: ~_006

That’s it. After that you can run MongoDB client and try out MongoDB.

mongo

zhixian@SARA: ~_007

Reference

http://docs.mongodb.org/v2.4/tutorial/install-mongodb-on-ubuntu/

How to configure ServerName directive globally for Apache HTTP Server

After installing Apache HTTP Server, you may notice that that when you restart the service, you may get the following annoying message:

Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message

zhixian@SARA: ~_017

To get rid of this message, you need to define a ServerName for your Apache HTTP Server.
To achieve this, you need to:

  1. Define a “fqdn.conf” file in Apache HTTP Server’s available configuration folder.
  2. Enable the “fqdn.conf” configuration
  3. Restart Apache HTTP Server

Implementation Details

1. Define “fqdn.conf”

Apache HTTP Server’s available configuration folder can be found at:

/etc/apache2/conf-available/

To create the “fqdn.conf” file, enter the following command into a terminal session:

echo “ServerName localhost” | sudo tee /etc/apache2/conf-available/fqdn.conf

zhixian@SARA: ~_018

What this command does is to write the string “ServerName localhost” into a file “fqdn.conf” at “/etc/apache2/conf-available/”.

2. Enable configuration

To enable the “fqdn.conf” that we just added to Apache HTTP Server, enter the following command in a terminal session:

sudo a2enconf fqdn.conf

zhixian@SARA: ~_019

3. Restart Apache HTTP Server

To restart the Apache HTTP service, enter the following command in a terminal session:

sudo service apache2 reload

zhixian@SARA: ~_020

After you restart the service, you should no longer see set “ServerName directive globally” message.

Reference:

http://askubuntu.com/questions/256013/could-not-reliably-determine-the-servers-fully-qualified-domain-name

2014-11-20

How to install Apache HTTP Server onto Ubuntu (Trusty Tahr)

Filed under: computing — Tags: , , , , , , — Zhixian @ 23:18:11 pm

To install Apache HTTP server on to Trusty Tahr, simply enter the following command in a terminal session:

sudo apt-get install apache2

zhixian@SARA: ~_013zhixian@SARA: ~_015

After installation is complete, you can access your web server by starting a new browser session and entering “localhost” for url. You should get a screen like the below:

Apache2 Ubuntu Default Page: It works - Mozilla Firefox_016

2014-11-19

How to install Mate 1.8.1 onto Ubuntu (Trusty Tahr)

Filed under: computing — Tags: , , , , , , , — Zhixian @ 20:50:11 pm

This blog post is about my installation of Mate 1.8.1 onto Trusty Tahr.

Summary

Adding needed repositories

sudo apt-add-repository ppa:ubuntu-mate-dev/ppa

sudo apt-add-repository ppa:ubuntu-mate-dev/trusty-mate

Update apt-get

sudo apt-get update

sudo apt-get upgrade

Install

sudo apt-get install ubuntu-mate-core ubuntu-mate-desktop

Screen dumps

Installation involves entering the following commands in a terminal session:

1. Adding needed repositories

At the command-line:

  1. sudo apt-add-repository ppa:ubuntu-mate-dev/ppa

    zhixian@SARA: ~_001

  2. sudo apt-add-repository ppa:ubuntu-mate-dev/trusty-mate

    zhixian@SARA: ~_002

    zhixian@SARA: ~_004

2. Update apt-get

This is done by running the following commands:

  1. sudo apt-get update

    zhixian@SARA: ~_005

    zhixian@SARA: ~_006

  2. sudo apt-get upgrade

    zhixian@SARA: ~_007

    zhixian@SARA: ~_008

3. Install packages

This is done by running the following commands.
This step will take some time as it will need to download around 125MB worth of content to install.

  1. sudo apt-get install ubuntu-mate-core ubuntu-mate-desktop

    zhixian@SARA: ~_009

    zhixian@SARA: ~_010

2014-11-18

Trusty Tahr

Filed under: computing — Tags: , , , , — Zhixian @ 22:16:11 pm

I just installed Ubuntu 14.04, Trusty Tahr onto my laptop.

The following is a list of must install software for me:

  1. Shutter
    For taking and managing screen dumps.

    1. Install from Ubuntu Software Center (search term: shutter)
  2. Google Chrome
    An alternate browser to FireFox.

    1. Download from https://www.google.com/chrome/browser/
    2. Double-click the .deb file to install.
  3. Pidgin Internet Messenger
    I find this to be better than Empathy Internet Messaging that is bundled in Trusty Tahr.

    1. Install from Ubuntu Software Center (search term: pidgin)
  4. VLC media player
    I find this to be better than the video player that is bundled in Trusty Tahr.

    1. Install from Ubuntu Software Center (search term: vlc)
  5. VirtualBox
    For my OS virtualization needs.

    1. Download from https://www.virtualbox.org/wiki/Downloads
    2. Double-click the .deb file to install
  6. DOSBox Emulator
    A DOS emulator that I use to play some of my favourite DOS games.

    1. Install from Ubuntu Software Center (search term: dosbox)

Blog at WordPress.com.