Now, to tell the true this is a semi useful project, the most important aspect it’s the cool factor that it bring. You move away from your PC and it lock, turn off the screen and put in pause your Media player. Than you come back and everything starts again automatically. Cool ? it’s BlueProximity.
What is this ?
This software helps you add a little more security to your desktop. It does so by detecting one of your bluetooth devices, most likely your mobile phone, and keeping track of its distance. If you move away from your computer and the distance is above a certain level (no measurement in meters is possible) for a given time, it automatically locks your desktop (or starts any other shell command you want).
Once away your computer awaits its master back – if you are nearer than a given level for a set time your computer unlocks magically without any interaction (or starts any other shell command you want).
The package it’s available for Debian, Ubuntu, Fedora and Gentoo, installing from the repository it’s useful because it will install also all the blue tooth stack, a requisite for this software to work properly.
For Ubuntu and Debian use the usual:
sudo aptitude install blueproximity
Setting up the phone
First you should pair your computer and your mobile phone. Once being paired your mobile won’t ask for a password when a connection from the computer to the phone is made. There is still the possibility that your mobile phone will ask you to accept the connection which is an additional layer of security appart from the pairing mechanism. Your phone should have an option to disable this question for all or even one special paired device. Disable that question as not disabling it renders BlueProximity quite unusable since you must always do something to your phone when you come back to your computer.
Connecting the phone
After setting up the phone computer pair you can now move on and configure BlueProximity. After the first start you should see the settings window. If you closed that by accident or it did not show up (because you had installed BlueProximity earlier), in this case you see the BlueProximity icon in the notification area just click on it to make the settings screen appear.
In the first tab we can configure our phone in blueproximity, to do this we’ll do a scan and once found the phone address we’ll select it.
To find out that address you should configure your phone to bluetooth visible mode. It may be the standard setting but you never know… Now click on the Scan for devices button. A scan takes about 10 seconds. You should find your device in the list now, maybe among other bluetooth devices around your place.
Setup distance detection
Now BlueProximity should already start working but there might be further tuning of distance parameters needed. Note: Your screen will never be locked as long as the settings screen is shown. This way you can change the detection parameters and test them. You will notice how the icon changes if you play with the values.
On the second Tab select distance and duration for lock/unlock.
Once meet these requirement the corresponding action (lock or unlock) will be triggered.
Setup of locking actions
Switch to the third tab named locking to see the following screen:
The upper section refers to the commands that BlueProximity will execute for the according event. The preset is the command to lock/unlock the screen using the GNOME desktop screensaver. If you are a KDE user you should activate the combobox and select the xscreensaver-command entry. Please note that this will only work with the KDE integrated version of xscreensaver. The original xscreensaver does not include an unlock command.
The proximity command is a command that is executed every given interval while the user is in reach (the screen is unlocked). That way you can e.g. prevent your screensaver from becoming active while you are near. Actually this is the standard setup.
The lower section refers to logging of state changes. The syslog entry allows you to generate a syslog message on every state change coming from the given logfacility and the loglevel notice. You may also additionally or exclusively log to a certain file.
But you can turn your monitor off at the time of lock which will save Electricity when you are away from your computer and switch it on when you return. Using Following Commands to lock&turn off and “unlock & turn On the monitor
gnome-screensaver-command -l && xset dpms force off
xset dpms force on && gnome-screensaver-command -d
And with this you have finished the basic setup of blueproximity.
For more information and the list of FAQ check the official site
Script: Make your computer beep if the phone go away
Script: single, monolithic script that handles away, available, status update messages, and proximity “poking”
- Linux Terminal: Manage Processes with killall and kill
- Play your Music on Linux with Music Player Daemon
- How to measure memory usage in Linux
Find me on Google+