Convert .chm to .pdf file in Linux/Unbuntu

1) From the Synaptic Package Manager, select and apply the following packages:

* libchm
* libchm-bin
* libchm-dev
* python-chm
* chm2pdf
* html-doc
* htmldoc-common

2) To use the newly installed application, from the terminal:

$ htmldoc

When the HTMLDOC application opens from the "Input" tab, specify the type of document then click "add file" to add the file that needs to be converted.  From the "output" tab, specify the followings:

* Output To: where the output is going to be placed in a file or a directory
* Output Path: the path of the file going to be, i.e. home/Desktop/folder or home/Desktop/filename.filetype.
* Output Format: select file type, i.e. html, .ps, or .pdf.

Then click "Generate."

Adding new fonts in Gimp

Adding new fonts in Gimp is super simple. Here's how to do it.
1) Search and download new fonts to your desktop.
2) Unzip your font packages right onto your desktop.  You can either unzip the files by right clicking the folder then select unzip from the drop down menu or you can unzip the file from the terminal.  If you chose to unzip the file from the terminal, follow these commands:
$ sudo su
# cd
# cd /home/your-login-name/Desktop
# unzip filename.zip
# exit

3) Open these unzip font packages to see the font files. There are about 26 type font extensions but the most popular ones are Windows Font File (.fnt,) Generic Font File (.fon,) OpenType Font (.otf,) and TrueType Font (.ttf.) You want to look for file(s) with these extensions. For example, there are two files in my unzip font folder, fontlicense.txt and robot.ttf.  I will copy "robot.ttf" from my desktop to my Gimp's fonts folder and delete the unwanted files/folder.
4) Copy the font files to the Gimp's fonts folder. Your Gimp's fonts folder can be found in /home/your-login-name/.gimp2.x/fonts.
$ sudo su
# cd /home/my-login-name/Desktop
# cp robot.ttf /home/my-login-name/.gimp2.x/fonts
# exit

5) Restart Gimp.

It's that easy!

Network Tweaks for Firefox

Frustrated at low network speed? Welcome to the club.  I've tried all available extensions (that I knew of) to speed up the network and they do work to a point. But if you're like me, the search for improving network speed will continue on indefinitely.

Background
When you request pages in Firefox, depending on what you have requested first, Firefox will request and wait for the respective response one at a time. Like you, I typically open several tabs within Firefox and make multiple requests at once; thus slow the network down. HTTP pipelining is a technique which multiple HTTP requests are written out to a single socket without waiting for the corresponding responses and is only supported in HTTP1.1. Enabling HTTP1.1 forces the network to fit multiple HTTP requests in the same transmission control protocol ("TCP") packets thus fewer TCP packets are sent over the network which reducing load time and speeding up the network.  Unfortunately, not all servers support pipelining and some servers may even behave incorrectly if they receive pipelined requests.   



All of the above statements is also true for proxy server.

Solution 1 - Tweak network settings 

1) On the address bar, type about:config.  You'll see a warning, "This might void your warranty! Blah...blah..." Just click on "I'll be careful, I promise!" to proceed.

2) The window will display all of your current configuration settings.  On the filter bar, search for the following preferences and set them as recommended below.


     (a) network.http.keep-alive must be set to "true."
     (b) network.http.version must be set to "1.1".
     (c) network.http.proxy.version must be set to 1.1".
     (d) network.http.pipelining must be set to "true" to use pipelining in HTTP 1.1 connections.
     (e) network.http.proxy.pipelining must be set to "true."
     (f) network.http.pipelining.maxrequests. This preference determines the maximum number of requests to pipeline at once.  The default value is 4 but you can change the number of requests depending on your preference (I set mine to 20.)  Note higher values will cause a delay before the first request completes but will make the last request completes sooner.   Higher values will also cause more of a delay if a connection fails. 

3) Last but not least, right click anywhere on the screen and select New / Integer.  Name it "nglayout.initialpaint.delay" and set its value to "0."  This preference reduces the browser wait time to zero before it acts on the information it receives.

Solution 2 - Firefox extensions

 
 (1) Fastestfox - Browse Faster allows you to tweak many network and rendering settings such as pipelining, cache, DNS cache, and initial paint delay. You can access these settings via Tools / Fastest Fox.
 (2) Cleeki - Firefox Accelerators, a superior alternative to IE8 Accelerators.
 (3) Tweak Network.  A tool that allows you to tweak your network settings.
 (4) Vacuum Places. In Firefox 3, bookmarks and browsing history are stored in places.sqlite file, located in Firefox profile folder. Defragment your places.squite database will help speeding up Firefox.
 (5) Update Notifier notifies user when updates are available for your extensions and themes.  This is a "must have" extension since, as you'll see below, up-to-date extensions will help managing your network speed.

Known Firefox extensions that either have memory leak or slow down network speed:

 
 (6) DownThemAll may cause network slows down to a halt. 
 (7) Filterset.G.Updater AND FlashGot cause memory leak when use these extensions together. The solution is to update to version 0.3.0.2 or higher.
 (8) Firebug uses excessive CPU, Firefox may hang when a pop-up window is accessed.  The solution is to either uninstall Firebug, disable it, or use Firebug Lite, if possible.
 (9) FireFTP may cause excessive CPU usage with older version of Firefox.  The solution is to keep Firefox updated.
(10) FlashGot causes memory leak.  The solution is to update or uninstall ForecastFox|10n or not to use it at all.
(11) ForecastFox also causes memory leak.
(12) FoxyTunes may cause memory leak.
(13) Google Browser Sync causes excessive CPU usage. The solution is to uninstall the extension.
(14) IE Tab.  This is a great extension for web developers who need to see how their work rendered in IE but also known to cause memory leak. So, make sure that you have the latest version of Firefox which has code written to detect memory leak. Also, use IE Lite instead of IE Tab, this would reduce memory usage as well. Unfortunately, IE8 Lite has not yet been developed. Personally, I use www.browsershots.org to see how my website rendered in multiple browsers.
(15) iMacros causes excessive CPU usage.  The solution is to make sure you have the latest version of this extension.
(16) ImgLikeOpera with "refresh images in tab on select" causes excessive CPU usage.  The solution is to turn "refresh images in tab on select" to "off."
(17) Mouseless Browsing causes excessive CPU usage.  The solution is to uninstall this extension.
(18) Session Saver also causes memory leak.
(19) SwitchProxy Tool causes new Firefox windows to freeze for a few seconds.  The solution is to disable or keep this extension up-to-date.
(20) Tabbrowser Extensions (TBE) causes general slowdown. The solution is to disable or uninstall the extension.
(21) ThinkVantage Password Manager Extension causes new Firefox window to delay a few seconds when opened.  The solution is to disable or uninstall this extension.
(22) User Agent Switcher reinstallation or update may cause Firefox to hang.  The solution is to uninstall older version (prior to 0.6.4) in Safe Mode before installing a new version.
(23) Web Developer causes excessive CPU usage (quite obvious.)  The solution is to disable this extension and enable it when necessary.
(24) Wiz RSS News Reader update causes Firefox to hang.  The solution is to uninstall the older version (prior to 2.0.0) in Safe Mode then install the updated version.
(25) Woot Watcher causes Firefox to hang or slow Firefox down.  The solution is to uninstall this extension.
(26) Yahoo! Toolbar causes excessive CPU usage.  The solution is to uninstall via Tools / Add-ons / Extensions. 

References
http://www.bloganything.net/164/tweaks-to-speed-up-firefox
http://kb.mozillazine.org/Problematic_extensions
http://en.wikipedia.org/wiki/HTTP_pipelining

Install Ubuntu Tweak on Lucid Lynx

I ran across a posting about Ubuntu Tweak a few months ago. I tried it out and now I couldn't live without!  So, what is Ubuntu Tweak? Well according to the developer, "Ubuntu Tweak is an application designed to configure Ubuntu easier for everyone. It provides many useful desktop and system options that the default desktop environment doesn't provide."

Interested yet? Here are some of the features that Ubuntu Tweak allows user to do:

  • Not having to install Sysinfo yet you can view the basic system information, i.e. distribution, kernel, CPU, memory, etc. 
  • You can set preferential applications to start up at boot.
  • You can access and install many popular applications in one click (okay two clicks!)
  •  Clean unwanted packages or system cache to free up RAM (this one is my favorite.)
  •  GNOME panel settings.
  •  System security settings.
  •  And more!
How to Install Unbuntu Tweak in Ubuntu 10.04?
It's insanely simple, just follow the three commands below.

$ sudo add-apt-repository ppa:tualatrix/ppa
$ sudo apt-get update
$ sudo apt-get install ubuntu-tweak


Once installed, Ubuntu Tweak can be accessed via Application / System Tools / Ubuntu Tweak.

Sources:
http://ubuntu-tweak.com
http://www.ubuntugeek.com/how-to-install-ubuntu-tweak-in-ubuntu-10-04lucid-lynx.html

Start XAMPP at boot

I really hate it when executing http://localhost/xampp to receive an error message like, "local server is not responding." Knowingly that XAMPP will stop when I shut my machine down (a normal Linux and Linux like systems behavior,) I patiently type, # /opt/lampp/lampp start to get the server going again.  Everything is peachy until the next time I try to access my server, then the aggravation returns.  Well, to stop all of this nonsense, there is a way to start XAMPP at boot. Meaning, when you turn on your machine, your server will start automatically for you as well.  Here is how.

Edit the rc.local file with your favorite text editor. Since I am using gedit therefore gedit is specified in my command.  Replace gedit with whatever your favorite text editor is.

$ sudo gedit /etc/init.d/rc.local


When the file open, at line 1, you'll see something like:

#! /bin/sh


Right below this line, add the following:

/opt/lampp/lampp start


Save and exit. Next time when you turn on your computer, your server will also start for you.

Free Software for Windows

For those of us who are still using Windows (I really feel bad for ya!), here is a great source of free software for you.  Some of these software were first developed for Linux/Unix and later were adapted for Windows.  I wish I had known this when I was using Windows six months ago. Hope you find these helpful.

Joomla: There was an error uploading this file to the server.

The most likely reason for this error is your upload file size is smaller than the size of the file being uploaded.  To correct this problem, simply edit your php.ini.

Specifically to XAMPP server that runs on local host, your php.ini is resided in /opt/lampp/etc. Using your favorite text editor, open your php.ini and edit the "upload_max_filesize" appropriately.  For example my upload_max_filesize is 2M and the file I am trying to upload is 3.5M, I would adjust the upload_max_filesize to 5M from 2M.

Restart your server.

This should address the problem.