This is a quick howto on getting proximity running on LinuxICE2. You will need a LinuxICE2 machine and a desktop to do syncing with. You will also need to access a terminal with a keyboard ( in LinuxICE2 find this in Apps->TerminalEmulator->Terminal).

1 - get the dependencies:

sudo apt-get install libbluetooth-dev libgps-dev libqt4-dev build-essential
2- get and compile the source:

svn co
cd proximity
sudo make install
3- make it start up when LinuxICE2 boots:

sudo nano /etc/matchbox/session

proximity -s -D &
like this:

Name:  screenshot16.png
Views: 311
Size:  51.9 KB

4- edit your events!

mkdir ~/.proximity
cp /etc/proximity/events.xml ~/.proximity
mousepad ~/.proximity/events.xml
Edit to your likings. For my personal use, I copied my ssh key to my linux desktop and used rsync+ssh to do loginless syncs with my music directory. This is what I did:

on the carpc:
less ~/.ssh/
now copy and paste it to a new line in ~/.ssh/authorized_keys on your desktop.

After you get your keys all set up, make a folder on your desktop that you want to sync to. Alternatively, you can always just point to your main media folder. My library is larger than I would care to have on my carpc, so i made a separate folder for syncing with the carpc in /home/kev/carpc/Music.

Now for the command. Add this to your wifi OnAdded event:

<command type="system" bin="/usr/bin/rsync">
 <arg>-e ssh</arg>
Now, when you start the carpc up to leave, it'll initiate a sync. Also when you return back home, it'll also initiate a sync. However, when you stop the car, the carpc normally would turn off. This will interrupt the sync'ing process so to get around it, I added some checks.

First we edit the /etc/acpi/ file that controls what happens when the power off signal is sent to the system. The following code is added *before* the command to hibernate/shutdown/etc.

if [ -f /tmp/interrupt ]
exit 0
next, add a command before the rsync command that creates the interrupt file which essentially tells the acpi system that we are in the middle of somthing important and not to "interrupt" us:

<command type="system" bin="/bin/touch" >
After the rsync command, we want to cleanup and then initiate a shutdown/hibernate/suspend:

<command type="system" bin="/bin/rm" >
<command type="system" bin="/usr/bin/sudo" >
This is not perfect yet. It will likely shutdown when you don't want it to. Alternatively, you can have it fire a notification (using the notify-send command) or something and you can wait until you see that and then manually shut it down. If anyone has a solution to the above I'm all ears. I think this really calls for some advanced conditional stuff in proximity where you can "program" using multiple events.

Hope that helps. have fun with proximity!