Saturday, July 04, 2026

FSCK an HFS+ disk in Ubuntu Linux

I was trying to create a disk image of my 13" MacBook, after its ill timed death, in Clonezilla with the hope that I could reuse my Sandisk SSD for other high speed data storage purposes. Unfortunately, the ill timed death means the volume was not unmounted cleanly which results in Linux HFS driver loading the disk in read only mode. Clonezilla, based on Ubuntu, will refuse to close a drive that reports that its not clean. Unfortunately, I don't have a Mac with which I can run diskutils so I need to compile it myself. Here is how to do it. This was testing on Ubuntu 13.04 (Saucy) but should work well on any other system.

sudo apt-get update && sudo apt-get install build-essential
mkdir ~/hfs.util && cd ~/hfs.util
wget http://www.opensource.apple.com/tarballs/diskdev_cmds/diskdev_cmds-332.14.tar.gz && wget http://pkgs.fedoraproject.org/repo/pkgs/hfsplus-tools/diskdev_cmds-332.14.patch.bz2/e488b401bec3d5b6884afe4e2a8086e3/diskdev_cmds-332.14.patch.bz2
tar zxf diskdev_cmds-332.14.tar.gz
bunzip2 -c diskdev_cmds-332.14.patch.bz2 | patch -p0
cd diskdev_cmds-332.14
make -f Makefile.lnx
sudo cp fsck_hfs.tproj/fsck_hfs /usr/local/sbin/fsck.hfsplus

Congrats, you now have fsck for HFS+ volumes on Linux!

Now to repair your drive.

Find your drive and ensure that its not mounted. In my case, it was /dev/sdb2


Tuesday, June 11, 2013

ALT TAB with Citrix ICA Remote Access Client

For some reason, the folks at Citrix don't feel that settings should be easily configurable nor should experiences be consistent.  If you are remoting into a machine, its my assumption that for the majority of cases, you would want to assume that remote machine as your own, ergo, all the commands you are used to using should be passed through and just work.  Alas, this is not the case.  Its very jarring when connected to a remote session, especially in full screen view, and you hit a key combination like ALT + TAB and you get thrown back into your host desktop.  Since I perform a lot of after hours support through Remote Access to my work, I want to ensure my experience is seamless since I often have dozens of windows open at a time.

The most reliable way to enable ALT+TAB I have found is to edit the wfclient.ini file.  This file is available whenever you install the Citrix Receiver client.

It can be found in the following locations:

Windows
%appdata%\ICAClient\WFCLIENT.INI

Linux and OSX
~/.ICAClient/wfclient.ini

In that file you want to find the [WFClient] and add the following to the end of the file.
TransparentKeyPassthrough=Remote

Restart your ICA or Remote Access session and enjoy.  This should work whenever the session has focus regardless of if it is full screen or not.  If you only want it to pass through when its full screen, then change Remote to FullScreenOnly.

Thursday, April 04, 2013

Updating Time over HTTP on Raspberry Pi

The Raspberry Pi is a wonderful device that lends itself to creating all sorts of projects in remote locations. Network connectivity is the way to make the Pi sing and with the addition of a cheap wireless adapter based on a RTL8188CUS chipset, you can shove the Pi into some very non traditional installations.  Unfortunately, the Pi does not include a realtime clock due to cost and complexity concerns so network connectivity is required to bootstrap the current time and date.  By default, Raspbian ships with a NTP (Network Time Protocol) dameon which will fetch and set the current time and date from the configured network time servers.  The challenge arises if you need to set the time while connected behind a very restrictive proxy that doesn't allow for anything other than HTTP (TCP 80).  Welcome htpdate to the rescue which will allow you to set the system time within a second or two based on the http response headers of ordinary websites.  Unfortunately, there is no ARM based debian package for htpdate currently so apt-get install htpdate will say package not found.  I will show you a good way to get htpdate up and running on a raspberry pi running raspbian by building your own debian package which makes for easy uninstalls.  I recommend SSHing into your Raspberry Pi to make this as easy as possible.

Building and Installing htpdate as a Package

After ensuring you have a network connection, install checkinstall

sudo apt-get install checkinstall


Create a directory to download htpdate

mkdir ~/download/htpdate && cd  ~/download/htpdate


Find the URL to the current version of htpdate-xxx.tar.gz here.  I am currently using htpdate-1.0.5.tar.gz for this example.

Now download the current version using the URL you discovered above and extract it (of course change the version number if you are not downloading 1.0.5)

wget http://www.vervest.org/htp/archive/c/htpdate-1.0.5.tar.gz && tar -xvfz htpdate-1.0.5.tar.gz

Lets change into the extracted directory and compile the project (takes about 15s on the Model B)

cd htpdate-1.0.5 && make

Now we are ready to build the debian ARM package.  (Running this as root is very important)

sudo checkinstall -D make install


Accept the default set of package docs when asked

Should I create a default set of package docs?  [y]: y


You will be asked to provide a short description; I chose HTTP Time Protocol. (Note you have to hit ENTER twice)

Please write a description for the package.
End your description with an empty line or EOF.
>> HTTP Time Protocol
>>


You will be asked if you want to change any of the default package values.  I opted not to since I am not publishing this package so just hit ENTER to continue.

Congrats.  The package has been built and installed.  You could even copy the resulting .deb file to another Pi and install it, changing the dir to the dir of your copied deb file.

sudo dpkg -i /home/pi/download/htpdate/htpdate-1.0.5/htpdate_1.0.5-1_armhf.deb


Testing and Verification of htpdate

Now that we have a package and its installed, we can move on to testing that htpdate does what we need.
Lets ensure that htpdate can reach out and fetch the dates from some websites that are geographically close to you.  -d infers debug and -q says to merely query the sites, don't set the time.

sudo htpdate -d -q  www.google.com wwww.nist.gov www.uic.edu



You should see some output similar to the below

#: 3 mean: 0 average: 0.333 Timezone: GMT-6 (CST,CDT) Offset 0.333 seconds



Looks good.  Now lets commit and set the date and keep it up to date by running this as a dameon. -D runs htpdate as a dameon, -s will force change the clock on the first poll and then provide adjustments there after, and -l will log the status to the syslog (/var/log/syslog)

sudo htpdate -D -s -l www.google.com wwww.nist.gov www.uic.edu


Making htpdate Startup on Boot

So far we have downloaded the source code, compiled it, created a nice installable and removable debian package, and shown how to query and set the date using htpdate.  Unfortnately, if you reboot or have the pi off for long periods of time, your system time will quickly drift.  To fix that, we can start the htpdate in dameon mode on boot.  This section assumes you have familarity editing text files on linux and I will use nano for my examples but feel free to use your favorite text editor such as vim or emacs.

Lets become root

sudo -s


Enter into the init.d directory, and create a new startup script for htpdate, and make it executable

cd /etc/init.d/ && nano htpdate && chmod +x htpdate


Paste the below into your text editor (modify HTPHOSTS with a list of your own geographically close sites if you wish) and then save (CTRL + O) and exit (CTRL + X)

#!/bin/sh

### BEGIN INIT INFO
# Provides:        htpdate
# Required-Start:  $network $remote_fs $syslog
# Required-Stop:   $network $remote_fs $syslog
# Default-Start:   2 3 4 5
# Default-Stop:    0 1 6
# Short-Description: Start htpdate in daemon mode
### END INIT INFO

# RUNASUSER will generally be pi, unless you've created your specific user account
export RUNASUSER='pi'
# Space delimited list of sites to pull time info from without the http://
export HTPHOSTS='www.google.com wwww.nist.gov www.uic.edu'

case "$1" in
  start)
    # if it's start, then start htpdate
    su $USER -c "/usr/bin/htpdate -D -s -l -i /tmp/htpdate.pid -u nobody:nogroup $HTPHOSTS"
    echo "Started htpdate for $RUNASUSER using /usr/bin/htpdate -D -s -l -i /tmp/htpdate.pid -u nobody:nogroup $HTPHOSTS"
    ;;
  stop)
    # if it's stop, then just kill the process and delete the pid file
 pkill -F /tmp/htpdate.pid
 rm -rf /tmp/htpdate.pid
 #kill any rogue instances of htpdate 
 killall -q -w htpdate 
    echo "htpdate stopped"
    ;;
  *)
    echo "Usage: /etc/init.d/htpdate {start|stop}"
    exit 1
    ;;
esac
exit 0



Make sure that you have no mistakes by stopping and starting htpdate


/etc/init.d/htpdate stop && /etc/init.d/htpdate start


You should see that the process started Started htpdate...

Now lets add it to the startup process


update-rc.d htpdate defaults



Congratulations!  You can now reboot and htpdate will automatically update the time even if you have a restrictive firewall and will only do so after the network connection has been established.


Sunday, February 03, 2013

Issues with VirtualBox on Ubuntu 12.10


Problem:

Are you having issues starting virtual box after installing updates?  Annoying isn't it?  Errors like the following:
Kernel driver not installed (rc=-1908)The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing'/etc/init.d/vboxdrv setup'as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.
Maybe you have an issue with the networking card when operating in bridged mode and get an error similar to the following (note might also say HostInterfaceNetworking-wlan0) :
Failed to open/create the internal network 'HostInterfaceNetworking-eth0' (VERR_PERMISSION_DENIED). Failed to attach the network LUN (VERR_PERMISSION_DENIED)

Solution:

VirtualBox recommends you run sudo /etc/init.d/vboxdrv setup but unfortunately this is not available on most Ubuntu installations.  I would recommend running the following:
sudo apt-get install linux-headers-$(uname -r)
sudo apt-get --reinstall install virtualbox virtualbox-dkms 
sudo modprobe vboxdrv
sudo modprobe vboxnetflt
sudo modprobe vboxnetadp

Good luck!

Saturday, January 12, 2013

How to set Full Pixel on a Sony KDL-55EX720

I recently got a Monoprice mini DisplayPort to HMDI w/Audio adapter for my Dell XPS 13 running Ubuntu 12.10 Quantal Quetzal.  I am happy to report that audio over HDMI works just fine out of the box with no software to install as long as the device receiving the signal supports audio over HDMI such as my Sony KDL-55EX720. Unfortunately, the picture was overscanned (cut off on the edges).

In order to fix this, you have to set your Display Area to full pixel.  Unfortunately I could not find out for the life of me how to get to this option on my TV.  Fortunately, I ended up stumbling onto it.

  1. Hit the HOME button on your Sony remote.
  2. Scroll to the input connection that your computer or other overscanned device is on (mine is HDMI 3).
  3. Hit the RIGHT arrow on the circle pad until you get to the options menu (i-Manual, Preferences, Sound, Picture and Display, etc)
  4. Select Picture & Display by hitting the Select button (center of circle pad)
  5. Scroll down to Screen and hit Select
  6. Scroll down to Auto Display Area and hit Select and turn that option Off.
  7. Scroll down to Display Area and set this to Full Pixel
  8. Hit RETURN until you exit the menu.  Your display should now full fill the screen.
If you have issues with getting the picture to show up at all, then open you Display control panel and click Detect Displays.

Sunday, December 23, 2012

dpkg: error processing icaclient (--configure)

When trying to install the Citrix Receiver application (icalient) on Ubuntu 12.10 x64, ran into an issue with one of the post installation scripts (thanks Citrix!?).

You will notice that when setting up the icaclient or any package thereafter you get a post installation error as seen below:
dpkg: error processing icaclient (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
icaclient
To fix this, you have to make a simple change to the following file
/var/lib/dpkg/info/icaclient.postinst
Open the file in your favor text editor and find the following line (typically Line Num: 2648)
echo $Arch|grep "i[0-9]86" >/dev/null
Change it to the following (pay close attention to the -E, changes have been bolded)
echo $Arch|grep -E "i[0-9]86|x86_64" >/dev/null
Now the setup should complete successfully after running the following command
dpkg --configure icaclient

Saturday, December 22, 2012

Challenges when configuring i1 Profiler Display Pro

Recently I was requested to assist with developing a color correction profile for photo editing workstation.  I used a XRite i1 Display Pro to develop the profile against a Dell U2410 and a Dell 1907FP dual monitor setup.  I thought this would be an easy 5 minute process.  I was wrong.

Couple of things you need to remember:

  1. Turn UAC off.  Seems that i1Profiler needs to read in LUT values and write new system ICC profiles.  UAC sometimes interferes with that.  You can turn it back on when you have finished with the calibration process.
  2. Make sure that "Use Windows display calibration is set" otherwise you might get the dreaded "Failed to apply video LUTS" error message after the calibration sequence finishes.  Follow the instructions from XRite on how to correct this. 
  1. Open Control Panel and then"‘Color Management", a Color Management setup window for the User Level appears. In the "Devices" tab, add a check to "Use My Settings for this Device". Make sure that the X-Rite created monitor profile is selected as the default. Click on the "Advanced" tab and check the box to "Use Windows Display Calibration" to control loading the video LUTs. Note: if the option "Use Windows Display Calibration" is grayed out, click on "Change System Defaults" bottom left in the window. A Color Management setup window for the System Level appears. Do not apply any changes for assigned profiles here. Click on "Advanced" tab and select the option to "Use Windows Display Calibration". Select "Close" and the exit "Color Management".

After you get everything calibrated, you still might run into issues such as Windows Photo Viewer showing your images a lot darker than you would expect.  Photoshop and Lightroom will show the proper color, luminance and saturation but Windows Photo Viewer will show images that are dark unless you "play" then in Slideshow mode.  If so, the reason is you need to tell i1 Profiler to save the ICC profile in version 2 format.  The instructions here are a little dated but will get you down the right path.

Once you create the ICC profile, verify the profile by opening up the Color Management control page, clicking All Profiles, then selecting your custom profile under ICC Profiles and verifying the version.

Thursday, August 30, 2012

Suppress or Hide Network Error Dialog Boxes

If you are like me, you often work with a portable computer and sleep your computer between commutes from the office, home, and road.  If you wake up your computer on a different network than the one you were on previously, you might be in for quite the annoyance if you had bunch of Explorer windows with UNC paths open.  Suddenly those paths are not found and potentially dozens of "Network Error Windows cannot access \\serverfoo\some\path\bar" messages. Of course, they cannot be accessed, that network is no longer available.  Clicking Cancel on each dialog is annoying.  This is where AutoHotKey can step in.

This nifty program allows you to script all sorts of "macros" to automate various tasks on your computer.  In many ways its similar to AppleScript but more powerful.  You can create shortcuts, remap keys, or in this case, eliminate pesky dialog boxes.

In this script, we are going to create a persistent script, one that will stay running and continue to refire the timer using the interval we specify:


#Persistent
SetTimer, CloseNetworkErrorDialog, 20000
return

CloseNetworkErrorDialog:
SetTitleMatchMode, 2
WinGet, id, list, Network Error
Loop, %id%
{
    this_id := id%A_Index%
    WinGetTitle, this_title, ahk_id %this_id%
    PostMessage, 0x112, 0xF060,,, %this_title%
}
Return


As you can see, this is a really simple script that has a function named CloseNetworkErrorDialog that is called every 20 seconds.  CloseNetworkErrorDialog loops through the open windows whose title contain the phrase "Network Error", gets the exact title of the window, and sends it a Close Window command.  You can read more about creating AutoHotKey scripts here.

Peace at last and it only took 5 minutes to write.

Thursday, October 20, 2011

Installing Lubuntu 11.10 (Oneiric Ocelot) natively on a CR48

I started this because well, for one, ChromeOS is still not ready for prime time. Tabs would sad tab, machine would run slow, etc. Its not a dinky machine. Its a 1.66Ghz Atom processor with 2GB of RAM. Definitely nothing to scoff at. Ubuntu was a lot more stable however its fairly heavy weight so I got the idea to try something user friendly but lighter. Unfortunately, Lubuntu just came out this month and there are no CR48 specific guides for it. In the past 24hrs, this is what I have figured out.

Process
1.Generate a USB stick using UNetbootin and Lunbuntu and make sure to set at least 128MB free for "Space used to preserve files across reboots" else you will end up in a never ending loop of IO errors. http://unetbootin.sourceforge.net/
2. Install InsydeH20 using these instructions
3. Once loaded enter the BIOS by pressing the F2 key (-->) and then load Optimal Defaults, save, and exit.
4. Insert your USB drive in the CR48 and turn on the CR48. It should boot into Lubuntu. If not, hold down the power button to turn it off and then hit F10 (Vol+) to enter the boot menu.
5. I suggest trying before installing because then you can download updates and third party libraries as part of the install process since you can connect to a wireless network. I will assume you do the same
6. Once you connect to your wireless network, click the Install Lubuntu icon on the desktop. Choose your language, then select the options to download updates and and install third party software. Choose to erase all partitions (sometimes labeled as "Something else" so you can define your own partition layout)
7. Once you have the gparted running, click each partition and delete it. There are a lot of them. Don't stop till the drive is completely empty.
8. Once they are all deleted, click your free space, then click Add. Type: Primary, Size: 200MB, Beginning, Ext2, Mount Point: /Boot
9. Click add again: Accept the defaults except choose / as the mount point.
10. Click Install Now. If you get a warning about swap space, just click Continue. By not creating swap space, we are saving the SSD from excess writes. Follow the rest of the prompts while Lubuntu installs.
11. Once you finish with the prompts, open up the terminal, then run sudo gparted Click the your boot partition, and the click Partition -> Manage Flags. Click Boot. Then close gparted. Wait for the install to finish. [For some reason, the installer doesn't set this flag and grub then fails to install, therefore, you have to do this within the first few minutes after finishing step 11 else the grub portion of the installation will fail] Also, keep the mouse moving. When the screen blanks, the backlight doesn't turn back on. If this happens to you, use a flashlight to see the screen.

Hurray Lubuntu is now installed! Now to customize it for the CR48.

Add Sync option to /boot
Since we used ext2, there is no journaling on this partition so we want to make sure that any writes are flushed to disk before the IO call returns. This will keep things fast and reasonably safe from corruption.
1. Edit /etc/fstab as root in an editor.
2. Change defaults for the /boot partition to rw,suid,dev,exec,auto,nouser,sync without the quotes of course.

Add support for the Brightness and Volume keys
1. Open a root prompt (sudo -s in the terminal)
2. Install xbacklight apt-get install xbacklight)
3. Edit your keyboard short cut file (~/.config/openbox/lubuntu-rc.xml) Search for xbacklight. Notice that the entire section for Multimedia Keys and LCD backlight is commented out. Remove the --> and place it at the end of the <!-- comment line. Remove the first keybind section for C-F7. Change C-F10 to F6. Change C-F11 to F7 and change the -inc 10 in the execute section to -set 100
4. Search for amixer. Change XF86AudioRaiseVolume to F10. Change the XF86AudioLowerVolume to F9. Change the XF86AudioMute to F8.
5. Save and close the file.
6. On the root prompt, type openbox --reconfigure Your brightness and volume keys should work now.

Disable Track Pad while Typing
1. Open /etc/xdg/lxsession/Lubuntu/autostart in your favorite text editor and append the following

@/usr/bin/syndaemon -i1 -d
@/usr/bin/synclient PalmDetect=1
@/usr/bin/synclient PalmMinWidth=5
@/usr/bin/synclient PalmMinZ=200

2. Restart the computer.

This is the basics. Feel free to customize in other ways as well. The boot up time is amazing. About 10 seconds after the POST process. 88MB of RAM used after bootup!

--------------------------------------------------------------------
UPDATE NOV-19-2011
_______________________________________
I found that the syndaemon client would sometimes stop re-enabling the mouse after typing. This is likely a bug in syndaemon but rather than hope for a fix, when your mouse doesn't work, you want nothing more than for it to work again. I decided to write a little script and then bind it to the CTRL+ALT+SHIFT+M keyboard shortcut. Here is how I did this.

1. Make a directory in your home directory named scripts (hint, use lxterminal for the below)

mkdir ~/scripts

2. Create a file named fixmouse.sh

leafpad fixmouse.sh

3. Paste the following in, save it, and then close the text editor


#!/bin/bash
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Off" 8 0
killall syndaemon 2>/dev/null
syndaemon -i1 -d


4. Now edit your keyboard shortcut file (~/.config/openbox/lubuntu-rc.xml) and search for </keyboard> Add the following line right above it but replace <USERNAME> with your actual username.


<keybind key="C-A-S-M"><action name="Execute"><execute>/home/<USERNAME>/scripts/fixmouse.sh</execute></action></keybind>


5. Now reconfigure openbox to pick up your changes

openbox --reconfigure

You should now be able to hit CTRL+ALT+SHIFT+M to restart your mouse!

Thursday, June 09, 2011

How to run diskutil in single user mode on OSX Leopard and Snowleopard

After spending some wonderful time troubleshooting a Macbook Pro with a failing drive, I wanted to know if the filesystem was corrupted or if it was indeed a disk failure. In order to know this, I had to read the SMART data off the drive. Here is my attempt

First you need to boot into single user mode by turning on the computer and immediately pressing CMD + S where the CMD key is the Apple key. Continue to hold down command + s until you see the verbose logging appear.

Then mount your drive in r/w mode with:

mount -uw /

Then we need to load a couple of required system modules. DirectoryServices is only required if you want networking support.


launchctl load /System/Library/LaunchDaemons/com.apple.notifyd.plist
launchctl load /System/Library/LaunchDaemons/com.apple.kextd.plist
launchctl load /System/Library/LaunchDaemons/com.apple.diskarbitrationd.plist
launchctl start com.apple.diskarbitrationd
launchctl load /System/Library/LaunchDaemon/com.apple.DirectoryServices.plist
launchctl load /System/Library/LaunchDaemons/com.apple.configd.plist

Now you should be able to at least run diskutil. You can run the following to check your specific drive
diskutil /dev/disk0sd2

You can enumerate your drives with

ls /dev/disk *


Right now its hanging for me but at least its running in single user mode which is better than before.

Tuesday, June 29, 2010

ImportError: No module named django

Have you ever installed appengine on a Mac, then installed django and then launched your app only to have appengine scream back at you "ImportError: No module named django"? Well suffer no more. Appengine for some reason expects django in the following folder:

/Library/Python/2.6/site-packages

Provided that your running Python 2.6, just place your un-tarballed django folder in that dir and appengine once again will be happy.

Now this might be confusing because if you just launch python, it will tell you its looking in another directory which might be true but is certainly not what appengine is doing.

>>> import os, django
>>> print os.path.dirname(django.__file__)
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django

Wednesday, May 26, 2010

Voice to Text Input on any Android 2.0 Text Field

Do you have an HTC Android phone? Do you have Android 2.0? Do you want the ability to enter text with your voice? Then this mod is for you.

Here is how you download and enable the Voice to Text IME mod.

1. From the home screen click the Menu button then click Settings then click Applications. Make sure the Unknown Sources check box is checked.
2. On your Android browser, download this file http://www.mediafire.com/?hknzjex4tnm It will load a web page, click the "Click Here To Start Download" link
3. After it downloads, open the HTC_IME_LO_25.apk file that downloaded. It should open in the Market app. Click Install and accept the prompts.
4. After its installed, go back to the Home screen, click Menu, then Settings, then Language and Keyboard. Click the check box next to the HTC_IME mod.
5. Open an application with a text input box (such as the search bar). Long press the input box. Select Input Method then select the HTC_IME mod.
6. You now have a keyboard with a Voice microphone on the lower left hand side.

Enjoy!

Friday, January 08, 2010

Cannot search contacts in Office Communicator 2007 R2

To resolve this issue, first close Communicator, then search for GalContacts.db* and delete any db or db.idx files that begin with GalContacts. Restart Communicator and wait up to 15mins for the address book cache to rebuild.

Thursday, November 19, 2009

Creating a new eclipse project from existing source

After struggling to figure how to create a project form source the first time, I figured it was so easy that I would remember it. Neverless, several months later I failed to remember just how easy this is.

Here is the steps.

1. Click Window -> Show View -> Other
2. Type 'File' in the search box (without quotes)
3. Open the file view
4. Browse to the root of the source folder
5. Right click and click Promote to Project.


Enjoy!!

Saturday, September 12, 2009

Getting StumblerPlus working on the 3.0 iPhone/iTouch

If Stumbler Plus is crashing on your 3.0 firmware of the iPhone or iPhone touch then I would suggest the following:

1. Install Stumbler Plus, wget, and openSSH via Cydia
2. Restart the device by holding down the power button and choosing shutdown then power up again
3. Connect to a wireless network and get the IP (Settings -> Wi-Fi -> click circled blue right arrow for more details)
4. With an SSH client (putty or command line ssh) connect to the device IP. Accept the certificate. Login with "root" as the user and "alpine" as the password
5. Type the following:

wget http://www.iphone.mysticwall.com/download/StumblerPlus-1.2rev1.tar.gz
tar -xf StumblerPlus-1.2rev1.tar.gz
cp -vfr StumblerPlus.app /private/var/stash/Applications.pwn/
rm -vfr StumblerPlus.app

6. You can now launch Stumbler Plus

Wednesday, May 20, 2009

Google Chrome is pissing me off.

First off, let me say I am a big fan of Google, the cloud model, and the approach of Lean, Mean, and Clean. I have to admit that, despite being an early adopter of Google Chrome, and being in love at first sight, my relationship with Google Chrome is starting to sour.

I have three specific reasons why Chrome is going to make me end up running back to Firefox.

  1. Tabbed Browsing: Love it! What I hate is in Chrome, mouse clicks seems to be sticky, that is, if you click a tab and then move your mouse to start prepare to click somewhere else, Google Chrome will sometimes lag and register the mouse up event late and think your doing a tab drag and not a tab focus. Now suddenly instead of bringing focus to the desired tab, you just inadvertently dragged the tab out to its own window and now have to drag it back again. I have this problem on every computer I use from laptop to powerful desktops. I don't have this issue with any other browser. Stop. Just stop it. Even as I write this, this issue is occuring. Its especially exasperated when remoted in via terminal services over a celluar link.
  2. Terrible render performance: Over time, Chrome has gotten much slower when needing to repaint a page (e.g. when switching from one app to another. It seems that a large amount of that page is getting, well, paged. Chrome makes heavy use of its cache which, naturally, is written to disk. It seems when a page has not been in focus for while, Chrome is clearing memory and then having to reload the cache to paint the page when it comes in focus again. Not helpful when your relying on minimizing disk activity to conserve battery on your mobile device.
  3. Safe browsing sucks! The safe browsing DB is used by Chrome for its malware and phishing detection capability. The issue with this is that its slow, causes heavy IO, and again bad for road warriors. They have been making some changes that help limit this so it doesn't cause your system to be unresponsive (which is the main reason I switched to the google DEV channel) however, open FileMon and just watch how often these safebrowsing sql lite dbs are hit. I think I might actually turn off safe browsing and see if it helps.
Google knows its the little things that count when it comes to a user's experience. Even if I end up going back to FF full time, Google Chrome would have still been a success. Its pushing the browser market to reconsider simplicity. Do one thing and do it well. Speed and stability are the second and third most important aspects in a browser behind rendering the page correctly (including images and JS/Flash).

Saturday, April 05, 2008

Registering Google Desktop Enterprise to Lotus Notes

If your one of the unfortunately people that is forced to use Lotus Notes everyday, your going to love what Google Desktop Enterprise can do for you. Google Desktop Enterprise comes with a Lotus Notes plugin that allows for automatic and local indexing of your Notes mail. You might mention that you can setup indexes in Lotus Notes either on your local or server replicas. This is true but searching in Notes leaves much to be desired.

Normally you don't worry about the registration as the installer manages this for you. The problem comes when you have to reinstall notes and forget that you had Google Desktop installed. Not wanting to reindex all your mail again, how do you get that plugin back into Notes?

First locate your notes folder. For me its C:\Notes but it could also be C:\program files\Lotus Notes\. Now locate the notesgdsplugin.dll. You might have to snag this from a coworker if you can't find it anywhere on your computer. Copy this file into the root of your notes directory.

Now locate your notes.ini file and add the following under the [Notes] section. Change path_to_notes to match your installation directory. Restart Lotus Notes and Google Desktop should alert you that its now installed.


AddinMenus=notesgdsplugin.dll
GDSIndexOnIdle=0
GDSFilePath15=C:\path_to_notes\data\bookmark.nsf
GDSIndexEncrypted=1
GDSIndexDrafts=1
GDSIndexDiscussion=1
GDSFreqMinutes=1

Friday, November 23, 2007

IP Communicator Overtakes Port 80

Update 10-19-2011
Just to keep this up to date, I have tested this on IP Communicator 7.0.6.0 running on Windows 7 32bit and confirmed that it indeed still runs a web server HOWEVER, setting the WebServerDisabled registry key no longer works to disable the local webserver.

Now you need to browse to your Cisco IP Communicator install directory (typically C:\Program Files\Cisco Systems\Cisco IP Communicator) and then rename the HTTPService.dll to HTTPService.dll.old. Make sure IP Communicator is not running when you do this. Now start IP Communicator. You might get a COM Surrogate error but it won't prevent you from using IP Communicator normally without that pesky webserver running.
---------

Many companies these days use VoIP (Voice Over IP) as a cheaper alternative to expensive PBXs and the cost and issues of maintain another copper plant (thats industry speak for all that phone wiring). One of the benefits of VoIP is the portability of your phone. With IP Communicator (requires a per seat license from Cisco) and a secure connection to your corporate network, you can work remotely as seamlessly as if you were at your desk even if it is around on the other side of the world.

Despite the benefits, I noticed a downside to the Cisco IP Communicator client. It appears that it contains an embedded webserver from Allegro Software called RomPager which is basically just a super thin webserver capable of HTTP requests and CGI. Its issue: it runs on TCP PORT 80!! You might think "no worries, I am already running a webserver which is bound to TCP Port 80 so when it tries to bind to it, it will fail. Nope, sorry, its smarter than that. What does it display? Basically, it displays connection and settings information in a webpage format presumably so your technology department can determine what settings the client has without walking the user through an annoying series of menus.

A thorough search through the preferences and options revealed no mention of a webserver or management page. My next thought was, "Can I at least change the port". I turned to the Cisco Administrative Guide for more information. Fortunately, they documented a registry key you can set to disable the webserver but no way to change the port. Good enough I suppose.

Here is the registry key for your enjoyment.


1. Start -> Run -> Regedit
2. Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Cisco Systems, Inc.\Communicator
3. Create a new DWORD called WebServerDisabled (skip this step if it already exists)
4. Set its value to 1
5. Restart IP Communicator

Friday, August 17, 2007

Getting an OpenXML (.docx) file to open in OpenOffice.

So someone sent me this .docx file the other day. I don't have office installed and in fact I had no idea what .docx was. I actually thought it was a typo but after a little googling noticed it was the extension for Microsoft's new OpenXML format which is not yet standardized but can be looked up under ECMA 376. So how do you get it to open up in OpenOffice?

If you are using a RedHat, Suse, or other RPM based distribution, then its easy. Just go to Novell and download then install the ODF convertor.

If your running a debian based distribution, its a little more difficult. You still need to download the ODF convertor. Save it to a smart location like /downloads/ODF Convertor

Now if you don't have Alien installed, then you need to install it. Say yes to all the prompts.


root@laptop:~# apt-get install alien


Now we need to convert the RPM to a tar.gz file.


root@laptop:~/ODF Convertor# alien -ct odf-converter-1.0.0-5.i586.rpm


Now that the tar.gz file is generated, you need to extract it. I just used Gnome's fileroller but you can use the cammand line if you want.

Next we need to copy a bunch of files. Browse to the location where you extracted these files. then run the following commands.


root@laptop:~/ODF COnvertor/odf-converter-1.0.0.tgz_FILES# cp usr/lib/ooo-2.0/program/OdfConverter /usr/lib/openoffice/program/

root@laptop:~/ODF COnvertor/odf-converter-1.0.0.tgz_FILES# cp usr/lib/ooo-2.0/share/registry/modules/org/openoffice/TypeDetection/Filter/MOOXFilter_cpp.xcu /usr/lib/openoffice/share/registry/modules/org/openoffice/TypeDetection/Filter/

root@laptop:~/ODF COnvertor/odf-converter-1.0.0.tgz_FILES# cp usr/lib/ooo-2.0/share/registry/modules/org/openoffice/TypeDetection/Types/MOOXTypeDetection.xcu /usr/lib/openoffice/share/registry/modules/org/openoffice/TypeDetection/Types/


Thats it! Now just open OpenOffice and try to open your .docx file. It should work flawlessly.

Tuesday, July 31, 2007

Cloning a MAC address in IPCOP

IPCop is a great SOHO linux firewall distribution that is custom built using the Linux From Scratch (LFS) toolkit. I have been using it for many years first toying with the 1.3.x versions and finally deploying the 1.4.x versions to my home network and in productional enterprise environments. I have been very impressed that given minimal hardware (200MHz PII, 128MB SDRAM, and 10GB HDD), I have been able to obtain darn close to wirespeed routing with NAT translation for 100Mbps connections (actual speeds were able to hit 12MBps sustained). With built in DHCP server, support for up to four networks (public (RED), private (GREEN), DMZ (ORANGE), and a seperate LAN (BLUE often used for wireless networks), there are really a lot of options available.

My biggest gripe has been with their lack of supporting MAC address cloning. As many of you that have cable networks know, cable companies often use poor man's security by adding MAC address restrictions to their DHCP servers. In order to get an IP address that is routable to the the Internet, you need to have the MAC address with which you originally registered with the cable company. Many of us are ditching our Linksys boxes in order to use a better featured and more powerful firewalling solution and therefore our only option is to either clone our MAC or attempt to suffer through the tech support hotline music only to get a rep that has no idea what a MAC address is. Don't you hate it when you the customer have to tell the company's representative how to do their job?

Well, according to many of the blogs and posts out there, thats your only option with IPCop. I am here to say "Not any more." We just need to change the MAC address on the public interface BEFORE IPCop attempts to make a DHCP request. I figured out a real clean way to do this before after spending a few hours in the code base but have long since forgotten where I documented what I did. This time I had less time and had to find a faster way even if it was less elegant.

First log into the box (either on the console or through SSH) and login as root (you remember your root password right)? Edit the following file (vi and nano are installed by default):

nano /etc/rc.d/rc.red

This is merely a perlscript file that will get executed as the last part of the rc.netaddress.up process. Scroll past the first few lines. You will see a boilerplate header, some includes, some variable definitions, and finally, look for the section that says:

# read vars back from file

In my version (1.4.13), there are 4 lines after that line. Add a carriage return to get a new line and add the following line after all those &General:readhash lines:

system ('/sbin/ifconfig', 'eth2', 'down', 'hw', 'ether', '00:12:ef:34:2a:ee');

Replace eth2 with the name of your WAN (RED) interface and, of course, use the MAC address which you want the IPCop box to clone. Save the file, reboot, and enjoy your night free of long monotonous elevator music.