Saturday, 4 October 2014

Hp printer driver update problem

Apple released an update to it's HP printer drivers on the 2nd of October, 2014, and strange things have been happening since then. My HP Laserjet 1320 simply wouldn't print anymore, and even deleting and reinstalling the printer only gave me the false impression thing were back to normal; she printed exactly one page, and then refused to print anymore!

The only solution (until Apple releases another driver to fix the problem) was to reinstall a second version of the same printer. Here's a simple step-by-step guide:
  1. Make sure your printer is connected and turned on;
  2. Open up System Preferences, and click on Printers & Scanners;
  3. Click on the little plus sign (+) to add a new printer;
  4. Your HP printer's name should appear in the window that pops up;
  5. Select it, and click "Add";
  6. A dialog will warn you that your printer already exists, and ask if you're sure you want to create a new one; click "Continue";
In your print dialog boxes, you will now have two printers with the same name (the new driver you added will have a "2" appended to it's name). When printing, simply chose the new printer, and you should be able to print normally.

I know it's not an elegant solution, but it's the best I can offer at the minute :-)

Cheers.

Thursday, 5 September 2013

Recovering accidentally deleted emails in imap gmail account

In a similar fashion to what happened with my calendars about a year ago, today I ran into a problem  with Gmail, losing all my fourteen thousand plus emails. I couldn't find any solution to my problem on the Internet, but I'm sure I'm not the only one who will run into this problem. So after figuring out how to fix it, I decided to outline the steps I took to restore all my emails, hoping it might help someone who faces a similar situation.

(If you don't want to read about how I lost my emails, jump down to “The solution”  below.)

The problem

What happened was this: I have my Gmail IMAP account linked to Mail in Mac OS X according to the method initially proposed by Joe Kissel. One excellent feature of this method is that the “All Mail” label in Gmail does not appear as a folder in Mail on my Mac (I have never been able to adapt to Google's approach to email :-)

Everything was working fine until I installed on my iPod Dropbox's Mailbox program. I tried it first on a test Gmail account, and loved their interface (swipe right to archive, long swipe right to delete was brilliant!). The only caveat was that Mailbox only works if you enable your “All Mail” label in Gmail. “Oh well”, I thought, “let's give it a try”.

I tried it, but a few days later got fed up with having that massive “All Mail” folder on my Mac, with a copy of every single email I've sent, and every email that I keep in other folders (or “labels” in Gmail). In a moment of  “mental off-line”, I opened Mail, selected all the emails in “All Mail”, and hit delete.

Two seconds later I woke up, and realized my mistake: instead of deleting emails on my Mac, I should have modified the status of “All Mail” in Gmail's web-site (Gmails labels work like tags, so I only needed to hide “All Mail” again from the web interface). So I hit the “Stop” button in Mail's Activity Window (which, as you probably know, takes about 237 hours to actually stop anything it's doing!).

And just as that moment, my Internet connection fell (something not so uncommon here in the interior of Brazil). “No problem”, I thought; “I'll sort it all out later”. And in blissful ignorance, I let the matter rest.

When I managed to connect again, imagine my dismay when I saw that my “All Mail” folder was completely empty! Every single one of those fourteen thousand odd emails permanently deleted! (As an aside, I don't know why this happened, but there was no doubting the fact that it did happen!)

After the initial shock wore off, I remembered Time Machine (Steve Job's version, not H. G. Wells!), and breathed a sigh of relief.

The difficulty

The solution seemed very simple. Since I’m running Mac OS X Lion, all I should need would be to fire up Time Machine and restore my emails, right?

Wrong. Or rather, partially right. I entered Time Machine, restored my ~user/Library/Mail/V2 folder, fired up Mail (while off-line), and sure enough, everything was back to normal again. But then I went on-line, and in five seconds flat, Mail synchronized it's folders with Gmail's online labels, and all my mails vanished again!

“Back to marker zero”, as they say there in Brazil. Problem not solved, and patience running out!

The solution

Anyway, to cut a long story short, I finally got all my emails restored and properly synchronized with Gmail. If you have the same problem, here’s an easy-to-follow step-by-step guide to getting Mail back to the state it was in at some time in the past (assuming, of course, that you have been using Time Machine!).
  1. Quit Mail.
  2. Navigate to the “Library” folder inside your home folder. This folder is hidden by default, so if you can’t find it, select the “Go” menu in the Finder, then choose the “Go to Folder ...”. In the dialog box that will appear, type in: ~yourusername/Library (where “yourusername” should be substituted for your user name, of course).
  3. Once in your “Library” folder, open the “Mail” folder, then the “V2” folder (it should be the only folder inside the “Mail” folder).
  4. Now enter Time Machine. [You can enter Time Machine without leaving the “V2” folder using one of the following options: (1) through the Time Machine menu-bar icon, or (2) using Spotlight (hit “command” + “space-bar” to bring up Spotlight's search box, and search for Time Machine).]
  5. Go back to the date you wish to grab your emails from (in my case, I went back one day in Time Machine).
  6. Click “Restore” (Time Machine will notify you that the files you are trying to restore already exist; choose “Replace”).
  7. Once Time Machine has restored your files, make sure you are not connected to the Internet and fire up Mail again. You can accept any prompt to import all your messages.
  8. Now you need to archive all the emails you want to keep. For every folder where you lost emails (Inbox, Sent, All Mail and any other folder you have linked to your Gmail account) you will need to: (a) select the folder, (b) from the “Mailbox” menu, choose “Export Mailbox”, and (c) save your archive somewhere handy (Desktop, for example).
  9. Repeat step 8 above for every folder you have in Mail (at least, the ones that have emails you want to preserve!).
  10. Only after Mail has finished archiving all your folders (you'll be sure it's finished when it allows you to Quit without alerting you to any unfinished process), you can go online again, and allow Mail to synchronize with Gmail.
  11. As you should expect, all your Mail will disappear. Don't worry, though; that's why we archived it all.
  12. Begin re-importing all the folders you exported in step 8 (choose “Import Mailboxes” from the “File menu”, select the archives you created in step 8, and wait for Mail to finish). It will add all your folders to the left sidebar of Mail's main window, underneath an “Imported” label.
  13. You should now a copy of each of your folders — one empty, and an imported version with all your original emails. For example, your Gmail “Inbox” will be empty (it will only have copies of emails you have received since your problem began), but you'll have another folder named “Inbox” below the “Imported” label, where you'll find all your old emails from the Inbox folder.
  14. Now comes the slow part (especially if you have a lot of email messages!). For every archive you created, you will need to: (a) select it in Mail (click on the folder name on the left sidebar under the “Imported” label); (b) select all the messages in that folder; (c) from the “Message” menu, select “Move to” and choose the original folder as your destination. For example, to restore the “Inbox” you will: (a) select  the folder named “Inbox” below the “Imported” label on the left sidebar of Mail's main window; (b) select all messages in that folder (by hitting command + “a”); and (c) move all these messages to the folder named “Inbox” in your Gmail account (which you should find right at the top of the left sidebar in Mail's main window).
  15. Be patient; it can take some time to get everything synchronized between Mail and Gmail, especially if your Internet connection isn't 100%. To give you a rough idea, I started restoring my emails on Tuesday, and finished on Wednesday (sleeping in between, of course :-), doing one folder at a time. In theory, you don't need to wait for Mail to finish updating one folder before you throw another one at it, but it's safer to take things easy and let it finish one job before giving it another.
  16. Once all your folders are restored, you can safely delete your imported archives from Mail.
And that’s it. If you need any extra help, let me know in the comments below. Cheers.

© Ben Ulster

Thursday, 22 August 2013

Correcting blurred icons in the Dock

Some Mac users experience an ugly and disagreeable bug in OS X: random Dock icons become blurred and pixelated, very different from the shinny high-resolution icons that sit beside them. Sometime the problem affects only one icon, sometimes a few; but it's always irritating.

The fix is quite simple; all you need to do is delete the System's Launch Services' database and restart your computer (logging out, then back in again should also work). This little trick will also clear up any duplicates you might have in the “Open with” contextual menu, and will reset the security prompt you see every time you launch an application for the first time.

So how do you delete Launch Services' database? Well, there are two options:

1) Using Terminal

If you have no qualms about using the Terminal app, simply copy and paste the following to the command line and hit enter:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill

2) Using the Finder

If you're a bit wary of using Terminal, simply open a new Finder window, navigate to /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/ and delete the lsregister file.

That's it, folks!

Whichever option you preferred, you just need to restart, and enjoy your polished Dock.

If you have any doubts about any of the steps above, leave me a comment and I'll try to help you.

Cheers, Ben.

Wednesday, 23 May 2012

Restoring lost iCal events and calendars

I ran into a problem today with iCal, and failed to find the information I needed on the Internet. After reading a few forum posts, learning one or two tips on the way, and using some common sense, I got my iCal calendars completely restored, and everything back to normal.

So I decided to write a quick little post, hoping it might help someone who faces the same situation.

The problem

What happened was this: after turning on iCloud sync for my calendars, I suddenly lost all my iCal events. It seems that iCal, for some unknown reason, reverted to an ancient version of my calendars. All the daily events I had carefully entered (including various recurring alarms, to remind me when to pick up my three children from school - they have different school hours) had been lost. Why? I haven’t a clue; but I knew what I wanted done: restore my iCal to the state it was in a couple of days ago.

The difficulty

The solution seemed very simple. Since I’m running Mac OS X Lion, all I should need would be to fire up Time Machine and restore my calendars, right?

Wrong. When I opened Time Machine, I couldn’t find my calendars. After all, where are they stored? And how could I restore them?

I eventually discovered that what I needed was hidden from me by default (Mac OS X trying to be helpful!), but it wasn’t too hard to find.

The solution

So here’s an easy-to-follow step-by-step guide to getting iCal back to the state it was in at some time in the past (assuming, of course, that you have been using Time Machine!).
  1. Quit iCal (just to be on the safe side).
  2. Navigate to the “Library” folder inside your home folder. This folder is hidden by default, so if you can’t find it, select the “Go” menu in the Finder, then choose the “Go to Folder ...”. In the dialog box that will appear, type in: ~yourusername/Library (where “yourusername” should be substituted for your user name, of course).
  3. Once in your “Library” folder, delete all the contents of the “Calendars” folder.
  4. Still in your “Library” folder, scroll down until you find the folder called “Preferences”.
  5. Inside this folder, delete all the files that begin with “com.apple.iCal” (there should be a few of these files).
  6. Now we’re ready to restore! Making sure you’re still in the “Preferences” folder inside your “Library” folder, enter Time Machine. [You can enter Time Machine without leaving the “Preferences” folder using one of the following options: (1) through the Time Machine menu-bar icon, or (2) using Spotlight (hit “command” + “space-bar” to bring up Spotlight's search box, and search for Time Machine).]
  7. Go back to the date you wish to grab your iCal data from (in my case, I went back a week in Time Machine).
  8. Select all the files that begin with “com.apple.iCal” in the “Preferences” folder, and click “Restore”.
  9. Enter Time Machine again, navigate up one level (to your “Library” folder).
  10. Find the folder named “Calendars”, and click “Restore”.
And that’s it. Open up iCal, and everything should be back to normal.

If you need any extra help, let me know in the comments below. Cheers.

P.S. One of the readers of this blog (Simon Ramskill) made a very pertinent addition, which I include below (thanks, Simon!):

“For those that have Icloud turned on - turn off your modem while you go through the whole process. Once you have restored your calendars, export each one to your desktop and then turn your modem back on. Icloud will delete the calendars (its always the master) and then you can reimport them from your desktop - they will then resync with iCloud and your done!”


© Ben Ulster