Accessing the Library folder in Mac OS X

I found a need to access the Library folder in Lion while looking for something.  As a PC user, I typically unhide system folders so everything is visible but I haven’t really had a to look in hidden folders in the Mac.  I actually didn’t know the Finder hid any folders.  I found a great page at Mac World that shows 18 ways to view it.  Since I will be looking at it infrequently, I like the first choice.  Open a Finder window and use the Go To Folder command by pressing Shift-Command-G.  In the window that opens, simply type “~/Library” and it will open.  Nice and easy, just the way it should be.

Dish Network Latino Bonus Pack

I inquired with Dish Network about their Latino Bonus Pack, a $17 à la carte add-on.  I wanted to know what channels were included.  In the end, after first directing me to a web page on Latino Basico which is a different package, the representative gave me a list of 17 channels, none of which were Latino channels.  Most (over half) were shopping channels.  That really didn’t answer my question.  After further inquiries, I was told Univision and UniMás were included.  On my dish receiver, when I selected All Channels in my guide, I could see Univision (it was in red since I wasn’t subscribed to it) but I did not see UniMás.  I was concerned that my equipment might not allow me to get the channel.  I couldn’t seem to get the representative to understand my question and she couldn’t tell me definitively if I’d be able to get it or not.  Gambling $17 for a month to find out wasn’t my first choice but it was getting very clear that it was my best choice.  Getting a complete list from them pretty much seemed impossible.

I ran across the question a few times while doing an Internet search but found no real definitive and current answer.  I added the pack today and took the time to figure out exactly what was added.  I now offer this information to you.

I got more than I was expecting.  If Dish would put the information on their website, they might get more subscribers, particularly for those interested in telenovelas, Latin culture, music, or sports.

I have a Dish 625 DVR receiver (standard definition) with a Dish Plus satellite dish pointed southwest and I live in Michigan.  I subscribe to what was known as Dish Family.  It’s currently called Smart Pack.  If you have a different package or equipment, or live in a different part of the U.S., you might get a different experience than I do.  Some channels are on multiple satellites so channel numbers might be different for you.  I cannot tell which channels that I already receive may also be in the Latino Bonus pack since there would be no change from my end for me to notice.  I already get a lot of shopping channels (that I wish I could delete) for instance.  For those reasons, this list cannot be absolutely definitive.

Some channels of note that I already received with Dish Family (Smart Pack) as of today include:

  • 279     CCTV News
  • 280     RT (Russia Today)
  • 823     BabyFirst TV
  • 843     HITN
  • 846     V-Me
  • 884     CCTV-Espanol
  • 983     CD-Kidtunes               mirror 976/983
  • 9411   Enlace

The channels that were added with the Latino Bonus Pack include:

  • 174     Disney XD
  • 270     Univision (East)           mirror 270/827
  • 271     UniMás (East)             mirror 271/830
  • 273     Galavisión                   mirror 273/833
  • 392     beIN SPORTS            mirror 392/871
  • 819     Viva Mariachi (Music)
  • 820     Mojito (Music)
  • 821     La Musica (Music)
  • 824     Baby TV
  • 825     Azteca America
  • 826     WAPA America
  • 827     Univision (East)          mirror 270/827
  • 828     Univision (West)
  • 830     UniMás (East)            mirror 271/830
  • 832     CentroamericaTV
  • 833     Galavisión                 mirror 273/833
  • 834     Pasiones
  • 835     Telemundo (East)
  • 836     Telemundo (West)
  • 837     Univision tlnovelas
  • 838     mun2
  • 840     Televisión Española Internacional
  • 841     TV Colombia
  • 842     Fox Life
  • 845     Discovery en Español
  • 847     FOROtv
  • 848     Cbeebies (in Spanish)
  • 850     History en Español
  • 853     Discovery Kids en Español / Discovery Familia
  • 854     ESPN Deportes
  • 855     FOX Deportes
  • 858     Teleformula
  • 859     CNN en Español
  • 861     NatGeo Mundo
  • 862     De Pelicula
  • 863     De Pelicula Clasico
  • 865     Cinelatino
  • 867     Bandamax
  • 868     Telehit
  • 869     Univision Deportes Network
  • 870     Univision Deportes 2
  • 871     beIN SPORTS           mirror 392/871
  • 872     MTV Tres
  • 873     beIN SPORTS 2 (alternate)
  • 950     CD 1 Shine
  • 951     CD 2 Country Gold
  • 952     CD 3 Nashville USA
  • 953     CD 4 Jukebox Gold
  • 954     CD 5 Songbook
  • 955     CD 6 Unforgettable
  • 956     CD 7 Cashmere
  • 957     CD 8 Backpages
  • 958     CD 9 Strobe
  • 959     CD 10 Rock Show
  • 960     CD 11 Feedback
  • 961     CD 12 The Café
  • 962     CD 13 NuJazz
  • 963     CD 14 Concrete Beats
  • 964     CD 15 Martini Time
  • 965     CD 16 Ambrosia
  • 966     CD 17 Frequency
  • 967     CD 18 Jazz Traditions
  • 968     CD 19 Impressions
  • 969     CD 20 Acoustic Crossroads
  • 970     CD 21 Plaza
  • 971     CD 22 Ensemble
  • 972     CD 23 Intermezzo
  • 973     CD 24 Easy Instrumentals
  • 974     CD 25 Swing Kings
  • 975     CD 26 The Light
  • 976     CD 27 Kid Tunes       mirror 976/983
  • 977     CD 28 Aura
  • 978     CD 29 Lucille
  • 979     CD 30 Kingston
  • 980     CD 31 BYU Radio Network
  • 981     CD 32 Hawaiian
  • 6002   SiriusXM Hits – 1
  • 6003   SiriusXM Top 20 on 20
  • 6004   Sirius XM 40’s on 4
  • 6005   Sirius XM 50’s on 5
  • 6006   Sirius XM 60’s on 6
  • 6007   Sirius XM 70’s on 7
  • 6008   Sirius XM 80’s on 8
  • 6009   Sirius XM 90’s on 9
  • 6015   Sirius XM The Pulse
  • 6016   Sirius XM The Blend
  • 6017   Sirius XM Love
  • 6019   Sirius XM Elvis Radio
  • 6020   Sirius XM E Street Radio
  • 6021   Sirius XM Underground Garage
  • 6022   Sirius XM Pearl Jam Radio
  • 6023   Sirius XM The Greatful Dead
  • 6024   Sirius XM Radio Margaritaville
  • 6025   Sirius XM Classic Rewind
  • 6026   Sirius XM Classic Vinyl
  • 6027   Sirius XM Deep Tracks
  • 6028   Sirius XM Spectrum
  • 6029   Sirius XM Jam_ON
  • 6030   Sirius XM The Loft
  • 6031   Sirius XM Coffee House
  • 6032   Sirius XM The Bridge
  • 6033   Sirius XM 1st Wave
  • 6034   Sirius XM Lithium
  • 6035   Sirius XM XMU
  • 6036   Sirius XM Alt Nation
  • 6037   Sirius XM Octane
  • 6038   Sirius XM Ozzy’s Boneyard
  • 6039   Sirius XM Hair Nation
  • 6040   Sirius XM Liquid Metal
  • 6041   Sirius XM Faction
  • 6042   Sirius XM The Joint
  • 6044   Sirius XM Hip-Hop Nation
  • 6045   Sirius XM Shade 45
  • 6046   Sirius XM BackSpin
  • 6047   Sirius XM The Heat
  • 6048   Sirius XM Heart & Soul
  • 6049   Sirius XM Soul Town
  • 6051   Sirius XM BPM
  • 6052   Sirius XM Electric Area
  • 6053   Sirius XM Chill
  • 6054   Sirius XM Studio 54 Radio
  • 6056   Sirius XM Willie’s Roadhouse
  • 6058   Sirius XM Prime Country
  • 6059   Sirius XM The Highway
  • 6060   Sirius XM Outlaw Country
  • 6061   Sirius XM Bluegrass Junction
  • 6063   Sirius XM The Message
  • 6064   Sirius XM Praise
  • 6065   Sirius XM enLighten
  • 6066   Sirius XM Watercolors
  • 6067   Sirius XM Real Jazz
  • 6068   Sirius XM Spa
  • 6069   Sirius XM Escape
  • 6070   Sirius XM BB King’s Biuesville
  • 6071   Sirius XM Siriusly Sinatra
  • 6072   Sirius XM On Braodway
  • 6074   Sirius XM Met Opera Radio
  • 6075   Sirius XM Pops
  • 6076   Sirius XM Symphony Hall
  • 6090   Sirius XM Caliente
  • 6091   Sirius XM Viva
  • 6092   Sirius XM La Mezcla
  • 6093   Sirius XM Flow Nacion
  • 6094   Sirius XM Aguila
  • 6095   Sirius XM Latidos
  • 6096   Sirius XM Caricia
  • 6097   Sirius XM Luna
  • 6098   Sirius XM Rumbon
  • 6099   Sirius XM La Kueva

That should give you a pretty good idea as to what you could expect for your $17/month.

 

Canon Pixma MG7120

I bought a new multifunction printer.  I owned a Canon MP610 that I bought back in October 2008 so it’s been over 5 years.  The MP610 was great and I was sad to see it finally break.  The printer works but the scanner no longer works.  I used to own HP printers and liked them but I wanted a printer with separate ink cartridges so I could try to save money but only buying what I needed.  Canon offers that ability and since I loved the MP610, I confined my search to current Canon printers.

The search wasn’t easy.  According to Amazon, the replacement for my printer is the MG5520.  That printer seems to be one or two steps back from the MP610 in specs.  I wanted something at least as good as I was used to so I ended up picking the MG7120 instead.

MP610 – Print speed 4″ x 6″ borderless photo: Approx. 21 seconds, 4,608 nozzles, Color Print Resolution: 9600 x 2400 dpi, Optical Scanner Resolution:4800 x 9600 dpi

MG5520 – Print speed 4″ x 6″ borderless photo: Approx. 44 seconds, 4,096 nozzles, Color Print Resolution: 4800 x 1200 dpi, Optical Scanner Resolution:1200 x 2400 dpi

MG7120 – Print speed 4″ x 6″ borderless photo: Approx. 21 seconds, 6,656 nozzles, Color Print Resolution: 9600 x 2400 dpi, Optical Scanner Resolution:2400 x 4800 dpi

I do like it.  It uses 6 ink cartridges which is said to give better b/w prints because of the addition of grey.  I don’t use the printer a lot so I don’t expect to be buying replacement cartridges all that often.  That cost per page seems to be the number one complaint about the printer in reviews.  Speed is another.  It can print fine for me but it can also take a while to get going.  If you’re usually in a hurry, this is not the printer to get.  My MP610 could get going faster than this does sometimes.  It makes noises (cleaning the heads maybe) a lot more often than the MP610 ever did.  It’s just a quirk I guess.

I ran into an issue with printing from Firefox on my MacBook Pro (OS X Lion).  Chrome and Safari were fine but almost the entire header of print outs from Firefox were clipped and the footer disappeared altogether.  After searching for a solution, I fixed it by going to File -> Page Setup.  Under “Paper Size” I chose “Manage Custom Sizes…”  There I could redefine the print area.  I kept the paper size 8.5 x 11 but changed the top, bottom, left, and right to .13, .21, .25, .25 respectively.  It took many prints of slowly raising those numbers to figure out what would work correctly without losing precious space.  So now the headers and footers print correctly.  It’s odd that the problem only appeared in Firefox.  You’d think since all three browsers are using the same driver, they’d be the same.

The MP610 didn’t have a wireless feature (that came out around the following generation of printers).  Since I’m not used to it, I find the feature is really cool.  I used to print from my laptop through my HP Desktop (Windows 7 Ultimate) desktop using printer sharing.  Now I can send it directly to the printer via my router.  Since my desktop already had the long USB cable running to the printer, I used it.  I read a user review who said it was faster for scans than going wireless.  I also downloaded PIXMA Print to my iPad Mini from the App Store and successfully printed from it.  It’ll even automatically turn the printer on if it’s turned off.  It’s pretty cool.  There’s cloud features as well but I have no use for that.

I’m puzzled by the scanner.  The only options for resolution on the printer itself seem to be 75, 150, 300, and 600 dpi.  I cannot find a way to go higher.  I tried looking through Picasa by importing a picture from the scanner but it to maxes out at 600 dpi.  I read nothing but bad reviews about Canon’s current photo software that is included with the printer so I didn’t bother to install it.  Literally no one had anything good to say about it compared to their older software.  I searched Google, Bing, and Duck Duck Go (a search engine with a fun name) but I could not find any resolution to the problem (no pun intended).  The maximum resolution in the specifications is already less than my 5 year old MP610 and I’m not crazy about not being able to go higher than 600 dpi in scans but it’s not worth returning the printer over.

By default, scans appear in My Documents which I find a bit annoying.  Fortunately, it can be changed to a folder of your choosing by going to Start -> All Programs -> Canon Utilities -> Quick Menu -> Quick Menu.  Once open, the second from the top  says “Open the scan setting screen to change the settings.” It’ll be obvious where to change it in there though you do need to do it in five different tabs.

Copies, scans, and prints all look fine.  I printed to both printer paper (Epson 24lb Bright White Paper) and Canon Glossy Photo Paper.  They both look nice.  The touch screen is pretty nice too.  Overall, the printer is a nice upgrade.

Moving the WordPress Login Page with Better WP Security

I’ve used Better WP Security for a while now to help protect this WordPress site.  Its ability to ban users who try to log in with incorrect credentials has been very valuable.  This has been especially true because of the botnets I wrote about before.  The problem with that solution, in addition to .htaccess getting corrupted, is that the ban list can get quite large.

Because of that, I decided to use another feature of Better WP Security – the Hide Backend option which is on its own tab in Better WP Security’s options.  One of the things it does is (sort of) move the login page to one you specify.  The default page is /wp-login.php but when the Hide Backend feature is activated, going to that page gives an error instead of the username and passwords fields.

I said “sort of” because the page actually still works but only if a secret key is attached (e.g. /wp-login.php?xxxxxxxxxxxx).  Going to the name you specify (the default is /login) redirects it to the /wp-login.php page with the secret key filled in.  It then allows you to enter the username and password as before.

Using this option should provide a good defense against the botnets pecking away at the default login page.  I’m only sorry I didn’t notice the option sooner.  You could say it’s security through obscurity but I’d argue there’s nothing wrong with that as long as it’s not your only defense.  It’s just one more layer of security (and a nice way to keep the list of banned IPs shorter).  Having a very good password and keeping up to date with the security updates are still essential and changing the username from the default “admin” is quite helpful as well.

Edit 3/28/14: I updated the plugin today and found it has been renamed iThemes Security and features have changed quite a bit.  I haven’t explored it much yet but I did end up locking myself out of the admin area.  Once I logged out, I couldn’t log back in.  That was quite annoying.  I had to use a file editor and rename the index.php file for the plugin to regain access via the old fashioned way (/wp-login).  The new default for the Hide Backend feature (now called Hide Login Area) is /wplogin.  The plugin indicated /login can no longer be used as WordPress uses it.  Of course if security is a huge concern, you should never use the defaults for anything.

The way it works seems to have changed as well.  It no longer seems to use a secret key.  I’m sure they had their reasons but I can’t read up on why or how it was changed at the moment.

Protecting .htaccess from Better WP Security (revisited)

A few months ago I wrote about experiencing corruption issues with the .htacccess file.  I discovered the problem was with a WordPress security plugin called Better WP Security.  It’s an excellent plugin except for that one issue.

A common attack on WordPress sites (at least it is with mine) has been with botnets attempting to guess the username and password combinations to get access to the administrative section.  My guess is that they want access in order to host their malware somewhere on the server and spam email with links to it.  The username the botnet tries is almost always admin or administrator.  Let that be a lesson to never use those for your login name.  Create a different login and delete admin or administrator.  It’s one thing Better WP Security checks for.  See a file I created for a lengthy example of attempts to hack into my site.  I deleted the more R-rated password attempts.

The corruption happens when Better WP Security attempts to ban more than one IP address at the same time (or nearly the same time).  It does this by modifying .htaccess.  The file gets corrupted when one thread or process has it open and is changing it but another thread (or process) opens the file in the middle of that and attempts to change it as well.

I’m writing this entry because someone recently wrote to me asking for clarification on how to make the changes to protect .htaccess from corruption.  In my method, you have to place a “dummy” file on your server.  It can be any file, even a 0 byte file.  It just has to exist.  I used cPanel’s file manager to place the file into my root public_html directory.  For this example, let’s call the file dummyFile.txt (You can name it whatever you want to).

Next you need to edit better-wp-security/inc/admin/common.php.  I did it by logging into the administrative section of WordPress and under Plugins (on the left), I clicked Editor.  From there, just select Better WP Security and press Select.  If you don’t see common.php, which I never do when I first get to that screen, try clicking better-wp-security/inc/auth.php.  After clicking that, common.php always shows up for me.

Once in common.php, find

function writehtaccess() {

Right after that, add the following:

        // BEGIN ADD
            $ourFileName = "/dummyFile.txt";
            $ourFileHandle = fopen($_SERVER['DOCUMENT_ROOT'] . $ourFileName, 'a') or die("can't open file");

            if (flock($ourFileHandle, LOCK_EX) == false)
            {
                $sleepTime = rand(100000, 500000);

                while (flock($ourFileHandle, LOCK_EX) == false)
                {
                    usleep ($sleepTime);
                }
            }

        // END ADD

Again, the code assumes you added a file called dummyFile.txt to the root of the HTML section of your server.  You can change that to whatever and wherever you added your file.

The code attempts to open and lock dummyFile.txt.  If it’s successful, it skips the if statement’s block and continues with the rest of the code.  If it is unable to lock the file (because another thread or process has already locked it), it generates a wait time between .1 and .5 seconds and continuously checks to see if it can get the lock at each time interval.

It’s important to unlock the file before exiting the code.  I added code to do that just before the

return 1; //success

statement that exits the writeheaccess() function which is just before the comments for

function writewpconfig() {

The code to add is:

        // BEGIN ADD

            flock($ourFileHandle, LOCK_UN);
            fclose($ourFileHandle);

        // END ADD

That code unlocks the file and closes it.  It’s actually better to add it before all the return statements in the writehtaccess() function but I’ll admit that I didn’t do that.  All the other return statements deal with errors that the code might encounter and I just assume it’ll work properly.  It has for months!

That’s it.  If you add those two sections of code, I found the .htaccess file will no longer experience the corruption issue from Better WP Security.  You will have to add the code back in each time you update the plugin.  So don’t forget to do that!

 

Moving to an SSD Drive

I bought a Crucial M4 256 GB Solid State Drive a while ago and very briefly tried it in my old desktop (that originally shipped with Vista).  I wasn’t all that impressed so I thought I’d put it in my MacBook Pro instead.  I finally got around to doing so.

I created a backup of the original Hitachi 500 GB drive.  I used Carbon Copy Cloner to make an incremental backup of the OS X partition and Winclone to make a backup of my Windows Boot Camp partition.

Swapping the drives was easy but I did have to go out and buy a T6 torx screwdriver.  (Thank you You Tube for telling me what it was.)  I booted onto the bootable external drive made by CCC, formatted the SSD and restored the image to it.  It took me a little while to figure out which image I was supposed to restore (because I didn’t back it up where I thought I did) but I got it in the end.  The OS X part seemed to go well.  The one caveat is that I had to input my serial number into Microsoft Office for Mac again.

Restoring the Windows partition was a lot more involved.  All told, I did it something like 6 times.  The method I ended up using was to use Boot Camp to create a partition.  Part of my many trials was due to the partition needing to be equal to or greater than the saved image size (not the file size, but the original partition size).  I learned 64 GB on the Hitachi 500 GB is not equal to 64 GB on the Crucial 256 GB drive as far as Boot Camp Assistant is concerned.  You’d think it would be but I swear it’s not.

I made a 66 GB partition and booted into it using the Windows CD.  I used that CD to format the drive in NTFS, then exited setup.  Once back in OS X, I used Winclone to restore the image.  Upon booting into Boot Camp, Windows ran chkdsk and reparsed a few things.  I’d like to know why it had to but I really have no idea.  Despite that, going into Windows worked just fine through Boot Camp.

The problem I then faced was the inability to launch the Windows installation in VirtualBox.  It gave me a couple of different errors.  Rebooting the machine narrowed it down to one error – Windows (DOS) telling me there was a disk read error.  I revisited the steps to make the Boot Camp partition work in VirtualBox in the first place (see link above) but couldn’t figure out what was wrong.  I then finally figured it out.

I removed the virtual machine from VirtualBox then deleted Win7onMBP (created in step 8 of the directions).  I proceeded with changing the drive permissions (step 9) and dismounting the drive (step 10).  I then skipped to the beginning of step 15, making a new VirtualBox machine.  After step 15-C, I then put the two files needed into the Win7onMBP directory that VirtualBox automatically created when I named the machine in step 15-B.  The directions for creating the two files were at step 12.

That was the key, the files needed to be rebuilt.  After completing the owner change (step 13), I could then continue with the rest of step 15.  Once I started it up, it FINALLY ran.  It’s satisfying when something finally works.

I had to follow the directions out of sequence because when I tried to do them in order, VirtualBox complained about the name already existing and belonging to another machine because the directory existed.  Letting VirtualBox create the directory solved the problem.

The only other change I made was in Settings -> Storage -> win7raw.vmdk and checked Solid-state drive.

The speed of the SSD in OS X did improve after the upgrade but it isn’t jaw dropping.  I don’t need a stopwatch to tell it’s better but I wouldn’t say it’s twice as fast in my normal use of my web browsing and what-not.  A cold boot to desktop went from 59 seconds to 54 seconds.  Launching Firefox with way too many tabs open (i.e. more than 30) went from 1:47 to 1:05.  Opening Chrome with around 8 tabs went from 0:23 to 0:13.  All in all I would say it’s worth it if you want to try to get better performance at a reasonable price and if you can sacrifice the space.

Still Trying to Protect .htaccess

I wrote about my new attempt to protect the .htaccess file from being corrupted by simultaneous writes from WP Better Security in my last post.  My implementation didn’t work and the site went down again with a server configuration error message.

I reimplemented the same flock method I described earlier but this time, instead of directly locking the .htaccess file, I locked a dummy file.  My new method opens the dummy and attempts to lock it.  If the lock is successful, then it goes ahead with the rest of the function that opens and modifies .htaccess.  After that closes, the lock on the dummy file is released and the file is closed.

My thinking is that the entire section of code dealing with the .htaccess file should now only be able to be accessed by one calling thread at a time.  I’m not really sure why my last idea didn’t work but if this method also fails, then clearly flock will not help me.

Edit 7-19-13

The new method did indeed work.  The .htaccess file has not been corrupted since implementing this new fix back on April 17th.

Edit 9-26-13

I wrote a new article to more clearly explain the changes I made.  You can find it here.