MoonPoint Support Logo

 

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



Advanced Search
June
Sun Mon Tue Wed Thu Fri Sat
     
   
2016
Months
Jun


Wed, Jun 29, 2016 10:18 pm

Modifying an existing Windows Firewall rule

You can determine if the Microsoft Windows Firewall is enabled from a command line interface (CLI) by opening a command prompt window and using the netsh command netsh advfirewall show currentprofile. If it is enabled, you will see the "state" value is set to "ON".

C:\Users\nell>netsh advfirewall show currentprofile

Public Profile Settings:
----------------------------------------------------------------------
State                                 ON
Firewall Policy                       BlockInbound,AllowOutbound
LocalFirewallRules                    N/A (GPO-store only)
LocalConSecRules                      N/A (GPO-store only)
InboundUserNotification               Enable
RemoteManagement                      Disable
UnicastResponseToMulticast            Enable

Logging:
LogAllowedConnections                 Disable
LogDroppedConnections                 Disable
FileName                              %systemroot%\system32\LogFiles\Firewall\pfirewall.log
MaxFileSize                           4096

Ok.


C:\Users\nell>

If you want to check on whether inbound access is permitted through the firewall for a particular port or application, you can search for it with a netsh advfirewall firewall show rule name=all dir=in command. Since there will likely be many lines of output, you can filter the output for a particular port or application name by piping it to the find command. E.g., if I want to check on whether a rule is in place for an SSH server application, I can have find look for "SSH".

C:\Users\nell>netsh advfirewall firewall show rule name=all dir=in | find "SSH"
Rule Name:                            Bitvise SSH Server (TCP/IPv6 22)
Grouping:                             Bitvise SSH Server
Rule Name:                            Bitvise SSH Server (TCP/IPv4 22)
Grouping:                             Bitvise SSH Server

C:\Users\nell>

[ More Info ]

[/os/windows/software/security/firewall] permanent link

Tue, Jun 28, 2016 1:05 pm

Using iperf on a Microsoft Windows system

Iperf is a free open-source software tool that provides a capability to measure the throughput between two hosts using both Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) data streams. The software can be run in either server or client mode. To determine the network bandwidth available between two systems, you can run iperf in server mode on one of the systems and in client mode on the other.

The software is available for a variety of operating systems. You can download iPerf binaries from iPerf - The network bandwidth measurement tool for the following operating systems:

  1. Microsoft Windows
  2. Android
  3. iPhone / iPad
  4. Apple OS X
  5. Download iPerf for Ubuntu / Debian / Mint
  6. Download iPerf for Fedora / Red Hat / CentOS
  7. Download iPerf for openSUSE
  8. Download iPerf for Arch Linux
  9. Download iPerf for FreeBSD

[ More Info ]

[/os/windows/software/network/performance] permanent link

Mon, Jun 27, 2016 10:27 pm

Using an "or" operator with the findstr command

You can perform logical "or" operations on Microsoft Windows systems with the findstr command using the pipe character, i.e., |, to separate the terms you wish to search on. E.g., if I wanted to filter the output of the netstat command to search for any lines that contain either ":21", ":22", or ":990", I could use the command below.
C:\>netstat -an | findstr ":21 | :22 | :990"
  TCP    0.0.0.0:21             0.0.0.0:0              LISTENING
  TCP    0.0.0.0:22             0.0.0.0:0              LISTENING
  TCP    0.0.0.0:990            0.0.0.0:0              LISTENING

C:\>

References:

  1. FINDSTR
    SS64 | Command line reference

[/os/windows/commands] permanent link

Sun, Jun 26, 2016 9:38 pm

Safari Can't Install Evernote Extension

After downloading the Evernote Web Clipper extension from Evernote's website at GET WEB CLIPPER FOR SAFARI, I tried to install it for Safari 9.1.1 (10601.6.17) on a MacBook Pro laptop running OS X Yosemite (10.10.5), but I encountered the error message below when I double-clicked on the downloaded Evernote.6.8.1.safariextz file.

Safari can't install this extension

An error occurred while installing the extension "Evernote Web Clipper".

I tried several times with the same results. I redownloaded the file from Evernote's website twice more just to eliminate the possibility of file corruption during the download process, but the results remained the same each time. I then tried clicking on Safari from Safari's menu and selecting Preferences, then Extensions, which showed that there were no extensions installed.

[ More Info ]

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

Sat, Jun 25, 2016 11:11 pm

Bing search history

As Google does with its search engine, Microsoft maintains a history of all the searches you have performed from its search engine while logged into a Microsoft account, e.g., Hotmail, Outlook.com, etc. You can view the history of your searches conducted with the Bing search engine by clicking on Search History at the top of the Bing web page. If you click on that link, you will see links for "Recent searches" and for "Frequent searches".

[ More Info ]

[/network/web/search] permanent link

Thu, Jun 23, 2016 11:31 pm

Google search history

If you use Google's search engine to search the web, if you're logged into a Google account, such as a Gmail account, while performing the searches, you can see a history of the searches you have performed by visiting https://history.google.com/history/ while logged into that same account. There you will see a graph displaying the number of searches you've performed over the last few days and the total number of searches during that time period, plus your top search clicks. You can change the time period displayed to be last week, last month, last year, or all time.

[ More Info ]

[/network/web/search] permanent link

Wed, Jun 22, 2016 11:15 pm

Python - Checking times and dates

In Python, you can use a function called datetime.now() to retrieve the current date and time. First you need to import the datetime library so that it can be used in the script, which can be done with from datetime import datetime. You can then display the current date and time with print datetime.now(). E.g.:

$ python
Python 2.7.10 (default, Jul 14 2015, 19:46:27) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> 
>>> print datetime.now()
2016-06-22 12:34:06.719688
>>>

You can also use datetime.today().

>>> print datetime.today()
2016-06-22 14:31:26.736321
>>>

The time is in hours, minutes, seconds, and fractions of a second.

[ More Info ]

[/languages/python] permanent link

Wed, Jun 22, 2016 12:02 am

Open sites list for a Chrome process on OS X

Chrome on a MacBook Pro laptop running OS X Yosemite (10.10.5) that I was using became unresponsive. Activity Monitor showed a Google Chrome process was using about 100% of the CPU cycles. I wanted to see what web sites the process was accessing in the browser tabs associated with the process. One way to do so is to double-click on the Chrome process in the Activity Monitor, which will open a smaller window showing information on that process. Click on the Open Files and Ports tab on that window. You can then copy the information you see in that window into a file and, using grep, extract all of the lines containing the IP address of the system, which will provide a list of sites accessed by the Chrome process.

[ More Info ]

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

Mon, Jun 20, 2016 10:47 pm

Changing PC sleep setting under Windows 10

The default settings for powering off the monitor and PC under Microsoft Windows 10 are to turn off the screen after 10 minutes with no keyboard nor mouse activity when the system is plugged into a power outlet and to put the system to sleep when plugged in after 30 minutes of no keyboard nor mouse activity. You can view and modify the settings by right-clicking on the desktop in an area unoccupied by any shortcut and selecting Display Settings, then clicking on Power & Sleep.

[ More Info ]

[/os/windows/win10] permanent link

Sun, Jun 19, 2016 10:44 pm

Determining the port to which a system is connected by MAC address

If you need to know the port on a Cisco switch to which a particular host is connected and know the media access control (MAC) address, you can determine the port to which it connects using a show mac address-table address command. You can view all of the entries in the MAC address table with the command show mac address-table, but if you know the MAC address of the relevant system and only wish to determine the port on the switch to which it connects, you can specify its MAC address with the command show mac address-table address followed by the 48-bit MAC address, which can be in the form xx.xx.xx.xx.xx.xx or xxxx.xxxx.xxxx .
Saturn>show mac address-table address 50:e5:49:d8:13:37
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   1    50e5.49d8.1337    DYNAMIC     Fa0/19
Total Mac Addresses for this criterion: 1
Saturn>

With the port number, you can determine details for the interface to which the system connects using a show interfaces port where port is the port identified by the show mac address-table address command.

[ More Info ]

[/hardware/network/switch/cisco] permanent link

Sat, Jun 18, 2016 10:59 pm

Dovecot "Permission denied" error in maillog file

While checking on another problem, I noticed a lot of "Permission denied" messages in a maillog file in the /var/log directory. The errors were occurring whenever one particular user checked her email, which was being checked by Microsoft Outlook on her PC.

# grep "Permission denied" /var/log/maillog.1 | tail -n 3
Jun 17 18:56:08 moonpoint dovecot: pop3(nell): Error: open(/home/nell/mail/.imap
/INBOX/dovecot.index.log) failed: Permission denied (euid=503(nell) egid=1002(ne
ll) missing +x perm: /home/nell/mail/.imap/INBOX, dir owned by 0:0 mode=0700)
Jun 17 19:26:44 moonpoint dovecot: pop3(nell): Error: open(/home/nell/mail/.imap
/INBOX/dovecot.index.log) failed: Permission denied (euid=503(nell) egid=1002(ne
ll) missing +x perm: /home/nell/mail/.imap/INBOX, dir owned by 0:0 mode=0700)
Jun 17 19:57:29 moonpoint dovecot: pop3(nell): Error: open(/home/nell/mail/.imap
/INBOX/dovecot.index.log) failed: Permission denied (euid=503(nell) egid=1002(ne
ll) missing +x perm: /home/nell/mail/.imap/INBOX, dir owned by 0:0 mode=0700)
#

Checking the permissions and ownership on the referenced mail/.imap/INBOX file for her account and comparing it to other accounts, I saw that root was listed as the owner and the group for the file under her home directory, but for other users the same file under their home directory was owned by the user's account and the group matched the user name for the user.

[ More Info ]

[/network/email/dovecot] permanent link

Fri, Jun 17, 2016 6:03 pm

Dovecot POP3 Login Log Entries

I needed to know the IP address a user had been connecting from to access his email on a POP3 email server running the open-source Dovecot email software. By default, Dovect logs to syslog using mail facility, but you can change that by modifying the syslog_facility setting. The syslog configuration is often in /etc/syslog.conf or /etc/rsylog* files. E.g., on the CentOS 7 mail server on which Dovect was running the configuration was in /etc/rsyslog.conf, which had the following line within it:
# Log all the mail messages in one place.
mail.*                                                  -/var/log/maillog

You can find the location of dovecot logs using the doveadm log find command.

# doveadm log find
Looking for log files from /var/log
Debug: /var/log/maillog
Info: /var/log/maillog
Warning: /var/log/maillog
Error: /var/log/maillog
Fatal: /var/log/maillog
#

Since the user had not connected from his PC to check his email account for several days, I looked in a maillog file from several days ago to determine the IP address from which he connected then and saw the following.

# grep benny /var/log/maillog.4 | grep pop3 | grep "rip="
Jun 13 02:57:23 moonpoint dovecot: pop3-login: Login: user=<benny>, method=PLAIN
, rip=172.25.2.7, lip=192.168.0.5, mpid=21212, secured, session=<RDFhZiM1NgBILQJI>
Jun 13 04:59:10 moonpoint dovecot: pop3-login: Login: user=<benny>, method=PLAIN
, rip=172.25.2.7, lip=192.168.0.5, mpid=32662, secured, session=<REgGGiU1CgBILQJI>
Jun 13 17:53:04 moonpoint dovecot: pop3-login: Login: user=<benny>, method=PLAIN
, rip=172.25.2.7, lip=192.168.0.5, mpid=30622, secured, session=<6ka06S81BwBILQJI>
Jun 13 18:23:14 moonpoint dovecot: pop3-login: Login: user=<benny>, method=PLAIN
, rip=172.25.2.7, lip=192.168.0.5, mpid=1243, secured, session=<Gl+PVTA1LABILQJI>
Jun 13 18:53:23 moonpoint dovecot: pop3-login: Login: user=>benny>, method=PLAIN
, rip=172.25.2.7, lip=192.168.0.5, mpid=3769, secured, session=<hqpuwTA1TABILQJI>
#

[ More Info ]

[/network/email/dovecot] permanent link

Thu, Jun 16, 2016 11:34 pm

Viewing a RIFF image file

After downloading an image file from Google Drive to a MacBook Pro laptop running OS X 10.10.5, I found when I tried to open the file in the Preview application on the Mac, I couldn't open it with that application. I then right-clicked on the file in the Finder and chose "open with" then "other" and then tried the Photos application, but it couldn't open the file either. So I used the file utility, which can determine the format type for files based on a magic number contained within a file.
$ file Map
Map: RIFF (little-endian) data

The file program indicated that the file I downloaded, which was a campus map, was in the Resource Interchange File Format (RIFF), a file container format that was introduced by Microsoft and IBM in 1991; it was the default format for Microsoft Windows 3.1 multimedia files. The format is based on the Interchange File Format (IFF) introduced by Electronic Arts for the Commodore Amiga Amiga in 1985. However, whereas multi-byte integers are stored in big-endian format, which is a format native to the 68k processor series used in Amiga and Apple Macintosh computers, RIFF files use the little-endian format, which is why the file utility reports "RIFF (little-endian) data".

[ More Info ]

[/software/file_formats/riff] permanent link

Wed, Jun 15, 2016 10:33 pm

Searching for text in the subject of a message with OWA

Using Outlook on the web, aka Outlook Web App (OWA)and Outlook Web Access, to check my email on a Microsoft Exchange server using a web browser, I can use the search function to search for a string that may be part of a word in the subject of a message. But I can only search for that string if it occurs at the beginning of a word. E.g., if I'm looking for any message that has "CRQ000000473568" within the subject of a message, I can use either of the two searches below to successfully find such messages.

Subject: CRQ000000473568
Subject: CRQ*

OWA search

I can use the asterisk as a wildcard character to represent one or more of any character.

But if I use either of the following search parameters, the relevant messages won't be found.

Subject: *473568
Subject: *473568*

The search function doesn’t provide a search option that will allow you to search for text in the middle or end of a word. It only find items that contain a word that begins with your search string.

[ More Info ]

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

Tue, Jun 14, 2016 10:12 pm

Count Records with SQL

I needed to count the number of records in a table I use for tracking tasks within an SQLite database. The table is named "Tasks" and, in addition to other columns has a Received column, where I record when I received a task and an Approved column, where I record the date I approved the task. If I only want to see the task numbers and the dates on which I received and approved tasks and I want the records ordered by approval date, I can use the following Structured Query Language (SQL) command:
sqlite> select Task, Received, Approved from Tasks ORDER BY Approved;
TAS000000204813|2016-04-20|
TAS000000160855|2016-06-09|
TAS000000302389|2016-06-08|
TAS000000289579|2016-05-04|2016-05-06
TAS000000297385|2016-05-11|2016-05-11
TAS000000294896|2016-05-04|2016-05-12
TAS000000294136|2016-05-04|2016-05-12
TAS000000291991|2016-05-04|2016-05-13
TAS000000289882|2016-05-10|2016-05-13
TAS000000293978|2016-05-04|2016-05-16
TAS000000262109|2016-05-18|2016-05-19
TAS000000293289|2016-05-24|2016-05-24
TAS000000300934|2016-05-18|2016-05-24
TAS000000192984|2016-05-20|2016-05-24
TAS000000268274|2016-05-19|2016-05-24
TAS000000280549|2016-05-24|2016-05-24
TAS000000289548|2016-05-18|2016-05-24
TAS000000291959|2016-05-24|2016-05-24
TAS000000293970|2016-05-26|2016-05-26
TAS000000280569|2016-05-31|2016-05-31
TAS000000297347|2016-05-31|2016-05-31
TAS000000283262|2016-06-01|2016-06-07
TAS000000304021|2016-06-01|2016-06-07
TAS000000311853|2016-06-01|2016-06-07
TAS000000311293|2016-06-01|2016-06-07
TAS000000312411|2016-06-08|2016-06-08
TAS000000309299|2016-06-09|2016-06-09
TAS000000270128|2016-06-09|2016-06-09
TAS000000255397|2016-06-13|2016-06-13
TAS000000295302|2016-06-09|2016-06-14
TAS000000299922|2016-06-08|2016-06-14
TAS000000298570|2016-06-14|2016-06-14
TAS000000315505|2016-06-08|2016-06-14
sqlite>

I can count all of the records in the table with the SQL command below:

sqlite> select COUNT(*) FROM Tasks;
33
sqlite>

Within the table, I have a field named "Approved" that I use to track the approval date for tasks; I store the date as a text field, since SQLite doesn't have a storage class specifically for dates. If I want to know how many tasks I've approved since a specific date, I can use a command like the one below to determine the number approved since the specified date.

sqlite> select COUNT(*) FROM Tasks WHERE Approved > "2016-06-07";
8
sqlite>

[ More Info ]

[/software/database/sqlite] permanent link

Mon, Jun 13, 2016 10:37 pm

Using OpenSSL to verify a security certificate for an email server

You can use an OpenSSL s_client -connect command to check a certificate on a remote server by specifying the remote system in the form x.x.x.x:port where x.x.x.x is the IP address of the remote system and port is the relevant port or you can use the fully qualified domain name (FQDN) in place of the IP address. E.g., I used the command below to check the status of a certificate I obtained from Let's Encrypt, a "certificate authority that launched on April 12, 2016 that provides free X.509 certificates for Transport Layer Security (TLS) encryption via an automated process designed to eliminate the current complex process of manual creation, validation, signing, installation, and renewal of certificates for secure websites." The server I checked functions as a POP3S server using port 995, so that was the port I specified.

[ More Info ]

[/security/encryption/openssl] permanent link

Sun, Jun 12, 2016 10:58 pm

Using tcpdump to monitor connectivity to a host excluding a port

There are occasions where I need to monitor all traffic between two hosts with tcpdump, but I want to exclude the traffic for a particular port. E.g., I may be logged into a system via Secure Shell (SSH), but don't want to have the output of tcpdump cluttered with the SSH traffic. If you want to view traffic between the host you are logged into and a remote system, you can specify the remote system using tcpcump host remote_host where remote_host is the fully qualified domain name (FQDN) of the remote system, e.g. system1.example.com, or the IP address of the remote system. You can monitor only traffic to/from a particular port using the port port_number parameter where port_number is the relevant port. E.g., if I wanted to monitor only SSH traffic with the host system1.example.com for the standard SSH port, port 22, I could use the command below:
# tcpdump host system1.example.com and port 22

If you wish to have tcpdump monitor traffic based on two parameters, e.g., host name and port number in the example above, put the word and between the parameters. However, if I wanted to monitor all traffic to/from system1.example.com, except for traffic using port 22, I can put not before the word port.

# tcpdump host system1.example.com and not port 22

[/os/unix/programs/network/tcpdump] permanent link

Sat, Jun 11, 2016 10:59 pm

FreePDF Printer Driver

Microsoft Windows versions prior to version 10 don't come with a built-in printer driver to create Portable Document Format (PDF) files from any application. You can find many free PDF printer driver programs on the Internet for Microsoft Windows systems, but you need to be very careful when installing many of them, since they come bundled with adware, though, if you choose a custom installion when installing the software, you may be able to avoid the adware being installed along with the software you want. E.g., the February 8, 2014 article Controversial Advertising Program Now Being Embedded in More Software mentions that PrimoPDF, which I've used in the past, is bundled with OpenCandy, adware software that many antivirus programs will flag. If you are careful during the installation, you should be able to avoid having any OpenCandy software installed as well as the PDF printer driver, though. PrimoPDF is not the only printer driver utility for Microsoft Windows systems that comes bundled with adware, though. The August 20, 2014 article by Justin Pot titled 7 Best Tools To Print To PDF lists other tools that will allow you to print to PDF from any application on a Microsoft Windows system that also come with adware, aka "crapware", e.g. CutePDF, which I've also used previously. Again, if you are careful during installation, you should be able to avoid installing the other sofware, though.

If you would like to avoid having to worry about inadvertently installing adware with such a tool, though, Stefan Heinz offers a free program, FreePDF, which I've used on a Microsoft Windows 8 system, that provides a printer driver that will allow you to print from any application run under Microsoft Windows to a PDF file. Unlike much of the other free PDF printer driver software, you don't need to worry about adware being installed with the software. The developer states at What is FreePDF:

Freepdf.exe really is free - no hidden costs and no advertising. No spyware, no automatic updates. Simply because I also do not like this in other "freeware".

[ More Info ]

[/os/windows/software/pdf] permanent link

Fri, Jun 10, 2016 10:51 pm

How to get cat to process a file name provided in the output of another command

I wanted to pipe the output of the find command through the tail command and then pipe its outout into the cat command. E.g., I used the find command to locate the manual page for the curl command on a MacBook Pro running OS X as shown below:
$ find /usr/share/man -name curl\*
/usr/share/man/man1/curl-config.1
/usr/share/man/man1/curl.1
$

There were two man pages with "curl" as part of the file name, but I only wanted the second one, so I piped the output of find into tail, selecting the last line of output only with the -n 1 option.

$ find /usr/share/man -name curl\* | tail -n 1
/usr/share/man/man1/curl.1
$

I then wanted to have cat process that file name. I could have just typed the directory path and file name produced from the above sequence of commands or copied and pasted the result, of course, but I thought it would be useful to know a method to get cat to process the output from find for other situations. There is a simple method, using command substitution of getting cat to process a file name that find has located. One can simply use a command similar to cat `find [whatever]` as explained by Laurence Gonsalves in response to a Stack Overflow question How to pipe list of files returned by find command to cat to view all the files. The command subsitution takes the output of the command or commands between successive backtick characters and uses that as the argument for another command, in this case the cat command.

[ More Info ]

[/os/unix/commands] permanent link

Thu, Jun 09, 2016 11:09 pm

High CPU usage by the Google Chrome browser on an OS X system

When I started using a MacBook Pro laptop running OS X Yosemite (10.10.5) today, I found that the Google Chrome browser (version 35.0.1916.153) was slow to respond when I attempted to access web pages. When I checked the system CPU usage from a Terminal tab using the top command, I found a Google Chrome process with process identififer (PID) 29634 was consuming about 90% of the CPU cycles.

$ top -o cpu

Processes: 318 total, 7 running, 11 stuck, 300 sleeping, 2181 threads  10:57:11
Load Avg: 3.82, 6.20, 6.94  CPU usage: 35.23% user, 5.81% sys, 58.95% idle
SharedLibs: 16M resident, 10M data, 0B linkedit.
MemRegions: 187449 total, 7337M resident, 52M private, 1115M shared.
PhysMem: 16G used (2532M wired), 19M unused.
VM: 703G vsize, 1063M framework vsize, 11083768(0) swapins, 16907853(0) swapouts
Networks: packets: 17956740/12G in, 13426851/3518M out.
Disks: 13779844/398G read, 14840307/588G written.

PID    COMMAND      %CPU TIME     #TH    #WQ  #PORT MEM    PURG   CMPRS  PGRP
29634- Google Chrom 89.2 23:16:01 13     0    85    817M+  0B     638M-  515
28991- Google Chrom 30.7 23:37:36 10/1   0    78    124M+  0B     344M-  515
0      kernel_task  20.6 32:32:35 104/10 0    2     1685M+ 0B     0B     0
30147- Google Chrom 14.7 18:55:10 10     0    78    47M+   0B     87M    515
609-   Google Chrom 12.9 13:55:01 4/1    0    93    153M+  0B     859M-  515
75040- Google Chrom 12.7 09:26:48 19     0    89    100M+  0B     523M-  515
46990- Google Chrom 12.4 16:15:41 10     0    78    53M+   0B     194M-  515
55854- Google Chrom 11.1 12:09:27 10     0    78    42M    0B     100M   515
79850- Google Chrom 11.0 02:49:58 10     0    78    44M    0B     91M    515
55744- Google Chrom 10.5 12:19:13 20     0    92    31M+   0B     148M-  515
79625- Google Chrom 10.2 06:55:52 11     0    82    95M+   0B     442M-  515
83785- Google Chrom 9.1  04:23:07 10/1   0    78    35M+   0B     135M-  515
84883- Google Chrom 9.1  04:30:16 10/1   0    78    36M-   0B     71M-   515
190    WindowServer 8.8  14:29:00 5      1    1590- 44M-   8952K  628M   190
60247- Google Chrom 8.0  05:43:24 11/1   0    81    91M+   0B     247M-  515

You can determine what web pages a Google Chrome process has open by putting chrome://memory in the Chrome address bar. Once you've identified the relevant Chrome window/tabs associated with a process, you can close the tab, or tabs, that may be associated with the process to reduce CPU usage. If needed, you can also suspend a process temporarily under OS X with the kill command.

[ More Info ]

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

Wed, Jun 08, 2016 10:36 pm

Viewing and updating a stored Gmail password on an OS X system

On a Mac OS X system, passwords can be stored in a keychain. You can view and manage stored passwords via the Keychain Access program found in the Applications/Utilities folder. If you use the Apple Mail program to check email for a Gmail account, you can view the password stored in a keychain for the Gmail account by opening the Keychain Access program and then typing gmail in the search box at the upper, right-hand corner of the window and hitting Enter. You should then see entries displayed for imap.gmail.com and smtp.gmail.com, if you are checking email via the Internet Message Application Access Protocol (IMAP) and sending email via the Simple Mail Transfer Protocol (SMTP).

[ More Info ]

[/os/os-x] permanent link

Tue, Jun 07, 2016 11:59 pm

Using Python for a simple web server

On a Mac OS X system, you can use Python to start a simple web server in any directory by opening a Terminal window (the Terminal program is found in Applications/Utilities) and entering the command python -m SimpleHTTPServer port with port being the port you wish to access the web server on. Typically, web servers listen on TCP port 80 for HTTP connections, but you can specify any currently unused port on the system with the caveat that if you pick a well-known port, i.e., a port less than 1,024, then you will need to prefix the command with sudo to run the command as root, .e.g, sudo python -m SimpleHTTPServer 80. However, you can pick ports above 1,023, such as 8080, without using sudo. E.g., python -m SimpleHTTPServer 8080. If you issued that command, you should see Python respond with "Serving HTTP on 0.0.0.0 port 8080 ..." Then, within a browser, you could access an HTML file in the directory from which you issued the command with http://localhost:8080/filename. E.g., if I wished to display a file named test.html, I could use http://localhost:8080/test.html. If test.html was just a simple HTML file, I would see GET /test.html HTTP/1.1" 200 displayed on the command line where the Python command was issued. The "200" at the end of the line is an HTTP status code indicating a successful HTTP request.

If you have a file named index.html in the directory, then just as with a normal webserver, you don't need to specify it to view its contents. E.g. http://localhost:8080 would be sufficient for displaying index.html. If there are links to images within index.html, Python would display the relevant HTTP GET commands the browser issued to retrieve the images.

When you wish to stop Python from listening on the specified port, you can use the control-C keys to stop the web server and return to the shell prompt. Note: you will see some error messages displayed when you do so.

Below is the output displayed by Python when I first accessed a file named test.html and then when I accessed the index.html file in the same directory. The index.html file had links to 4 image files contained in the same directory as the index.html file, so the GET commands issued by the browser are displayed for those as well. The 127.0.0.1 IP address is the localhost address. The last line shown was produced when I hit the control and "C" keys.

$ python -m SimpleHTTPServer 8080 Serving
HTTP on 0.0.0.0 port 8080 ...
127.0.0.1 - - [08/Jun/2016 00:00:14] "GET /test.html HTTP/1.1" 200 -
127.0.0.1 - - [08/Jun/2016 00:00:32] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [08/Jun/2016 00:00:32] "GET /vlc_dmg.png HTTP/1.1" 200 -
127.0.0.1 - - [08/Jun/2016 00:00:32] "GET /vlc_internet_download.png HTTP/1.1" 200 -
127.0.0.1 - - [08/Jun/2016 00:00:32] "GET /check_album_art.png HTTP/1.1" 200 -
127.0.0.1 - - [08/Jun/2016 00:00:32] "GET /vlc_media_player.png HTTP/1.1" 200 -
127.0.0.1 - - [08/Jun/2016 00:00:32] "GET /jamendo_selections.png HTTP/1.1" 200 - 
^C

[/languages/python] permanent link

Mon, Jun 06, 2016 11:33 pm

Inverting the display on a Dell 5100MP Projector

During a meeting I was in today, the projector, a Dell 5100MP projector, stopped displaying anything on the screen. The projector was mounted to the ceiling and thus was mounted upside down, so the buttons on top would be accessible. To fix the problem someone stood on the conference table and after powering the projector on and off didn't work, unplugged the power to the projector. After it was powered back on, it appeared to revert to the factory default setting for the display resulting in the display on the screen being upside down. I found the manual for the projector online, which listed the following steps to take from the management menu to invert the image displayed for ceiling-mounted projection:
  1. From the Main menu, select Management.
  2. From the Management menu, select Projection Mode.
  3. Select Front Projection-Ceiling Mount.

[ More Info ]

[/hardware/projector/Dell_5100MP] permanent link

Sun, Jun 05, 2016 11:02 pm

Verifying PHP code from the command line

If you need to verify the PHP code in a .php file, you can do so from a command line interface (CLI), e.g., a shell prompt using the -l option; that's the letter "l", not the number "1". E.g., when I tried accessing a web page I had created, e.g., http://www.example.com/sompepage.php, I saw only a blank page. If I examined the source code for the page in the browser from which I was viewing the page, there was nothing there. Looking through the PHP code, the cause of the error wasn't immediately obvious to me, but when I issued the command php -l somepage.php on the server where the page resided, the line that was causing the problem was identified.
$ php -l somepage.php
PHP Parse error:  syntax error, unexpected '$download_url_description' (T_VARIAB
LE) in somepage.php on line 79
Errors parsing somepage.php

Examining the code, I realized I had omitted a required semicolon from the prior line. When I added the semicolon at the end of the line and reran the check, I no longer saw any error messages and when I refreshed the webpage in the browser after making the update, it then displayed correctly.

[/languages/php] permanent link

Sat, Jun 04, 2016 10:57 pm

Importing contacts from PST file into Outlook 2013

The following steps can be used to import contacts from an Outlook .pst file into Outlook 2013:
  1. Click on File.
  2. Click on Open & Export.
  3. Select Import/Export.
  4. When the Import and Export Wizard window opens, select "Import from another program or file" and click on Next.

    Import and Export Wizard

  5. Select "Outlook Data File (.pst)" and click on Next.

    Import PST File

  6. Browse to the location of the .pst file and then click on Next after selecting the option you prefer in regards to how Outlook should deal with any entries that duplicate existing entries in your contact list. The options are as follows:
    • Replace duplicates with items imported
    • Allow duplicates to be created
    • Do not import duplicates

    PST file to import

  7. At the next step, you can select the folder to import from. You can also decide whether you wish to import any subfolders from the imported file; the default value is to include subfolders. You can also choose from the following 2 options:
    • Import items into the current folder
    • Import items into the same folder in

    Select Outlook folder for import

    For contacts, you may want to import them into the Contacts folder in Outlook, so can leave "Import items into the same folder in" selected for the appropriate email account.

  8. Click on Finish to complete the process.

For creating a contacts list PST file from the prior version of the application which can be imported into Outlook 2013, see Exporting contacts from Outlook 2010.

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

Sat, Jun 04, 2016 10:52 pm

Local host name is not qualified

After updating /etc/aliases on a CentOS 7 system that uses sendmail for transmitting email by adding a new alias, I ran newalises. When I did so, it took a fair amount of time for the command to complete and when it did I saw the error message below:

[root@moonpoint ~]# newaliases
WARNING: local host name (moonpoint) is not qualified; see cf/README: WHO AM I?
/etc/aliases: 360 aliases, longest 69 bytes, 6301 bytes total
[root@moonpoint ~]#

The referenced "cf/README" file is at /usr/share/sendmail-cf/README .

I had also noticed that when I entered the mailq command to see what messages were queued for transmission it took a long time to see the results. And whenever I sent email from the system with the email client Alpine, it was taking a long time for email messages to be transmitted.

[ More Info ]

[/network/email/sendmail] permanent link

Fri, Jun 03, 2016 10:41 pm

Email sent via an Atlantic Broadband SMTP server not being delivered

I received a report from a couple of users that email they were sending wasn't being delivered to recipients, though they weren't receiving any bounced messages or any indication that their email was not being delivered. Their email clients were sending email to smtp.atlanticbb.net. When I sent email from the same IP address to that Atlantic Broadband Simple Mail Transfer Protocol (SMTP) server addressed to several email accounts I maintain for email troubleshooting on a number of free email services, such as Gmail, none of them reached their destinations, even though as far as the email client was concered, they were successfully delivered to the Atlantic Broadband SMTP server.

Examining the message headers from an email sent from a tech support person at Atlantic Broadband, whom I contacted on June 1 regarding the problem, to my Gmail account (see Viewing message headers in Gmail), I learned that Atlantic Broadband uses Echo Labs to handle their email. I saw the following in the message headers:

Received: from cluster1.echolabs.net (mail.atlanticbb.net. [38.111.141.32])
        by mx.google.com with ESMTP id l144si10145927ybf.89.2016.06.01.19.40.53

[ More Info ]

[/network/email/spam/blocklists] permanent link

Thu, Jun 02, 2016 10:56 pm

Have your Mac speak to you

The say command on a Mac OS X system can be used to have the system vocalize text you type. E.g., at a Terminal window (the Terminal application is found in Applications/Utilities) you could issue the command say "Hello world". Though you can include a period or question mark at the end of the text, if you include an exclamation mark, since that has a special meaning to the shell, you will get an error message.
$ say "hello world"
$ say "hello world."
$ say "hello world?"
$ say "hello world!"
-sh: !": event not found

You can have the words in a file spoken by using say -f filename where filename is a text file containing whatever text you wish the system to read aloud. E.g., to read the contents of saythis.txt, I could issue the command say -f saythis.txt.

[ More Info ]

[/os/os-x] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo