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:
2- get and compile the source:
sudo apt-get install libbluetooth-dev libgps-dev libqt4-dev build-essential
3- make it start up when LinuxICE2 boots:
svn co https://linuxice.svn.sourceforge.net/svnroot/linuxice/packages/proximity
sudo make install
sudo nano /etc/matchbox/session
4- edit your events!
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:
cp /etc/proximity/events.xml ~/.proximity
on the carpc:
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:
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.
<command type="system" bin="/usr/bin/rsync">
First we edit the /etc/acpi/powerbtn.sh 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.
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:
if [ -f /tmp/interrupt ]
After the rsync command, we want to cleanup and then initiate a shutdown/hibernate/suspend:
<command type="system" bin="/bin/touch" >
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.
<command type="system" bin="/bin/rm" >
<command type="system" bin="/usr/bin/sudo" >
Hope that helps. have fun with proximity!