MoonPoint Support Logo

 

Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
October
Sun Mon Tue Wed Thu Fri Sat
   
   
2013
Months
Oct


Thu, Oct 31, 2013 11:27 am

Senior Assistance Telemarketer

Our home phone number is on the U.S. federal government Do Not Call list, but that doesn't stop some telemarketers from calling, even though people who have added their phone numbers to the do not call registry are unlikely to do business with some company that calls them in spite of their numbers being on that list.

I received a robocall with a spiel about an opportunity to receive $3,000 in free groceries with no option to have our number removed from the company's calling list. I could only hit a button to speak to a representative, which I did. I asked for the name of the company and was told it was "Senior Assistance" something. When I complained about the company ignoring the do not call list, I was told that I had opted in to receive such calls. I've heard that excuse before, which I regard as bogus, since I don't opt in to be contacted by third parties when I register any personal information with companies or organizations. Companies that ignore the do not call list likely often tell employees to use that excuse to placate people who call and complain about their annoying telemarketing calls.

When I used *69 to get the calling number, I found it was 323-281-1384. At 323-281-1384 / 3232811384 at the 800notes site which provides a directory of unknown callers where people can report such calls, I found other people on the Do Not Call registry complaining they also received such calls.

I filed a complaint at the National Do Not Call Registry Submit a Complaint page as I usually do when I get such calls. I can only hope that enough other people file a complaint there that the Federal Trade Commission may take some action against the company, though I'm doubtful that action will be taken, or, if it is that any fine would be stiff enough to make ignoring the list untenable for the company.

[/phone] permanent link

Thu, Oct 31, 2013 10:49 am

Scrollbars no longer visible

After an operating system upgrade to OS X 10.8.3, aka "Mountain Lion", on my MacBook Pro laptop, I no longer saw scrollbars in applications, including the Safari browser. If I resized a window by changing its width, the scroll bar would appear in the window. But the next time I opened the application I would have to go through the same procedure to get the scrollbar again. I've seen people complaining of the disappearance of scroll bars when they upgraded to OS X 10.9, aka "Mavericks".

To get the scrollbar to appear on windows by default, take the following steps:

  1. Click on the Apple icon at the top, left-hand corner of the screen.
  2. Select System Preferences.
  3. Under the Personal section, select General
  4. For the Show scroll bars options, you will see the following choices:
    • Automatically based on mouse or trackpad
    • When scrolling
    • Always
    Select "Always". You can then close the window.

You should then see a scroll bar in applications.

[/os/os-x] permanent link

Wed, Oct 30, 2013 11:35 pm

Out of office message for Entourage users

If you are using Microsoft Entourage 2008 for email on a Mac and want to have an out-of-office message sent in reply to email sent to you while you are out of the office on vacation or for other reasons, you can configure Entourage to send a message by using its rules feature, which you can access by clicking on Tools and selecting Rules in Entourage then taking the following steps:
  1. Click on New.
  2. Select Mail (Exchange), if your email is coming from a Microsoft Exchange server. For email coming from a POP server, you can place the rule under Mail (POP).

    Note: POP rules act on a message only when it first arrives in the Inbox (On My Computer), not when it arrives in any other folder. Once it's moved to another folder it won't be seen by rules.
  3. In the Rule name field type "Out of Office".
  4. Leave "if all criteria are met" selected in the Execute field.
  5. In the top, left drop down list beneath Then and beneath the Add Action button, select Reply, wnich will then show a Reply Text button. Click on that button which will allow you to provide the out-of-office message you wish sent to senders.
  6. Make sure the Enabled checkbox is checked and click on the OK button.

You should then see the rule listed under the Mail (Exchange) tab of the Rules window, which you can close.

If you need to change the rule, e.g., to change the message sent in reply to incoming email, click on Tools, select Rules and then, under the Mail (Exchange) tab, provided that you created the rule in that category, double-click on the Out of Office rule to open it. Then make any needed changes.

When you no longer need the rule, click on Tools, select Rules, and then click on the Mail (Exchange) tab. Then uncheck the checkbox in the Enabled column next to the Out of Office rule to disable it.

The above method requires that you leave your computer turned on with network access and with Entourage running. Of course, it might be a laptop you wish to take with you which might not be on all the time while you are out of the office. So a better method, if your company/organization is using a Microsoft Exchange server, is to use your browser to log into the Outlook Web App, then take the following steps:

  1. Click on Options (look in the upper, right-hand corner of the web page).
  2. Select Automatic Replies.
  3. Select the radio button for "Send automatic replies".
  4. You can then set the start and end times for the replies.
  5. You can then fill in a message to be sent to those who send you email while you are out of the office. There are two sections, one for internal senders and one for senders outside of your organization. You can send different messages to internal versus external senders, if you wish, or you can fill in the same text to be sent to both types of senders.

    Fill in the "Send a reply once to each sender inside my organization with the following message" for the message you wish to go to internal senders.
  6. To have the out-of-office messages go to senders outside of your organization, check the checkbox next to "Send automatic reply messages to senders outside my organization". Beneath that checkbox, you can select from the following 2 options:
    • Send replies only to senders in my Contacts list
    • Send replies to all external senders
  7. Fill in the "Send a reply once to each sender outside my organization with the following message" section, if you have chosen to send automated replies to external senders.
  8. Click on the Save Button.

This method will send out of office messages whether your Mac running Entourage is turned off and you won't need to configure Entourage to send such messages. When it is set up, if you select Tools then Out of Office from within Entourage, you can see the message that will be sent as an out-of-office reply

[/network/email/clients/entourage] permanent link

Tue, Oct 29, 2013 11:53 pm

Loss of network access after VPN connection times out

On my MacBook Pro laptop, I've found that whenever a VPN connection, which I establish through Juniper Networks VPN client software, times out, or is dropped for some other reason prematurely, I lose network access. From a shell prompt, I can ping the system's own address, but I can't ping any other system and all network access via the Safari browser, email access, etc. doesn't work.

If I try pinging an IP address other than the system's own address, I see "cannot allocate memory" messages. E.g., an attempt to ping the router would give me the results below:

$ ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
ping: sendto: Cannot allocate memory
ping: sendto: Cannot allocate memory
Request timeout for icmp_seq 0
ping: sendto: Cannot allocate memory
Request timeout for icmp_seq 1
^C
--- 192.168.0.1 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss

I tried disabling and re-enabling Wi-Fi by going into the network settings and selecting "Turn Wi-Fi Off", but turning it off and on didn't help. The following steps did work, though, from an account with admin privileges:

  1. Click on the Apple icon in the upper-left corner of the screen and select System Preferences.
  2. Select Network.
  3. Click on the Advanced button near the bottom, right-hand corner of the window next to the question mark button.
  4. Click on the TCP/IP tab.
  5. For "Configure IPv4", change the setting from "Using DHCP" to "Off" and then click on the OK button then click on Apply. Then click on the Advanced button again and change the setting back to "Using DHCP" and click on OK and Apply again.

References:

  1. "Cannot Allocate Memory" error when trying to ssh or ping or curl due to unrelated vpn?
    Date: January 22, 2013
    superuser.com

[/os/os-x] permanent link

Mon, Oct 28, 2013 10:50 pm

Obtaining the serial number of a Mac OS X system

If you need to locate the serial number for a Mac OS X system, you can do so by clicking on the Apple icon in the upper, left-hand corner of the screen then selecting About This Mac and then clicking on the More Info... button.

About This Mac More Info

The window also shows the year the system was manufactured, the processor speed, amount of memory in the system, graphics adapter, and the version of the operating system as well as the serial number.

If you need to get the serial number from a shell prompt, i.e., a command line interface, you can use the ioreg command:

$ ioreg -l | awk '/IOPlatformSerialNumber/ {print $4;}' 
"W89491TFCCC"

If you are on version 10.3 or later of OS X, you can also determine the serial number by using the system_profiler command.

$ system_profiler SPHardwareDataType | awk '/Serial/ {print $4}' 
W89491TFCCC

[/os/os-x] permanent link

Sun, Oct 27, 2013 5:19 pm

Obtaining the date a web page was last modified

If you wish to know the date a web page was last modified, when you are visiting the page, you can replace the URL of the page in the address bar with javascript:alert(document.lastModified) to see the date the page was last modified. Note: you can access the address bar by the keyboard shortcut Ctrl-L. If you are pasting javascript:alert(document.lastModified) into Internet Explorer's address bar, you may find that javascript: gets stripped off, so you will need to put it back in front of alert(document.lastModified) before hitting Enter.

One caveat is that this will only work for telling you when the content of the page was last modified for static web pages. Ones that include content dynamically, e.g., ads, etc. will show the time that the page was last modified as when that content for the page was last updated. I.e., the time may not be the time the author of the page wrote the information you've found on the page.

On a Microsoft Windows system, you will see a window similar to the following one open when you enter the javascript command in the address bar.

Last modified essage from webpage

Another technique to attempt to learn when a webpage was created or modified is to check the Wayback Machine to see when it archived the site.

[/network/web/browser] permanent link

Sun, Oct 27, 2013 2:19 pm

IE 9 to 10 Upgrade Failure with Code 9C59 Error

Yesterday, while in the process of bringing all of the software on a laptop running Windows 7 Professional up-to-date, I tried upgrading Internet Explorer from version 9 to 10 as Windows Update listed it as one of the important updates pending installation on the system. But every time I tried updating Internet Explorer 9 to version 10 through Windows Update, I received a "Code 9C59" error message. I worked on the issue for all day yesterday before being finally being able to successfully complete the upgrade from IE 9 to 10 today after uninstalling packages from the C:\Widnows\servicing\packages directory via the pkgmgr /up command.

[ More Info ]

[/network/web/browser/ie] permanent link

Sun, Oct 27, 2013 2:12 pm

Google +1 button markup validation

At Google's +1 Button page, Google suggests adding start and end tags similar to the following at a point in a webpage where you want the plus 1 button to appear:

<g:plusone></g:plusone>

But if you use those tags on a page and check the page with the W3C Markup Validation Service, which checks the validity of HTML code, you will see errors reported such as the following:

White x in red circle Line 731, Column 11: element "G:PLUSONE" undefined

<g:plusone></g:plusone>

An alternative is to use another mechanism provided by Google to have the button appear. The alternative is to insert the following div start and end tags where you wish the button to appear.

<div class="g-plusone"></div>

[/network/web/services/google] permanent link

Sat, Oct 26, 2013 1:20 pm

Determining the version of IE from a command prompt

To determine the version of Internet Explorer from a command prompt without having to run the program, you can enter the command reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer" /v version | find "version" at the command line:
C:\>reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer" /v  vers
ion | find "version"
    version    REG_SZ    9.0.8112.16421

[/network/web/browser/ie] permanent link

Fri, Oct 25, 2013 11:32 pm

Checking uptime and last reboot time on an OS X system

On a Mac system running the OS X operating system, you can determine how long a system has been up through the Graphical User Interface (GUI) by clicking on the Apple icon at the top left of the screen then pressing and holding down the option button on the keyboard, which will cause System Information to appear in place of About This Mac. Select System Information, then from within that window select Software (you can use the downward cursor key to move down through the list). In the right pane of the window, you will see "Time since boot".

System Software Overview

You can also view the system's uptime since the last reboot from a shell prompt that you have through a terminal window or SSH session by using the uptime command.

$ uptime
22:10  up 3 days,  7:50, 3 users, load averages: 2.12 2.04 2.00

You can also see when the system was last rebooted and prior boot times by using the command last reboot.

$ last reboot
reboot    ~                         Tue Oct 22 14:19 
reboot    ~                         Tue Oct  1 08:16 
reboot    ~                         Fri Sep 27 09:39 
reboot    ~                         Thu Sep 26 14:39 
reboot    ~                         Tue Sep 24 17:03 
reboot    ~                         Sun Sep 22 10:34 
reboot    ~                         Thu Sep 19 20:27 
reboot    ~                         Tue Sep 17 15:19 
reboot    ~                         Tue Sep 17 11:00 
reboot    ~                         Fri Sep 13 10:50 
reboot    ~                         Fri Sep  6 02:44

[/os/os-x] permanent link

Thu, Oct 24, 2013 11:24 pm

Determining the amount of physical memory on a OS X System

On an Apple OS X system, you can determine the amount of memory in the system by clicking on the Apple icon at the upper, left-hand corner of the screen and selecting "About This Mac".

About This Mac

If you need to determine the amount of memory from a shell prompt, you can use the sysctl command.

$ sysctl -n hw.memsize
4294967296

The sysctl -n hw.memsize command above shows my MacBook Pro laptop running OS X 10.8.3 has 4 GB of memory (4294967296 bytes = 4 GB).

Another sysctl option you could use is to query hw.physmem. But, be warned this will result in inaccurate results on systems with more than 2 GB of memory.

E.g., checking the amount of physical memory with the command sysctl -n hw.physmem on my MacBook Pro with 4 GB of memory results in the command telling me the system has 2 GB of memory rather than 4 GB.

$ sysctl -n hw.physmem
2147483648

If you wish to have the number displayed in GB rather than bytes, you can use memsize.py, which is a simple python script to convert the output of sysctl -n hw.physmem from bytes to gigabytes. You can run it from a shell prompt by typing python memsize.py.

$ python memsize.py
4 GB

[/os/os-x] permanent link

Wed, Oct 23, 2013 10:59 pm

Displaying CPU speed from a shell prompt on OS X

If you need to view CPU information, such as processor type or speed from a shell prompt, you can use the command sysctl -n machdep.cpu.brand_string.
$ sysctl -n machdep.cpu.brand_string
Intel(R) Core(TM)2 Duo CPU     T9900  @ 3.06GHz

Through the graphical user interface (GUI), you could get the information by clicking on the Apple icon at the upper, left-hand corner of the screen and selecting "About This Mac".

About This Mac

But the command-line method is sometimes needed, e.g., when you are remotely logged into a system via SSH or need to script collection of the information.

You can see other information that is availabe via the sysctl command by typing sysctl -a.

[/os/os-x] permanent link

Tue, Oct 22, 2013 10:56 pm

GIMP for OS X

If you are looking for a free, but full-featured, image editing program for OS X systems, GNU Image Manipulation Program (GIMP), which is available for Linux, Solaris, and even Microsoft Windows operating systems, also, is available for OS X. Mac OS X versions can be downloaded as .dmg Apple Disk Image files.

GIMP's native image format is eXperimental Computing Facility (XCF), but it also provides import and export support for image formats such as BMP, GIF, JPEG, PNG, and TIFF, along with the file formats of several other applications such as Autodesk flic animations, Corel Paint Shop Pro images, and Adobe Photoshop documents. Other formats with read/write support include PostScript documents, X bitmap image and Zsoft PCX. GIMP can also read and write path information from SVG files and read/write ICO Windows icon files.

[/os/os-x] permanent link

Mon, Oct 21, 2013 10:23 pm

Checking CPU Utilization with Activity Monitor or top

If you are using an Apple system running the OS X operating system and find that it is running slowly, you can check memory and CPU utilization using the Activity Monitor application that comes with the operating system. You can find the program under Applications/Utilities.

If you wish to see which application is using the greatest amount of memory, you can click on the Real Mem column header to display the list of processes running on the system ordered by memory utilization. To order the list by the percentage of CPU utilization, you can click on the % CPU column header to see which application is most heavily using the CPU.

In the example below, Entourage is using 40.4% of CPU cycles and 102.7 megabytes of memory.

Activity Monitor

Another utility that comes with the OS X operating system which you can use to check on the resources used by applications is the top utility which can be run from a shell prompt, which you can get by running the Terminal program found in Applications/Utilities. You will get a text display that provides information on system performance by running the top command. The command top -o cpu will order the displayed list of running processes by CPU utilization.

Processes: 165 total, 3 running, 13 stuck, 149 sleeping, 718 threads   22:04:55
Load Avg: 1.50, 2.52, 2.81  CPU usage: 25.11% user, 22.83% sys, 52.5% idle
SharedLibs: 796K resident, 0B data, 0B linkedit.
MemRegions: 30234 total, 1308M resident, 45M private, 1267M shared.
PhysMem: 1691M wired, 1196M active, 1187M inactive, 4074M used, 21M free.
VM: 335G vsize, 1026M framework vsize, 4076678(0) pageins, 3624731(0) pageouts.
Networks: packets: 6273654/3871M in, 5724447/3985M out.
Disks: 7453865/220G read, 6472245/405G written.

PID    COMMAND      %CPU TIME     #TH  #WQ  #PORTS #MREG RPRVT  RSHRD  RSIZE
945-   Microsoft En 77.5 14:43:34 14/1 4    258    1288+ 69M+   38M    99M+
90973  top          8.0  00:02.45 1/1  0    24     30    1280K  216K   2028K
697-   Microsoft Da 2.0  27:09.14 3    1    105    199   39M    5892K  41M
1329   vmware-vmx   1.6  09:41:27 15   1    260    555   4704K  47M    956M+
0      kernel_task  1.4  01:57:04 88/2 0    2      652   65M    0B     411M
456    Terminal     0.4  00:29.01 5    1    147    229   7556K  7192K  16M
87     WindowServer 0.4  01:43:11 4    1    547    4074  13M    88M    56M+
74-    AgentService 0.1  08:47:21 8    1    89     103   1436K  1384K  2928K
489    WebProcess   0.1  03:18:09 10   1    266-   2738- 96M+   121M   183M+
462-   My Day       0.1  09:51.57 7    2    171    340-  11M-   14M    18M-
49     mds          0.1  32:49.92 7    5    284-   397   36M-   3176K  63M-
74052- Microsoft Wo 0.1  00:27.20 4    2    163    630   9892K  22M    17M
71197- Microsoft Ex 0.1  00:49.76 5    3    153    517   7832K  79M    17M
187-   SymAutoProte 0.0  15:55.03 8    1    74-    227-  21M-   2060K

The list of processes above has Microsoft Entourage at the top at 77.5 %CPU.

[/os/os-x] permanent link

Sun, Oct 20, 2013 10:12 pm

Excel end of month function EOMONTH

Excel provides an EOMONTH function that will allow you to determine the last day of a particular month that is a certain number of months away from a specified date. The syntax for the function is as follows:

EOMONTH(start_date, months)

Start_date is a date which can be entered as a text string between quotation marks, e.g. "10/20/2013" or "2013/10/20". Or it can refer to a cell that contains a date, e.g. =EOMONTH(A2,1), which, if cell A2 holds the relevant date will display the date for the day that is the end of the month one month from the day in cell A2. Note: if you con't format the cell where you want the result displayed as a date, Excel will display the result as a serial number because it stores dates as sequential serial numbers. If your workbook uses the 1900 date system, then January 1, 1900 is day 1, i.e., serial number 1.

E.g., for the formula =EOMONTH("10/20/2013",4), Excel would display 2/28/2014 in the cell where the formula was entered, if that cell was formatted to hold a date.

You can use negative numbers for months, e.g. =EOMONTH("10/20/2013",-2) would produce 8/31/2013.

Error conditions:

If you are using Excel 2000 and you see the error #Name? when you use the function, you need to install the Analysis ToolPak to make the function available. After you install the Analysis TookPak, make sure that the Analysis TookPak is enabled by clicking on Tools then selecting Add-Ins and making sure Analysis TookPak is checked.

[/os/windows/office/excel] permanent link

Sat, Oct 19, 2013 10:01 pm

Pasting from PuTTY to Linux

If you are using PuTTY for SSH or telnet connections to a Linux system and need to copy and paste text from the Microsoft Winodws system on which PuTTY is running into a file or application on a Linux system, you can paste the data you've copied into the clipboard on the Windows system into the file/application on the Linux system by hitting both buttons on your mouse simultaneously or by hitting the Shift and Insert keys simultaneously.

[/os/windows/network/ssh/putty] permanent link

Fri, Oct 18, 2013 11:06 pm

Last Update Registry Entries

If you need to know when a Microsoft Windows system was last updated using the Windows Update feature, you can find the information in the registry by running regedit and navigating to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results. Beneath this location you will find Detect, Download, and Install keys. Beneath each of those you will find a LastSuccessTime value with a timestamp in the form yyyy-mm-dd hh:mm:ss (year-month-day hours:minutes:sectonds), e.g., 2013-10-18 20:25:19.

Auto Update Install value

You can display all of the values from a command prompt usin the reg query command below:

reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results" /s

E.g.,

C:\>reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Wind
owsUpdate\Auto Update\Results" /s

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto
Update\Results\Detect
    LastSuccessTime    REG_SZ    2013-10-18 17:17:17
    LastError    REG_DWORD    0x0

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto
Update\Results\Download
    LastSuccessTime    REG_SZ    2013-10-16 23:05:55
    LastError    REG_DWORD    0x0

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto
Update\Results\Install
    LastSuccessTime    REG_SZ    2013-10-18 20:25:19
    LastError    REG_DWORD    0x0

If you just wish to view a particular one, such as the value for the LastSuccessTime for installation of an update, you can use a command such as the following:

C:\>reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Install" /v LastSuccessTime

Put the value to be queried after the /v argument to the command.

E.g.:

C:\>reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Wind
owsUpdate\Auto Update\Results\Install" /v LastSuccessTime


HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto
Update\Results\Install
    LastSuccessTime    REG_SZ    2013-10-18 20:25:19

[/os/windows] permanent link

Thu, Oct 17, 2013 11:03 pm

Forgotten No-IP DUC Password

I needed to change the Dynamic DNS (DDNS) host name used by the No-IP DUC 2.2.1 client on a system on which I had installed the client software years ago. The system was on a LAN with a router that had a dynamically assigned external address provided by the company's Internet Service Provider (ISP). I used No-IP's DDNS service to have the system contact a DDNS server provided by No-IP which would note the IP address from which it was contacted and associate that address with a FQDN, e.g., acme.example.com, so that I could connect to the site for troubleshooting without having someone at the site determine what the site's currently assigned IP address might be by going to a site like WhatIsMyIP, which is a site I usually have people go to when I need them to provide me with their current IP address. The No-IP DUC client was running on the system as a system service and the icon for the software was in the notification area, aka the system tray, but I found that the password I thought I had set for it didn't work and I couldn't remember what it might be.

Since it was very late and I was in a hurry to make the change, I thought I could probably find a registry key where the password was stored and fix the problem more quickly by blanking out the contents of that registry key. For DUC 2.2.1, the relevant registry key, which can be accessed by the Microsoft Windows built-in utility regedit, is HKEY_LOCAL_MACHINE\SOFTWARE\VitalWerks\TrayPassword, which is a REG_SZ key. To remove the tray password, you can simply double-click on the key and remove the value, which is stored in encrypted form, associated with it. You can then access the options for the software without a password. Note: you may only see this key under HKLM\SOFTWARE if the DUC client has been configured to run as a system service. If it isn't look under HKEY_CURRENT_USER.

To reset the password, click on the No-IP icon in the system tray and choose Show or double-click on it. Then, click on Options and, under the Standard tab, check the box for "Require password to restore window from system tray". The text associated with that option states "This option will force the DUC to always start hidden. When you double click the system tray icon, it will ask for the password below. The only way to remove this is to uninstall and reinstall the DUC." But by removing the value from HKEY_LOCAL_MACHINE\SOFTWARE\VitalWerks\DUC\TrayPassword, which you can do if you are logged in under the administrator account, you can skip the reinstallation.

DUC 2.2.1 options

I don't see being able to remove the password via the registry as a security issue, since doing so requires administrator privileges; it's simply a shortcut that saves the time of reinstalling the software.

Note: the current version of the DUC software, which is 4.0.1 does not store the password at this location. If you configure it to run as a service, there is a HKEY_LOCAL_MACHEINE\SOFTWARE\Vitalwerks key will be created at the time you set the software to run as a service, but there is no TrayPassword key beneath it.

[/network/dns] permanent link

Wed, Oct 16, 2013 5:51 pm

Finding large files on a Ubuntu Linux system

I encountered an issue of low available disk space on a Ubuntu Linux system. The system had an old 30 GB disk drive and I needed to determine what files were consuming the most space beneath a user's home directory. So I made the user directory the working directory with cd /home/doe and used the find command.

The synatax that can be used for the find command to find all files greater than a certain size in megabytes (MB) is find starting_directory -type f -size +numM -exec ls -lh {} \;.

starting_directoryFiles in and below this directory will be checked. You can use a period to specify the current directory or specify a path name.
numA number specifying the file size. You can put a "b" at the end to use a number in bytes, a "k" for a number in kilobytes, or an "M" to use a number in megabytes, e.g. 100M for files greater than 100 megabytes in size.

The -exec parameter tells find to execute the ls -lh command, the output of which it will check for the specified file size. The -lh tells ls to use a "long" style display for each line with file sizes displayed in a more human-readable format.

E.g., the following command will search the current directory and its subdirectories recursively for all files larger than 100 MB in size.

# find . -type f -size +100M -exec ls -lh {} \;
-rw-r--r-- 1 doe doe 105M Oct 16 14:26 ./.mozilla/firefox/d0i4yvwz.default/urlclassifier3.sqlite
-rw-r--r-- 1 doe doe 634M Nov 19  2012 ./.thunderbird/p8c6q04i.default/global-messages-db.sqlite
-rw------- 1 doe doe 12G Nov 16  2012 ./.thunderbird/p8c6q04i.default/ImapMail/192.168.2.5/logs.sbd/daily
-rw------- 1 doe doe 160M Apr  8  2012 ./.thunderbird/p8c6q04i.default/ImapMail/192.168.2.5/sent-mail
-rw------- 1 doe doe 6.8G Dec 12  2012 ./.thunderbird/p8c6q04i.default/ImapMail/192.168.2.5/INBOX
find: `./.gvfs': Permission denied

The above find command displays the permissions on the files, the file owner and group, and a timestamp for the file in addition to the file name and size. If you wish to just display the file names and sizes, you can pipe the output through awk to just display the sizes and file names. The file size appears in the 5th column and the file name appears in the 9th column, so you can instruct awk to only display the data from those two columns.

# find . -type f -size +100M -exec ls -lh {} \; | awk '{print $5 " " $9}'
find: `./.gvfs': Permission denied
105M ./.mozilla/firefox/d0i4yvwz.default/urlclassifier3.sqlite
634M ./.thunderbird/p8c6q04i.default/global-messages-db.sqlite
12G ./.thunderbird/p8c6q04i.default/ImapMail/192.168.0.5/logs.sbd/daily
160M ./.thunderbird/p8c6q04i.default/ImapMail/192.168.0.5/sent-mail
6.8G ./.thunderbird/p8c6q04i.default/ImapMail/192.168.0.5/INBOX

In this case, I can see that the largest files are associated with Firefox and Thunderbird.

Note: if you wish to find a file that is exactly a certain size in MB, you would omit the plus sign, "+" before the number. E.g.,:

# find . -type f -size 105M -exec ls -lh {} \; | awk '{print $5 " " $9}'
find: `./.gvfs': Permission denied
105M ./.mozilla/firefox/d0i4yvwz.default/urlclassifier3.sqlite

If you wish to find all files below a certain size, you would prefix the number with a minus, "-".

[/os/unix/linux/ubuntu] permanent link

Tue, Oct 15, 2013 10:40 pm

Deleting a command from your bash history

The bash shell is a commonly used shell on Unix/Linux systems. The history feature which is available with the bash shell is very useful, allowing you to easily recall and reuse previously entered commands without retyping them. E.g., if you had entered a long ssh command with a lot of options, you can simply hit Ctrl-R and type ssh to recall the last ssh command entered. You can then edit the command or simply hit Enter to execute the same command again.

Occasionally, though, you may not want something you've typed at the shell prompt to remain in your history file. E.g., I've occasionally inadvertently typed a password at a point where a password prompt hadn't appeared. You can delete a particular command by using history -d num where num is the number assigned to the command in the history file, which you can see by typing history with no parameters. After deleting the command use history -w to write the update to your ~/.bash_history file to disk. E.g., If I saw that command 245 was showing the password I mistakenly typed, I could use the following commands to ensure that the password couldn't be viewed by anyone who might gain access to the history information:

$ history -d 245
$ history -w

If you wished to delete all the commands stored in the history file, you could use history -c followed by history -w.

[/os/unix/bash] permanent link

Tue, Oct 15, 2013 10:16 pm

Moving a window

On a Ubuntu Linux system, if you need a window from one area of the screen to another, you can use the keyboard shortcut Alt-F7 to move the current window. Once you've entered the keyboard shortcut, a hand icon will appear in the window and you can use the mouse, touchpad, or the cursor keys on the keyboard to move the window about. When you hit Enter, the window will remain at the position to which you've moved it.

[/os/unix/linux/ubuntu] permanent link

Mon, Oct 14, 2013 10:52 pm

Determining the file system type

If you need to determine the file system type for a mounted drive on a linux system, one method you can use is to use the command df -T.
$ df -T
Filesystem         Type     1K-blocks    Used Available Use% Mounted on
/dev/sda1          ext4     306643128 4768956 286297596   2% /
udev               devtmpfs    497680       4    497676   1% /dev
tmpfs              tmpfs       203152     812    202340   1% /run
none               tmpfs         5120       0      5120   0% /run/lock
none               tmpfs       507880     288    507592   1% /run/shm
/home/joe/.Private ecryptfs 306643128 4768956 286297596   2% /home/joe

df displays the amount of disk space available on the file system containing each file name argument. If no file name is given, the space available on all currently mounted file systems is shown. Disk space is shown in 1K blocks by default, unless the environment variable POSIXLY_CORRECT is set, in which case 512-byte blocks are used. The -T parameter results in the file system type being printed as will using --print-type.

If you know the device name, e.g., /dev/sda1, you can specify it on the command line to eliminate extraneous information.

$ df -T /dev/sda1
Filesystem     Type 1K-blocks    Used Available Use% Mounted on
/dev/sda1      ext4 306643128 4776944 286289608   2% /

You can eliminate additional extraneous information, such as the 1K-blocks, used, available, and use% fields by piping the output into awk. E.g., the following command would print only the information for columns 1, 2 and the last column, which is "mounted on".

df -T /dev/sda1 | awk '{print $1,$2,$NF}'
Filesystem Type on
/dev/sda1 ext4 /

For awk, NF represents the number of fields on a line and $NF prints the last one. For just the filesystem type, you could print only the information from column 2 and eliminate any results for the first header line by using grep -v "Type":

$ df -T /dev/sda1 | awk '{print $2}' | grep -v "Type"
ext4

References:

  1. 5 Methods to Identify Your Linux File System Type (Ext2 or Ext3 or Ext4) By Ramesh Natarajan
    Date: April 18, 2011
    The Geek Stuff

[/os/unix/linux] permanent link

Sun, Oct 13, 2013 10:10 pm

Verifying an SSL Certificate

If you have an SSL certificate on a Linux or Unix system, you can check it using the openssl command with openssl verify /path_to_certificate/certificate, e.g., as below:
# openssl verify /etc/ssl/certs/example.crt
/etc/ssl/certs/example.crt: /C=US/CN=example.com
error 18 at 0 depth lookup:self signed certificate
OK

In the case above, the country specified with the domain is the United States as shown by /C=US and the common name specified for the domain when the certificate was created and for which the certificate should be valid is example.com as shown by /CN=example.com.

The certificate is self-signed, which results in the error 18 message.

The dates for which the certificate is valid can be specified with openssl x509 -in /path_to_certificate/certificate -text | grep Not as shown below:

# openssl x509 -in /etc/ssl/certs/example.crt -text | grep Not
            Not Before: Oct 11 21:06:30 2013 GMT
            Not After : Oct 11 21:06:30 2014 GMT

In the case above, the certificate is valid from October 11, 2013 through October 11, 2014. After October 11, 2014, anyone visiting the website for which the certificate was used for HTTPS connections will be warned by his/her browser that there is a problem with the certificate because it will have expired.

X.509 specifies standard formats for public key certificates, certificate revocation lists, attribute certificates, and a certification path validation algorithm.

References:

  1. OpenSSL: The Open Source toolkit for SSL/TLS
  2. Troubleshooting with openssl
    Date: February 11, 2010
    MoonPoint Support

[/security/encryption/openssl] permanent link

Sat, Oct 12, 2013 8:20 pm

Adding a hyperlink to a spreadsheet in Google Docs

In Microsoft Excel, if you wish to add a hyperlink, i.e., a URL, to text in a cell, you can click on Insert and select Hyperlink. For a spreadsheet in Google Docs, the process is to click in the cell where you want the hyperlinked text to appear and then use a formula similar to the one below:

=hyperlink("example.com/link.html"; "Example page")

You start the formula with =hyperlink then within parentheses put the URL with or without the "http://", then a semicolon and then within parentheses the text you wish to have displayed for the hyperlink.

One thing to note, if you hover your cursor over the hyperlink, you will see that google prepends a www.google.com/url?q= at the beginning of the hyperlink you provided and additional parameters at the end such as &usd=x&usg=xxxxxx.

If you wish to remove the hyperlink, right-click on the cell and choose Remove hyperlinks. If you wish to restore the hyperlink, right-click on the cell and choose Show hyperlinks.

[/network/web/services/google] permanent link

Sat, Oct 12, 2013 7:51 pm

You may be a victim of software counterfeiting

I had to enter a new product key on a Windows 7 Professional system that was displaying the message "You may be a victim of software counterfeiting." When I clicked on a link to "go online and resolve now", I was informed "The product key used to activate Windows on your PC is already in use on another PC or has been blocked by Microsoft."

[ More Info ]

[/os/windows] permanent link

Fri, Oct 11, 2013 12:08 pm

Nobr tag deprecated

While checking an old webpage I created in February of 2009 with the W3C Validator, I received an error for the following code:

<nobr><code>%SystemRoot%\Web\Wallpaper\Ripple.jpg</code></nobr>

The error reported by the W3C Validator, which checks the validity of HTML code was as follows:

Line 387, Column 6: element "NOBR" undefined

I thought "why is the validator complaining about the NOBR tag; that's a valid tag." But at Replace NOBR Tags with CSS I discovered, though the tag may still work in major browsers, the NOBR tag has been deprecated. Though most of the commenters on the page noted they hadn't even heard of the NOBR tag, which tells a browser not to break a line of text enclosed within the <nobr> and </nobr> tags, one commenter noted "Bah humbug, KIDS these days! Never heard of nobr. Bet they’ve never played a 45rpm record or an 8-track either. lol"; I'm old enough to have done both.

The recommendation in the article was to use CSS, instead, to achieve the desired effect. E.g., a span tag such as the following:

<span style="white-space:nowrap;">

Though the article suggested creating a nobr CSS class.

.nobr { white-space:nowrap; }

Someone else suggested using { white-space:pre; }.

I decided to replace the tag with a CSS span tag so the validator wouldn't complain about it, making the line:

<span style="white-space:nowrap;"><code>%SystemRoot%\Web\Wallpaper\Ripple.jpg</code></span>

[/network/web/html/css] permanent link

Thu, Oct 10, 2013 10:11 pm

Using TeamViewer on Ubuntu Linux to manage other systems

TeamViewer provides software that will allow you to remotely control a system from another system. You can use it to remotely troubleshoot a system, share a desktop remotely, or transfer files between systems. The software runs on Android, iOS, Linux, OS X, Windows, Windows Phone, and Windows RT systems.

You don't have to install client software on a Linux system to use it as a remote management system to manage other systems. You can simply use a browser, such as Firefox, to connect to the remote system through the TeamViewer website. But installing the TeamViewer client software on a Linux system and using it will give you additional features not present in the browser-based method. E.g., you can adjust the screen resolution for the client's display of the remote desktop, take screen snapshots on the remote system, transfer files, etc.

[ More Info ]

[/os/windows/software/remote-control/teamviewer/ubuntu] permanent link

Thu, Oct 10, 2013 12:05 pm

ASCII Art

Before today's Graphical User Interfaces (GUIs), computer users were presented with an entirely text-based interface. Those old enough to remember those days may also remember ASCII art where artists constructed images entirely from the characters available to them via their keyboards, i.e., the 95 printable characters available from the 128 possible characters one could have using just 7 bits. The term "ASCII art" was used because the characters were defined by the ASCII Standard from 1963, a standard that on March 11, 1968 U.S. President Lyndon Baines Johnson mandated that all computers purchased by the U.S. government support.

An example of such art is the "smiling dragon" below.


                             |\_,
                             I,  \,        /|
                         ,__/______\ _____/ |
      ,___,            ,/__        \/      ,/
     //    \,          |/  \.      /     ,/          _______,
     II  @@  \,      ,/\____|          ,/      _____/      __\
     II        \____/      /'         I__ ____/          _/   \
     \\                        ___   //\_/             _/
      \_______                 'I`  //   \\_____       \
             \_________________/   //     \____.\       |
                 \_____            \\.         \_\____/\|
     ,                 \_           \\.          \_/    '
    / \    ______        \        ,/ \\.          \|
   /.. \_/      \__,_  __/      ,/   //     _______|
  /.....\          \_\v  \_    ,/   //     /       \
 /_______\,          \_\_     /    ||     /
                   _/ \\_\_  |__,  //    /       _______,
                 _/ \_   \_\_    \//     I   ___/        \_
               _/ \_       \ \_   \|_____I__/              \,
            __/ \_/     I   \  \_                           \_
   ,_______/  \__I      I    \_  \         ________           \
 _/ __/    \_____\      I      \  \_     _/        \           I
/ _/ /_//         \     /       \   \___/                      I
|/  // //\_____       _/         \_    \____                   I
`   ` |/ I\___ \_____/             \_       \__________________I
      `  I\___,                     /\___,                      \
      ,__I\____,           ,___     I  \________,               I
    _/    \_____,        _/    \____\_____   \______/           I
  ,/   .     \____/    ,/   .                    \______/   |__/
  |   /|   /| \_____/  |   /|   /|   _                 \____/
  |__/ |__/ |__/ \_____|__/ |__/ |__/ \__________________/

For anyone nostalgic for the days when online art was text-based, textfiles.com has a subdomain, Art Scene where you can peruse some of the old ASCII art.

Some of the oldest examples of ASCII art were creations from the 1960's by Kenneth Knowlton, a computer graphics pioneer and artist who worked at Bell Labs.

[/graphics] permanent link

Wed, Oct 09, 2013 10:39 pm

Inserting text at the beginning and end of lines with vi's regexp

The vi and Vim text editors support the use of regular expressions (abbreviated regex or regexp) for editing files.

In a regular expression ^ signifies the beginning of a line and $ specifies the end of a line. To have an operation apply to multiple lines at once, you can specify a range of lines, e.g. 16,25. To have the operation apply starting with the current line, you can use a period, ., to represent the current line, so .,25 would mean apply the operation to the current line and all subsequent lines up to and including line 25. Or you could specify that the operation should be applied from the current line to the end of the file by using $ to represent the last line in the file, e.g., .,$.

Or you can have an operation apply to every line in a file using %. E.g., the following line would insert 123 at the beginning of every line in a file.

:% s/^/123/

The s indicates a substitute operation will follow and the forward slashes, / delineate the pattern to be replaced and the replacement pattern. In the above case, the ^ indicates the beginning of the line and the replacement pattern is 123.

When you are using / to delineate the patterns, it has a special meaning and if you want to use it in a pattern you have to "escape" its special meaning with an escape character, which is the backslash, \.

E.g. to insert </td> at the end of every line from the current line to line 25, the following regular expression could be used:

.,25 s/$/<\/td>/

Supposing that I wanted to put a <td> at the beginning of each line and a </td> at the end of each line from the current line through line 25. In that case I need to store the characters in between the beginning and end of a line. You can specify text to be stored by using parentheses, ( to mark the beginning of the area on the line to be stored and ) to mark the end. Since a period, ., represents any character and an asterisk, * represents multiple occurrences, ^(.*)$ would store all the characters on the line between the beginning and end of a line. You must also "escape" the ( and ) with the backslash escape character as well. To reuse the characters you have stored you recall them with \1 ("1" is the number one). If you had multiple occurrences of characters enclosed in parentheses, the second instance could be recalled with \2.

The line below would insert a <td> at the beginning of lines 16 through 25 and a </td> at the end of the lines.

:16,25 s/^\(.*\)$/<td>\1<\/td>

If you wished to have the editor prompt you as to whether you wanted the change made on a line, you could add a /c option at the end of the command to the editor. The command below would perform the same action as the one above on every line from line 16 to the end of the file, but would prompt you at each line as to whether the change should be made.

:.,$ s/^\(.*\)$/<td>\1<\/td>/c

You would see each line highlighted one by one as you progressed through the file with the following prompt each time.

replace with <td>\1<\/td> (y/n/a/q/l/^E/^Y)?

Answering y would result in the replacement occurring whereas answering n would result in the line remaining unchanged.

In this case, there is also a simpler means for inserting the table td tags at the beginning and end of each line as below:

s/.*/<td>&<\/td>

Again the .* represents the search pattern, which is every character on the line. The ampersand, &, also has a special meaning; it is the text that matches the search pattern, so putting it between the two tags results in all the text originally on the line remaining on the line. The / at the end of the replacement pattern can be eliminated if there is nothing following it such as a /c.

References:

  1. Adding characters at the start and end of each line in a file
    May 2, 2012
    Stack Overflow
  2. Search and replace
    Vim Tips Wiki

[/software/editors/vi] permanent link

Wed, Oct 09, 2013 8:56 pm

Survey and Correlation Data from 2013 Search Engine Ranking Factors

At 2013 Search Engine Ranking Factors Survey & Correlation Data, I found some interesting information from a survey of search marketers regarding how search engines may rank websites. Many of the factors that may lead to an increase in page ranking didn't surprise me, but some of those that were listed as resulting in a decrease in a page's ranking did surprise me, e.g., the number of characters in a page's title and the use of hyphens in URLs, which I often use. I've factors expected to have negative results below:

Page Has Twitter Card Markup -0.02
# of Large Images (Greater Than Or Equal to 1024X768px) -0.02
Folder Depth of URL (# of Trailing Slashes) -0.02
# of Videos On Page -0.03
Page Contains Google+ Authorship Markup -0.03
# of Google Adsense Slots in The Page -0.03
Domain has Numbers (example123.com) -0.03
# of Hyphens in Domain Name -0.03
Total Area of Adsense Slots on Page -0.04
# of Characters in the Title -0.04
URL Contains Hyphens -0.04
Total Length of the Full Domain (www.subdomain.pld.com) -0.09
URL Length in Characters -0.10
Response Time of Page in Seconds -0.10

[/network/web/search/SEO] permanent link

Tue, Oct 08, 2013 10:39 pm

Keeping an SSH connection alive with ServerAliveInterval

While working on a Ubuntu Linux laptop, I found my SSH sessions to a Linux server were being dropped after a few minutes when I switched to other tasks on the laptop. Using the ServerAliveInterval parameter when establishing the SSH connection allowed me to alleviate the problem of idle connections being dropped. E.g., I could use:
$ ssh -o ServerAliveInterval=5 -o ServerAliveCountMax=1 jdoe@a.example.com

Setting the ServerAliveInterval to 5 will send a "heartbeat" signal to the server every 5 seconds to keep the connection alive. Setting ServerAliveCountMax to 1 means that when the time comes to send another keepalive signal, if a response to the last one wasn't received, then the connection will be terminated.

The TCPKeepAlive setting could also be used, but, if there is an intervening firewall it might be configured to drop the empty TCP ACK packets that would be sent. The ServerAliveInterval setting sends data through the SSH connection, so from the perspective of the firewall the packets are the same as any other encrypted packet.

References:

  1. How does tcp-keepalive work in ssh?
    Date: March 12, 2012
    Unix & Linux Stack Exchange
  2. Keeping Your SSH Sessions Alive Through Pesky NAT Firewalls
    Date: June 3, 2005
    Steve Kehlet's Pages

[/network/ssh] permanent link

Mon, Oct 07, 2013 8:46 pm

Main Id element in Blosxom's story.html

I upgraded Blosxom today from version 2.0 to 2.1.2. I normally validate the HTML code in webpages and blog entries I've created with the W3C Markup Validation Service, which is a free service provided by the World Wide Web Consortium (W3C) for verifying that HTML code in a file you upload to the service, or at a URL you request be checked by the service, is correct. I've always gotten errors similar to the one below when I've checked blog entries, but have never taken the time to figure out how to fix the problem, which I thought was in the Blosxom Perl code.

Line 210, Column 10: ID "MAIN" already defined

<div id="main">

An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).

I still got those errors when checking blog entries with the new version, but decided that I should deal with the problem at last. I found that the problem was within the story.html file I was using for Blosxom. I hadn't changed that file when I upgraded Blosxom. The file had the following contents:

<div id="main">
<a name="$fn"><b>$title</b></a>
<br>
<br>
$body
<p>
[<a href="$url$path">$path</a>]
<a href="$url/$yr/$mo_num/$da#$fn">permanent link</a>
</p>
</div>

Since that was specifying that a <div id="main"> be used for each blog entry, whenever I would check a Blosxom blog page with multiple entries, at least one of the error messages would be reported by the W3C Markup Validation Service, since "id=main" should appear only once within a webpage since it should specify a style in CSS for a single, unique element on a page. If there were 10 entries on a page, then I would see 9 such error messages reported.

So I changed "id=main" to "class=main", since unlike "id", the class selector is used to specify a style for a group of elements on a page - see The id and class Selectors for an explanation of the two elements.

In the style.css file I specified for the blog in the head.html file for Blosxom, I inserted the following line just to have something there that I could alter later if I wanted to format entries differently. There hadn't been an element for "main" there previously.

div.main {text-align:left;}

In the head section of the head.html file, I had the following line to bring in the stylesheet I use for the blog.

<link rel="stylesheet" href="/css/style.css" type="text/css">

[/network/web/blogging/blosxom] permanent link

Mon, Oct 07, 2013 7:40 pm

Blosxom upgrade

Today while checking the server's Apache error log file, I noticed error messages that appeared to be related to Blosxom, which I've been using for this blog, which runs on a Linux server, for almost 9 years now. I found the error messages had been occurring since at least the beginning of the year and they may have been occurring for a much longer period. When I checked on the error messages, I found a February 3, 2013 posting at [Blosxom] server error where someone reported similar error messages, I found someone responding here that the messages could be due to the absence of the XML::Parser Perl module. The responder mentioned that the module is reqiured by the atomfeed plugin, which I don't use. His message also referenced the categories plugin, which I don't have, either. But I thought I would check on whether the XML::Parser module was present on the system. It wasn't, so I installed it, but that didn't stop the error messages from occurring in the Apache server's log file. I then noticed that Blosxom was not up-to-date. I had version 2.0 on the system while the current version is 2.1.2.

Blosxom is available from SourceForge at blosxom :: the zen of blogging. Upgrading from the 2.0 version to the 2.1.2 version was very easy. I made a backup copy of the existing blosxom script in case anything went wrong. I then unzipped and untarred the gunzip blosxom-2.1.2.tar.gz file I downloaded.

gunzip blosxom-2.1.2.tar.gz
tar -xvf blosxom-2.1.2.tar

The only file I needed was the blosxom one, which I edited to set the configurable variables, which are at the top of the file, to those I had for the 2.0 version. I also set the plugins directory variable, plugin_dir, in the Plugins (Optional) section of the file, which is after the Configurable variables section, since I'm using a calendar plugin for Blosxom. I then copied the new blosxom file over top the old one and then verified that the blog was still working as it had been.

When I checked the latest blog entry with the W3C Markup Validation Service, which allows one to verify that a webpage is coded correctly in HTML, I saw the warning below:

Character Encoding mismatch!

The character encoding specified in the HTTP header (utf-8) is different from the value in the <meta> element (iso-8859-1). I will use the value from the HTTP header (utf-8) for this validation.

The issue was reported as a warning rather than an error and shouldn't effect the display of entries in anyone's browser, but I thought I should fix it. I found the following line in the head.html file for Blosxom.

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

I replaced it with the following line:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

Since I didn't change head.html as part of the upgrade, that issue has likely always been there; I don't know why I never noticed it before when checking blog entries with the W3C Markup Validation Service.

The upgrade didn't eliminate the error messages in the Apacehe server log file, but at least I am now at the current version of Blosxom.

[/network/web/blogging/blosxom] permanent link

Mon, Oct 07, 2013 5:16 pm

Perl Module XML::Parser

I installed the Perl module XML::Parser, which is a Perl module for parsing XML documents.
# perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.7602)
ReadLine support available (try 'install Bundle::CPAN')

cpan> install XML::Parser
...
cpan> exit

After exiting from cpan, I checked on the module installation:

# perldoc -l XML::Parser
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/XML/Parser.pm

During the installation I was advised that a later version of CPAN was available for the system, so I updated it as well, which took quite awhile. I accepted the default answers for all of the yes/no questions posed during the installation.

cpan> install Bundle::CPAN
...
cpan> reload cpan
.......................................................................................................................................................................................................
199 subroutines redefined


cpan> exit

[/languages/perl] permanent link

Mon, Oct 07, 2013 4:53 pm

Which Perl modules are installed on a system

There are a number of methods you can use to determine which Perl modules are installed on a system. I use a script, list-modules.pl. To use the script change the permissions on it so that it can be executed with chmod 755 list-modules.pl. The script produces an HTML file as output. You can use perl list-modules.pl >list-modules.html to produce the file or you can put the script in your cgi-bin directory on a webserver and access it via a browser to see the installed modules on the system (example output).

Another script that can be run from a shell prompt to show you the installed Perl modules on a system is find-modules.pl. To use it, you can change the permissions with chmod and then simply use ./find-modules.pl. (example output).

Another means of checking for installed Perl modules is through Lister.pm, which was developed by Brian D. Foy and which can be found at GitHub at app-module-lister (example output). Lister.pm can be run at a shell prompt with perl Lister.pm, after changing permissions on the file, e.g. chmod 755 Lister.pm, or you can also make the results available through a webpage, for instance, if you don't have access to a shell prompt on a webserver via SSH, by putting the file in a cgi-bin directory on the server and renaming the file to something like Lister.cgi, if scripts need the .cgi extension on the server. It can provide version information for some modules.

Another method is to use the perldoc module_name command, if perldoc is installed on the system. You should see documentation information if a module is installed, but the message "No documentation found for module_name", if the module isn't installed.

$ perldoc XML::Parser
No documentation found for "XML::Parser".

You can also use the -l argument to perldoc, which will report the location of the file for the module, if one is present or also report "No documentation found", if the module can't be found.

# perldoc -l LWP::Simple
/usr/lib/perl5/vendor_perl/5.8.8/LWP/Simple.pm

Note: The perldoc method will show modules installed via CPAN, but may not show modules that have been installed manually.

References:

  1. List Perl Modules
    Date: November 28, 2005
    MoonPoint Support
  2. How do I get a list of installed CPAN modules?
    Date: September 22, 2008
    Stack Overflow
  3. App-Module-Lister
    The CPAN Search Site

[/languages/perl] permanent link

Sun, Oct 06, 2013 6:11 pm

Adding CometChat to an SMF Theme

A family member uses CometChat on a Simple Machines Forum (SMF) forum to allow members of the forum to chat with one another online when they are visiting the forum. I installed a couple of Halloween themes for the forum, but she found that CometChat was not available with the new themes, though it was available with the default theme.

Checking changes that had been made quite to that theme's files when I installed CometChat on the forum a few years ago, I found that the installation process for CometChat had modified the index.template.php file for the default theme, which was stored in the Themes/default directory for the forum.

I found the following PHP code in that file:

echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
<link type="text/css" href="/cometchat/cometchatcss.php" rel="stylesheet" charset="utf-8"> >script type="text/javascript" src="/cometchat/cometchatjs.php" charset="utf-8"></script>

Since the CometChat additions to the file occurred immediately after the head tag, to make CometChat available in the new theme, I added the following immediately after <head> in the Themes/Halloween/index.template.php file under the forum's directory on the server for the forum:

<link type="text/css" href="/cometchat/cometchatcss.php" rel="stylesheet" charset="utf-8"> <script type="text/javascript" src="/cometchat/cometchatjs.php" charset="utf-8"></script>

She was then able to log into the forum and change the default theme to the Halloween theme with CometChat now being available with that theme. I made a similar change to othere themes she wanted to use for the forum by updating the index.template.php file in the appropriate theme directory.

Note: If you see '; immediately after <head>, you need to put the code for CometChat between the <head> and the ';.

[/network/web/forums/smf] permanent link

Sun, Oct 06, 2013 1:29 pm

Check a Domain's Reputation

There are a number of companies that provide a means of checking a domain's reputation. E.g., perhaps you may wish to determine if a particular domain name is associated with the transmission of spam or want to know whether it is safe to visit a particular website. Often antispam and antivirus vendors will allow you to lookup an IP address or fully qualified domain name (FQDN) , e.g. somesite.example.com to make that determination through a website they provide.

[ More Info ]

[/network/Internet/domains] permanent link

Sat, Oct 05, 2013 9:17 pm

Finding the largest files in a directory

To find the largest files in a directory on a Linux system, you can use ls -lS to order the directory listing by size with the largest files at the top of the list and the smallest at the bottom. The command will show the size of files in bytes, so you may wish to add the h parameter to display file sizes in a more human-readable format, such as kilobytes, megabtyes, etc. depending on the file size, i.e., ls -lSh. Often, you will wish to have the largest files displayed at the bottom of the list. To do so, add the r parameter, i.e., lS -lShr.
$ ls -lShr /usr/lib/xorg/modules
total 1.2M
drwxr-xr-x 2 root root 4.0K 2012-04-23 12:01 multimedia
drwxr-xr-x 2 root root 4.0K 2011-10-12 10:30 input
drwxr-xr-x 2 root root 4.0K 2012-04-23 12:01 extensions
drwxr-xr-x 2 root root 4.0K 2012-04-23 12:16 drivers
-rw-r--r-- 1 root root  18K 2011-10-19 01:19 libfbdevhw.so
-rw-r--r-- 1 root root  22K 2011-10-19 01:19 libvbe.so
-rw-r--r-- 1 root root  26K 2011-10-19 01:19 libshadow.so
-rw-r--r-- 1 root root  27K 2011-10-19 01:19 libvgahw.so
-rw-r--r-- 1 root root  34K 2011-10-19 01:19 libshadowfb.so
-rw-r--r-- 1 root root  98K 2011-10-19 01:19 libexa.so
-rw-r--r-- 1 root root 138K 2011-10-19 01:19 libfb.so
-rw-r--r-- 1 root root 152K 2011-10-19 01:19 libint10.so
-rw-r--r-- 1 root root 178K 2011-10-19 01:19 libwfb.so
-rw-r--r-- 1 root root 414K 2011-10-19 01:19 libxaa.so

[/os/unix/linux] permanent link

Fri, Oct 04, 2013 5:43 pm

Copying Themes from One Windows 7 System to Another

If you wish to copy themes from one Windows 7 system to another, copy the contents of \Users\Username\AppData\Local\Microsoft\Windows\Themes, where Username is the account name for the account from which you wish to copy the themes. If the new system doesn't have a Themes under the \Users\Username\AppData\Local\Microsoft\Windows\ directory, because no themes have been added, just copy the Themes directory itself from the source system to the destination system. Afterwards, on the destination system, you can right-click on an empty area of the desktop, select Personalize, then select the theme you wish to use.

[/os/windows/win7] permanent link

Thu, Oct 03, 2013 10:47 pm

Restoring terminal scrollbar

While using the terminal application on a Ubuntu 11.10 system, I found that the scrollbar that will appear on the right side of a terminal window had disappeared and that I couldn't get it to reappear. The problem occurred after I was disconnected from terminal sessions I had established within several tabbed windows in the terminal application.

At Terminal output scrolling is gone (Headless 11.10 Server, Upgraded from 10.10), I found a solution that worked to restore the scrollbar. By using the less command on a file that was long enough to require paging to view the entire file, I was able to restore the ability to scroll in the terminal windows. I issued a command less longfile.txt and then paged through the file and exited normally from less. I was then able to see the scrollbar again. I had to do that for each terminal window.

On another occasion, I found that using less wouuldn't resolve the problem but using more, e.g., more longfile.txt, resolved the problem.

[/os/unix/linux/ubuntu] permanent link

Wed, Oct 02, 2013 10:02 pm

Vertically aligning text to an image

To vertically align text with the middle of an image in HTML code, you can add a style parameter with a vertical-align property to the img tag, e.g. style="vertical-align: middle;" to align the text with the middle of the image. You can use "top" or "bottom", instead, if you wished to have the text appear at the side of the image, but aligned with the top or bottom of the image.

<img src="Schloss-Moyland-2013-02.jpg" alt="Moyland Castle, side view" width="500" height="691" style="padding:10px; vertical-align: middle;"> <a href="http://en.wikipedia.org/wiki/Moyland_Castle"> Moyland Castle</a>, side view.

E.g., the above code would produce the following result:

Moyland 
Castle, side view Moyland Castle, side view.

Note: the above image is available at Wikimedia Commons here. It was a featured picture for October 2, 2013. The image was provided by Tuxyso and is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license, so anyone is free to use it or redistribute it.

[/network/web/html/css] permanent link

Tue, Oct 01, 2013 10:35 pm

Determining the version of Ubuntu on a system

To determine the version of Ubuntu Linux on a system from a command prompt, you can use the lsb-release -a command.
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 11.10
Release:	11.10
Codename:	oneiric

[/os/unix/linux/ubuntu] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo