Thursday, September 17, 2015

Improving Windows Desktop Search for PDF and Other Binary Files

Windows Search, formerly Windows Desktop Search, may not index content and metadata of binary files, such as, those of PDF files without assistance of some additional software although it does index the files based on their names.

To enable Windows Search to index content and metadata of binary files, we need to install some additional software to help the Windows Search. Windows Search supports iFilter. With the matching iFilter add-in installed, Windows Search can index content and metadta of binary files of certain types. The site lists a number of iFilter add-ins for a few types of binary files, e.g., ZIP, CAB, CHM, DjVu, and PDF files.

Below we show how we can enable indexing content and metadata of  PDF files.

First, we can check whether PDF iFilter exists. The following steps are carried out on a Windows 10 host.
  1. Open "Windows Control Panel"
  2. Search and open "Indexing Options"
  3. Open "Advanced" from "Indexing Options" 
  4. Choose "File Types"
  5. Locate the "pdf" file type.

    Above figure shows that "Registered iFILTER is not found", which means that iFilter add-in is not installed and Windows Search do not index content and metadata of PDF files.
To enable indexing content and metadata of PDF files, we can choose and install Adobe PDF iFilter. If the PDF iFilter is installed, repeating the above step, Windows will indicate that the iFilter is intalled as illustrated in the figure below.

 To force Windows Search to index content and metadata of PDF files immediately upon the  installation of the PDF iFilter, we can check and uncheck PDF file types from the "File Types" tab of the "Advanced Options" of the "Indexing Options" as follows,
  1. Open "Control Panel", "Indexing Option", then "Advanced Option", and finally, the "File Types" tab
  2. Locate the "pdf" file type
  3. Uncheck the "pdf" file type
  4. Click "OK"
  5. Window pops up a dialogue window stating "Rebuilding the index might take a long time to complete. Some views and search results might be incomplete until rebuilding is finished." Click "Cancel" on this dialogue window.
  6. Windows will return to "Indexing Option". Now click on "Advanced" again to open the "Advanced Options"
  7. On the Advanced Options, choose "File Types"
  8. Locate the "pdf" file type again
  9. Check the "pdf" file type
  10. Click on "OK" to confirm
  11. Window now pops up again the dialogue window stating "Rebuilding the index might take a long time to complete. Some views and search results might be incomplete until rebuilding is finished." Click "OK" on this dialogue window to confirm. Windows starts rebuilding the index. Depending on the amount files on the disk, it may take a long time to rebuild the index. 
  12. You can safely close the "Indexing Option". Windows index continues to rebuild the index in background.

Thursday, September 10, 2015

Problem with Firefox's Always Openning Web Page Unintended When Creating New Tab

I somehow had a problem described in this post, that is, when I open a new tab in Firefox and the new tab always opens a Yahoo Search page regardless the "When Firefox Starts" and "Home Page" settings in the "Options" menu. I blame myself for not careful when installing software and browsing the web. I am looking for a fix.

Followed the post cited above, I did not find any hidden add-ons. The solution did not work for me although it worked for some according to the comments left on the post.

I eventually have a fix for this problem.

When I open "about:config" and search the word "Yahoo", I find that the setting "" is pointing to a Yahoo search page. After I set the value of the setting as blank, the problem goes away.

By the way, the Firefox discussion forum have some good discussion on related issues.

Where to Buy "Strange" Food Ingredient?

Sometimes when we want to try a new recipe, some food items are nowhere to find in our local grocery stores.  We can always fire up our web browsers and search them on the web. However, next time when we want to reorder the items, the web stores you had good business with somehow become a little difficult to find on the web. This post is a note for those food items. Now when I need them, I just come here.

Purple Sweet Potatoes
Coagulants for Making Tofu
Coagulants for Making Cheese
Sausage Casing
For Baking

GnuCash Encountered System Error while Retrieving Price Quotes

While I was installing GnuCash 2.6.7 on a Windows 10 computer, I encountered a "System Error" while retrieving the price quotes. To be exact, when I opened the "Price Editor" from GnuCash, and attempted to "Get Quotes", GnuCash popped up a dialogue window with the error message "There was a system error while retrieving the price quotes"

By resolving this problem, I have the following observations,
  • GnuCash may still fail to retrieve price quotes even if GnuCash's gnc-fq-check program reports no problem.
  • GnuCash's gnc-fq-update program is designed to install the Finance::Quote Perl module; however, it may not install all dependencies that the GnuCash's Price Editor functionality requires.
  • GnuCash's gnc-fq-helper program can provide additional diagnostic information, such as, missing dependent Perl modules.
Below is a detailed description on what happened and how the problem was resolved.

  1. To install the Finance::Quote Perl module, we run GnuCash's gnc-fq-update program as the System Administrator, e.g.,
    C:\Program Files (x86)\gnucash\bin>perl gnc-fq-update

  2. To verify that the Finance:Quote Perl module is successfully installed and we can retrieve price quotes online, we run GnuCash's gnc-fq-check, e.g.,

    C:\Program Files (x86)\gnucash\bin>perl gnc-fq-check
    ("1.38" "tdefunds" "adig" "bet" "sixshares" "nz" "unionfunds" "romania" "cominvest" "dwsfunds" "asegr" "tiaacref" "seb_funds" "cse" "nasdaq" "goldmoney" "bamosz" "tsp" "yahoo_json" "hungary" "fidelityfixed" "bourso" "yahoo_nz" "usfedbonds" "yahoo_europe" "ftportfolios_direct" "platinum" "hustock" "bse" "bsero" "ukfunds" "aex" "vanguard" "dutch" "tdwaterhouse" "yahoo_brasil" "maninv" "trustnet" "uk_unit_trusts" "yahoo_australia" "morningstarjp" "brasil" "known_currencies" "canadamutual" "deka" "finanzpartner" "fool" "bmonesbittburns" "ftfunds" "yahoo_yql" "finland" "europe" "za_unittrusts" "nzx" "morningstar" "fidelity_direct" "asx" "za" "troweprice_direct" "greece" "lerevenu" "hu" "tsx" "sixfunds" "fetch_live_currencies" "troweprice" "indiamutual" "hufund" "yahoo" "australia" "asia" "usa" "aiahk" "stockhousecanada_fund" "fidelity" "ftportfolios" "vwd" "france" "mstaruk" "canada" "financecanada" "fundlibrary" "tnetuk" "nyse" "yahoo_asia" "citywire" "hex" "amfiindia")

Since gnc-fq-check does not complain that there might be a problem, we would assume that the GnuCash's Price Eiditor functionality should work. In particular, the GnuCash's Online Quotes wiki page does not appear to suggest anything else may have to be performed. However, I encountered the error that "There was a system error while retrieving the price quotes".

Following the GnuCash's Tracefile wiki page, I initially attempted to observe what may have been wrong by examining GnuCash trace files. However, the trace files did not appear to reveal anything useful to me. Finally, a web search yielded a clue that we might be able to find out more using GnuCash's gnc-fq-helper program. Below is what I found out by attempting to retrieve the ticket CSCO's price quote from Yahoo,

C:\Program Files (x86)\gnucash\bin>echo (yahoo "CSCO") | perl gnc-fq-helper
Can't locate Date/ in @INC (you may need to install the Date::Manip module) (@INC contains: C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/Strawberry/perl/lib .) at gnc-fq-helper line 33.
BEGIN failed--compilation aborted at gnc-fq-helper line 33.

that clearly indicated that the Date::Manip Perl module was missing. Then the fix is to install the Perl module, e.g., invoking Perl shell as the System Administrator as follows,

C:\Program Files (x86)\gnucash\bin>perl -MCPAN -e shell
cpan> install Date::Manip

Now let us run the gnc-fq-helper and attempt to retrieve the ticket CSCO's price quote from Yahoo again. The gnc-fq-helper stopped complaining and successfully retrieved the price quote.

C:\Program Files (x86)\gnucash\bin>echo (yahoo "CSCO") | perl gnc-fq-helper
WARNING: the TZ Date::Manip config variable is deprecated
         and will be removed in March 2016.  Please use
         the SetDate or ForceDate config variables instead.
(("CSCO" (symbol . "CSCO") (gnc:time-no-zone . "2015-09-09 16:00:00") (last . 25.94) (currency . "USD")))

This experience is actually another time that the gnc-fq-helper program saves the day. In the past, I encountered a similar problem, but with a different error message.

Tuesday, September 8, 2015

Collection of Software Tools for Protecting Privacy on the Web

This is a collection of software that we can use to protect privacy and maintain anonymity when browsing the Web.

  • Tor browser. Stated on its web page, "it prevents somebody watching your Internet connection from learning what sites you visit, it prevents the sites you visit from learning your physical location, and it lets you access sites which are blocked." However, the web may appear to be much slower if Tor relays serving you are slow.
  • The Electronic Frontier Foundation's HTTPS Everywhere. A web browser add-on that rewrites HTTP requests from your web browser to HTTPS requests. Stated on its web page, "On supported parts of supported sites, HTTPS Everywhere enables the sites' HTTPS protection which can protect you against eavesdropping and tampering with the contents of the site or with the information you send to the site. Ideally, this provides some protection against an attacker learning the content of the information flowing in each direction — for instance, the text of e-mail messages you send or receive through a webmail site, the products you browse or purchase on an e-commerce site, or the particular articles you read on a reference site.
  •  HTTP Cookie removers.  There are a number of web browser add-on's to remove HTTP cookies, e.g., Ghostery.
  • Flash Cookie removers. There are a number of web browser add-on's to remove Flash cookies, e.g., Better Privacy.
  • Web browsers in private or incognito mode. Modern browsers support "private browsing", e.g., Firefox, Chrome, Opera, Internet Browser, and Microsoft Edge.

Note that the level of privacy and anonymity provided by the above are different. Tor browser perhaps provides the best level of privacy and anonymity, albeit at the cost of higher latency and lower throughput. HTTP and Flash Cookies removers makes trackers, such as, online advertisers' job of tracking an individual web visitor more difficult; however, both operators of the web sites you visit and you internet service providers (ISPs) can still track you, i.e., they know which IP address the traffic is originated, and they both know which pages you are visiting if the traffic is a HTTP session, and the site operators know which page you visiting even if the traffic is a HTTPS session. For the part of web sites supporting HTTPS, HTTPS Everywhere prevents your ISPs' from eavesdropping on which pages you are visiting on a site; however, the web site operators can still know which IP address the page visits are originated and which pages you are visiting.

If you have anything that you want to add, please share with me.

Monday, September 7, 2015

Free SSL Certificate for Securing Email and Websites

I have been looking for free SSL certificates for enabling HTTPS on a few web servers. HTTPS has been promoted by many organizations and individuals because it provides privacy and anonymity to eavesdroppers besides other benefits. The performance penalty of running a HTTPS web server than HTTP counterpart appears to be small.

Finally, I found these two free certificate providers,
Since SSL certificates are for authenticating domains and encrypting network traffic, those who are acquiring the certificates must go through a validation process. The Wikipedia article on Public key certificate has an discussion on it. Based on the rigor of the vetting process during the validation, the validation process are categorized as "Domain Validation", "Organization Validation", and "Extended Validation".

The above free certificates only require "Domain Validation", which is probably the reason that the vendors could provide them for free since the "Domain Validation" can be automated via electronic means, i.e., via emails sent to domain registrants listed in the WhoIs database, or via HTML documents uploaded to websites to be secured.

Modern web browsers typically turn the address bar green if the certificate of a visited website passed Extended Validation.

StartSSL describes the free certificates well on their site as follows,

Because the checks are performed mostly by electronic means, they require only minimal human intervention from our side. The validations are here to make sure, that the subscriber is the owner of the domain name, resp. email account. You may find additional information on this subject in our CA policy.

The StartSSL™ Free certificates are intended for web sites which require protection of privacy and prevent eavesdropping. However information presented within these certificates, except the domain name and email address, are not verified. Should you need higher validated certification, please check out our StartSSL™ Verified (Class 2) certificates.

I tried the WoSign Free Certificates because WoSign provides certificates of 3-year period while StartSSL only provides 1-year period. As lazy as I am, a 3-year period certificate does save me a few key strokes to renew and install the certificates on the websites.

The process is simple.
  1. Sign up an account on the WoSign's Free SSL Certificate web page.
  2. Go back the WoSign's web page with the account information
  3. Request certificates, for which, I chose to generate a Certificate Signing Request (CSR) myself. In my case, I use OpenSSL as follows,
    openssl req -new -newkey rsa:2048 -nodes -keyout mywebsite.key -out mywebsite.csr

    Then, copy and paste the content of the CSR to the WoSign's page in which the certificate is being requested.

    Note that the key length must be 2048-bit long. Save mywebsite.key for a late use (in step 5).

  4. Validate the website owner ship by uploading a HTML document provided by WoSign to the website under the website's web root directory
  5. Upon completing the validation install the certificate. I am running an Apache web server. It requires me to uncomment or update these three lines in the configuration file (that is, in my case, /etc/httpd/conf.d/ssl.conf)
    SSLCertificateFile     /etc/pki/tls/certs/2_mywebsite.crt
    SSLCertificateKeyFile  /etc/pki/tls/private/mywebsite.key
    SSLCACertificateFile   /etc/pki/tls/certs/1_root_bundle.crt

    Note that in the above 2_mywebsite.crt and 1_root_bundle.crt are from WoSign and mywebsite.key is the secrete key generated in step 3.
  6. Restart the Apache web server, in my case,
    systemctl restart httpd.service

  7. Final step is to test the website is up and the certificate is installed properly. To verify that the website is up, grab a computer and point a web browser to the website's URL using the HTTPS protocol. To verify the certificate is installed propertly, simply click on the "lock" icon next to the website address in the address bar of the web browser. The browser will show the certificate information.

If you have spotted and tested free SSL certificates from other vendors, please share with me via commenting on this post.

Friday, September 4, 2015

VMWare Tools Installer Complaining About Ethernet Driver on Linux Guests

When installing the VMWare Tools on Linux Guests, we sometimes see that the installer of the VMWare Tools complains about Ethernet drivers,

The vmxnet driver is no longer supported on kernels 3.3 and greater. Please
upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)

which does not necessarily mean that the Ethernet drivers are not vmxnet3 or e1000e. My experience indicates that it sometimes complains about the Ethernet driver's not being vmxnet3 or e1000e even if the driver is one of the two.

First, we can determine what Ethernet driver is loaded by using lspci command on the Linux virtual machine as follows,

lspci |  grep "Ethernet controller"

As the example below, if the output indicates that the Ethernet driver is vmxnet3 or e1000e, we can safely ignore the complain.

$ lspci |  grep "Ethernet controller"
03:00.0 Ethernet controller: VMware VMXNET3 Ethernet Controller (rev 01)

However, if the Ethernet driver is not one of the two, it is better to change the virtual Ethernet driver to be one of the two. VMWare has a Knowledge Base article on how to manually configure Ethernet adapter for a virtual machine. Following the article, we can configure the Ethernet driver in the steps below,

  1. Power off the virtual machine
  2. Locate and open the virtual machine configuration file (.vmx) for editing on the host
  3. Look for Ethernet configuration, by searching "ethernet" in the configuration file
  4. If you find a configuration entry as follows,
          ethernet0.virtualDev = "vmxnet"
          ethernet0.virtualDev = "e1000"
    you should replace "vmxnet" or "e1000" by "vmxnet3" or "e1000e".

    Be aware that the above shows an example for the first Ethernet adapter, i.e., "ethernet0". If you have multiple Ethernet adapters, you should repeat the above steps for all Ethernet adapters.

    If you do not find a configuration entry as such, you need to add the entry to the configuration file, i.e.,
          ethernet0.virtualDev = "vmxnet3"
          ethernet0.virtualDev = "e1000e"
    Repeat the step all Ethernet adapters.
  5. Save the configuration file and reboot the Linux guest
  6. Use lspci on the Linux guest to confirm that desired Ethernet driver is loaded.

You may wonder among "vmxnet3" or "e1000e", which one you should choose. According to this article, it appears that the better choice is "vmxnet3".