Feed on Posts or Comments

Monthly ArchiveOctober 2008




MacOS & Personal Daantje on 05 Oct 2008

Screenshot howto on MacOS X

Just here because I keep forgetting how to get the whole window… Stupid me ;)

  • Command-Shift-3:
    Take a screenshot of the screen, and save it as a file on the desktop
  • Command-Shift-4, then select an area:
    Take a screenshot of an area and save it as a file on the desktop
  • Command-Shift-4, then space, then click a window:
    Take a screenshot of a window and save it as a file on the desktop
  • Command-Control-Shift-3:
    Take a screenshot of the screen, and save it to the clipboard
  • Command-Control-Shift-4, then select an area:
    Take a screenshot of an area and save it to the clipboard
  • Command-Control-Shift-4, then space, then click a window:
    Take a screenshot of a window and save it to the clipboard

LDAP & Debian & Linux & MacOS Daantje on 05 Oct 2008

Use a Debian Slapd to sync MacOS X Address book

I’ve attempted this a lot of times. Now it works (sort of, but it still needs some tweaking). What you’ll need is a Debian server running a slapd daemon. You can get this with apt-get, of course… It could be handy to have the utils too and I use the GPL-ed handy web based ldap management tool phpldapadmin. I like it, it’s small and easy to work with… So the apt-get command should be like;

apt-get install slapd ldap-utils phpldapadmin

Now after you’ve configured your slapd and phpldapadmin you should be able to login into your ldap server. I used phpldapadmin for that. Remember that you’ll have to use the DN you’ve configured earlier. It look something like ‘cn=admin,dc=subdomain,dc=domain,dc=com’. Yes it’s the complete string, not only ‘admin’!

Now go to addressbookserver.com and download the latest version of ABxLDAP (AddressBook X LDAP), I’ve used for this how to ‘ABxLDAP_v1.1.16_31_May_2008.dmg’.

After you’ve installed it, check the mounted disk image. You should have a file called ‘abxldap.schema‘, it can be found in the folder ‘LDAP Schema Extension’. This file should be uploaded and placed into ‘/etc/ldap/schema’ on your Debian server. Edit your /etc/ldap/slapd.conf and add the schema with this include line;

include         /etc/ldap/schema/abxldap.schema

Now restart the ldap server…

/etc/init.d/slapd restart

Now comes the magic… You’ll have to populate the ldap directory, so ABxLDAP can sync with it… What I did was this:
I’ve made a text file called ‘populate.ldif‘. This file contains the following text:

dn: ou=addressbook,dc=subdomain,dc=domain,dc=com
objectClass: organizationalUnit
ou: addressbook

NOTE: ‘dc=subdomain,dc=domain,dc=com’ should be what ever you’ve configured slapd with in the first step!

Now use phpldapadmin to import the ‘populate.ldif‘ into your ldap directory. When you don’t have any errors, you should be able to sync with ABxLDAP for the first time.

Go to your System Preferences on your Mac and pick the ABxLDAP panel. Fill all the fields. What I use is this:

Screenshot ABxLDAP config

Remember to quit your System Preferences after you filled all fields, and start it again and hit the Sync button, or else it will not work!

That’s it, all should be working fine. Every time you edit something in your Address Book on your Mac, it should sync the whole ldap. Also when you delete or edit a record directly on your ldap, it will sync. The only thing I’ve to figure out is, how to sync periodically, so the Mac always have the latest version. Now it only syncs when something is changed in your Address Book, or when you hit the sync button in your ABxLDAP in System Preferences.

Almost forgot to mention. In case of troubleshooting set in slapd.conf loglevel to 448 instead of 0 to get debug log messages in /var/log/syslog.

So more is coming later… Now it’s time for a beer!

eee & Debian & Internet & Windows Daantje on 04 Oct 2008

How to get my EEE online through my HTC Touch Cruise…

I want to have internet all the time. And I have… I have a HTC Touch Cruise running Windows Mobile 6.1 Pro with a HSDPA connection. Now this is a way to connect the EEE to the HTC via bluetooth and use the windows mobile device as a gateway to the internet. By the way, I’m running Ubuntu-eee… If you are running Xandros, the default distro, try to Google on “Xandros bnep0 windows mobile

First get the right software. Open a terminal and install the Bluez gnome utilities.

sudo apt-get update
sudo apt-get install bluez-gnome

Now open the file ‘/etc/default/bluetooth’ and be sure that the following is set;

BLUETOOTH_ENABLED=1
PAND_ENABLED=1

Now I did a reboot, you could restart some services, but I was lazy. Now, after you insert your Bluetooth dongle (or when you have it build in), you should have a bluetooth icon in the upper right corner. With that tool you should be able to pair with your Windows Mobile device. If you don’t know how, try it the other way around, use your mobile to pair with your eee. After the exchange op pins the two devices should be paired.

Open up the terminal again and do the following command to scan for your mobile…

sudo hcitool scan

You should get something like this;

Scanning ...
00:17:83:xx:xx:xx HTC_P3650

This is the mac address of your mobile device and you’ll need it later on to connect.

Okay, we have a working bluetooth dongle and we can see the mobile… Now some config we need to have to get the link working. Append the following to ‘/etc/network/interfaces‘;

iface bnep0 inet manual
down dhclient -r -pf /var/run/dhclient.$IFACE.pid $IFACE
down pand -K
up pand -Q -n
up dhclient -pf /var/run/dhclient.$IFACE.pid $IFACE

We are done configuring the eee. The following steps should be made every time you want to get the eee online:

Open on your Windows Mobile device the application ‘Internet Sharing’, you can find it in your Programs folder. Start a Bluetooth PAN connection and wait for it to start.

Open up a terminal on you eee and do:

sudo pand -c 00:17:83:xx:xx:xx -n

Ofcource, you’ll have to replace the 00:17:83:xx:xx:xx with the mac address of your device.

You should get this as result:

pand[8033]: Bluetooth PAN daemon version 3.26
pand[8033]: Connecting to 00:17:83:xx:xx:xx
pand[8033]: bnep0 connected

Now bring the network interface up and get an IP from the windows mobile device:

sudo ifup bnep0

Now wait for the following result, it should look something like this:

pand[8060]: Bluetooth PAN daemon version 3.26
pand[8060]: Inquiring
pand[8060]: Searching for NAP on 00:17:83:xx:xx:xx
pand[8060]: Connecting to 00:17:83:xx:xx:xx
pand[8060]: Connect to 00:17:83:xx:xx:xx failed. Connection refused(111)
pand[8060]: Searching for NAP on 00:16:CB:xx:xx:xx
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

wifi0: unknown hardware address type 801
wifi0: unknown hardware address type 801
Listening on LPF/bnep0/00:10:60:a2:8c:dd
Sending on   LPF/bnep0/00:10:60:a2:8c:dd
Sending on   Socket/fallback
DHCPREQUEST of 192.168.0.85 on bnep0 to 255.255.255.255 port 67
DHCPACK of 192.168.0.85 from 192.168.0.1
bound to 192.168.0.85 -- renewal in 111983 seconds.

YES! We have an IP! You can double check with the ‘ifconfig’ command, or just try to open up Firefox and start browsing ;) Now close your eee, walk to the pub, get a nice cold one. Open your eee and start browsing the net ;) w00t!

To get the interface down again, use:

sudo ifconfig bnep0 down

Most of the info I’ve used, can be found in this forum post. Ive written a little shell shell script to bring the connection up, because it’s hard to remember all of this after some beers ;)


#!/bin/sh
sudo pand -c 00:17:83:xx:xx:xx -n
sleep 5
sudo ifup bnep0
echo "Drink beer!"

Don’t forget to make the file executable with ‘chmod +x myscript.sh’, or something like that…

eee & Debian & Linux & Tech Daantje on 03 Oct 2008

Ubuntu on my Asus EEE-pc

It has been a while after my last post, been very busy with a few big projects. But I found the time to buy a Asus EEEpc. It’s a real small laptop running Xandros Linux. I’ve reinstalled the little machine with Ubuntu. There is a dedicated Ubuntu distro for the eee. You can find it on http://www.ubuntu-eee.com. The first attemt to install it, I used a USB stick, but it crashed after a vew seconds… The USB stick was corrupt. After a view tries I thrown the stick in the trash an got a SD card. Now the installer did his work without any errors! Now I’ve got a real distro! Apt-getted quanta, apache, php, mysql and now I can develop anywhere!