For some marketing reason the HP does not provide any support for this printer. It is possible to make it work using the foomatic but it is a pain and suffer. Thanks to this guy a way to make it run using the native HP drivers was found. Unfortunately a lot of people report about the problems finding the right 1022 printer driver as for some reason after doing all possible updates the only driver for 1022 in the system is the one from Guteprint. Same thing happened to me. A workaround is to download the driver update bundle directly from the Apple's support website. Finally the procedure of installing the support for the printer is as following:
1. Download the HP Printer Drivers v.2.4.1 for Mac OS X v10.6
2. Connect the printer and turn it on.
3. Add a new printer selecting the HP LaserJet 1022 driver (version 1.3.0.261)
Then the printer should start working well.
Monday, September 13, 2010
Thursday, September 9, 2010
Exporting all events from iPhoto to a disk folder
Recently my wife asked to download all photos from my iMac to her Windows7 notebook PC structured into the directories named after the corresponding event name. As there was no such feature present in the iPhoto I decided to write a script to automate the task. Unfortunately the Apple scripting for the iPhoto application is not able to exploit even a half of all features available. There is no way to get the list of all events and therefore no way to find out the photos they contain. The standard export function can not be accessible with the scripting too.
After some Google searching I found a very interesting resource by Michael Kwaśnicki. The idea of accessing the files in the iPhoto library package directly using the information in the SQLite database is brilliant. The script bellow creates the "iPhoto export" folder under the users's "Downloads"and saves all events each to the separate folder having the media files ordered by name.
Download: export all iphoto events.applescript (4 KB) [2010-09-07]
After some Google searching I found a very interesting resource by Michael Kwaśnicki. The idea of accessing the files in the iPhoto library package directly using the information in the SQLite database is brilliant. The script bellow creates the "iPhoto export" folder under the users's "Downloads"and saves all events each to the separate folder having the media files ordered by name.
Download: export all iphoto events.applescript (4 KB) [2010-09-07]
Sunday, July 4, 2010
Mac OS 10.6.4 on Asus X51L notebook
Standard installation process:
My version of the notebook has a hardware bug that prevents the integrated display to be identified correctly during the cold boot. Its native resolution is 1280x800 while it usually boots up with 1280x768. The desktop is not stretched to 800 pixels so the bottom 32 pixels are filled with some rubbish. Such behavior is observed even during the hot reboots so I could not figure out what caused it. Examining the /var/log/windowserver.log file I discovered how the display is identified when everything goes fine:
Jul 05 17:41:51 [57] Display 0x2be05d00: MappedDisplay Unit 0; Vendor 0x6af Model 0x8174 S/N 0; online enabled built-in (0,0)[1280 x 800], Rotation 0, base addr 0x102000000
and when it fails:
Jul 05 17:38:03 [54] Display 0x5b81c5c0: MappedDisplay Unit 0; Vendor 0x756e6b6e Model 0x717 S/N 0; online enabled built-in (0,0)[1280 x 768], Rotation 0, base addr 0x102000000
In failed case the vendor and model numbers are 0x756e6b6e and 0x717 respectively so to solve the problem I modified a display override file with the correct EDID data at /System/Library/Displays/Overrides/DisplayVendorID-756e6b6e/DisplayProductID-717
The EDID was got with the following command:
ioreg -l -w 0 |grep EDID
Using the PlistEditPro application I modified the DisplayProductID-717 changing the DisplayProductID and DisplayVendorID to the correct values. IODisplayEDID saves the EDID data. The result override file follows:
The ALC660 codec came up online after the VoodooHDA 0.2.6.2 installation.
The WiFi card does not work, the Atheros 5007 is not supported. There are rumors that there is a way to make it run but it appears to be very unstable. Guess I need to buy a new USB dongle for it or replace the internal card with some supported PCI-express option (Broadcom BCM94321MC).
The SleepEnabler.kext was installed to let the system go into the sleep mode correctly. Still cannot resolve the problem to make the video turn the display on after wake up....
- Booting up with iBoot.
- Installing the Mac OS Retail 10.6.3
- Updating to 10.6.4 with update combo
- Running the Multibeast with the following options on:
- Easybeast for supported CPU
- Voodoo PS/2 Controller with Trackpad Support
My version of the notebook has a hardware bug that prevents the integrated display to be identified correctly during the cold boot. Its native resolution is 1280x800 while it usually boots up with 1280x768. The desktop is not stretched to 800 pixels so the bottom 32 pixels are filled with some rubbish. Such behavior is observed even during the hot reboots so I could not figure out what caused it. Examining the /var/log/windowserver.log file I discovered how the display is identified when everything goes fine:
Jul 05 17:41:51 [57] Display 0x2be05d00: MappedDisplay Unit 0; Vendor 0x6af Model 0x8174 S/N 0; online enabled built-in (0,0)[1280 x 800], Rotation 0, base addr 0x102000000
and when it fails:
Jul 05 17:38:03 [54] Display 0x5b81c5c0: MappedDisplay Unit 0; Vendor 0x756e6b6e Model 0x717 S/N 0; online enabled built-in (0,0)[1280 x 768], Rotation 0, base addr 0x102000000
In failed case the vendor and model numbers are 0x756e6b6e and 0x717 respectively so to solve the problem I modified a display override file with the correct EDID data at /System/Library/Displays/Overrides/DisplayVendorID-756e6b6e/DisplayProductID-717
The EDID was got with the following command:
ioreg -l -w 0 |grep EDID
Using the PlistEditPro application I modified the DisplayProductID-717 changing the DisplayProductID and DisplayVendorID to the correct values. IODisplayEDID saves the EDID data. The result override file follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DisplayProductID</key>
<integer>33140</integer>
<key>DisplayProductName</key>
<string>Asus X51L 1280x800x32 integrated display</string>
<key>DisplayVendorID</key>
<integer>1711</integer>
<key>IODisplayEDID</key>
<data>
AP///////wAGr3SBAAAAAAEQAQOAIRV4Chz1l1hQjicnUFQAAAABAQEBAQEBAQEBAQEB
AQEBxxsAoFAgFzAwIDYAS88QAAAYAAAADwAAAAAAAAAAAAAAAAAgAAAA/gBBVU8KICAg
ICAgICAgAAAA/gBCMTU0RVcwOCBWMSAKAEM=
</data>
</dict>
</plist>
The ALC660 codec came up online after the VoodooHDA 0.2.6.2 installation.
The WiFi card does not work, the Atheros 5007 is not supported. There are rumors that there is a way to make it run but it appears to be very unstable. Guess I need to buy a new USB dongle for it or replace the internal card with some supported PCI-express option (Broadcom BCM94321MC).
The SleepEnabler.kext was installed to let the system go into the sleep mode correctly. Still cannot resolve the problem to make the video turn the display on after wake up....
Thursday, May 27, 2010
Custom SSL certificate for Apache
- Generate a Private Key:
- Generate a CSR (Certificate Signing Request):
- Remove Passphrase from Key:
- Generate a Self-Signed Certificate for 5 years:
- Installing the Private Key and Certificate:
- Configuring SSL Enabled Virtual Hosts in Apache:
openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr
cp server.key server.key.org openssl rsa -in server.key.org -out server.key
openssl x509 -req -days 1825 -in server.csr -signkey server.key -out server.crt
cp server.crt /usr/local/apache/conf/ssl.crt cp server.key /usr/local/apache/conf/ssl.key
SSLEngine on SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
Tuesday, May 25, 2010
PHP XDebug set up on MacOS
We are going to use the pre-compiled binaries by Komodo. Copy the xdebug.so matching the installed php version to /usr/lib/php/extensions/no-debug-non-zts-200xxxxx directory.
The following lines should be appended to the /etc/php.ini :
[xdebug]
zend_extension="/usr/lib/php/extensions/no-debug-non-zts-200xxxxx/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_aggregate = Off
xdebug.profiler_append = Off
xdebug.profiler_enable = Off
xdebug.profiler_enable_trigger = Off
The following lines should be appended to the /etc/php.ini :
[xdebug]
zend_extension="/usr/lib/php/extensions/no-debug-non-zts-200xxxxx/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_aggregate = Off
xdebug.profiler_append = Off
xdebug.profiler_enable = Off
xdebug.profiler_enable_trigger = Off
Monday, May 24, 2010
Display hidden files in Finder
FinderHiddenFiles
#!/bin/sh if [ "$1" == 'off' ] then PARAM=FALSE else PARAM=TRUE fi defaults write com.apple.finder AppleShowAllFiles $PARAM killall Finder
to display the hidden files run
FinderHiddenFiles
to display the hidden files run
FinderHiddenFiles off
FinderHiddenFiles
to display the hidden files run
FinderHiddenFiles off
Wednesday, May 19, 2010
Canon MP-140 cartridge counter reset
Second time refilling the cartridge I realized how inconvenient it has become not seeing how much ink is left in the tank. Google suggested several ways of reseting the left ink counters but no one worked for my MP-140. Finally I found the method. AFAIK this is a standard factory reset operation and is absolutely harmless:
- Disconnect the printer’s power cord.
- Press and hold down the power button while connecting the power outlet back.
- While still holding down the power button press the reset button twice.
- Release the power button.
- Wait until the printer boot-up is complete. Usually it takes up to 10-15 seconds. Copy counter display should come up with .
- Press "+" button to change the value on the display from 0 to 1.
- Press Colour button; this will light up two leds.
- Feed the printer with paper.
- Press the power button, the Colour button then the Reset button by turn. The device will print out a factory test page.
- After the test page is out the display returns to zero.
- Open the printer lid and remove the cartridges.
- With the printer still open, disconnect the power cord.
- Close the lid, re-connect the printer to the power and turn it on.
- Refilled cartridges may now be inserted back. The driver ink status window should display both cartridges full.
Saturday, March 20, 2010
Windows 7 x64 + Apache 2.2 + PHP 5.2.13 + Mysql 5.1
В последнее время очень стали доставать падения апача при выполнении PHP скриптов. Другая проблема - запуск скриптов из консоли. По завершению CLI впадает в ступор на 5 секунд. Со времен версии PHP 5.1 на память приходил только модуль для mysql, который тогда еще выдавал сообщение об ошибке завершения своей нити выполнения с точно такой-же задержкой. Тогда это лечилось заменой php_mysql.dll на аналогичный файл со старой PHP 4.2. Там клиентская библиотека была статически вкомпилена в php_mysql.dll, но и поддерживала mysql версии 3.28. С пятой версии php модули mysql линкуются динамически с libmysql.dll, и что-то с этим самым libmysql.dll, идущим вместе с php, не все в порядке. Замена его на родную библиотеку от свежего сервера mysql решает проблему с 5-секундной задержкой во время завершения, но при этом любая попытка сделать mysql_connect() оканчивается падением CLI или Апача. Гонять и то и другое отладчиком нет ни времени ни желания, так что с 5-секундной задержкой придется пока смириться. А вот с падениями апача похоже покончено. По непонятной причине PHP при запуске скрипта то выбирает libmysql.dll собственного разлива, то подключает библиотеку идущую с mysql сервером, директория bin которого прописана в PATH. Родную dll пришлось переименовать и апач стал работать стабильно.
Subscribe to:
Posts (Atom)