Hacking

Hacking

Hacking is wonderful practise only when you keep on safe side...

HowTo Use your mobile phone as a remote control for your Ubuntu system

Have you ever been attending presentations envying all the time the guy in front using his mobile phone to switch the slides? Or dreamed of sitting on the sofa and controlling your music player without having to go to the computer?
At least I did and so I searched on the net for possible solutions. Most of the projects are either outdated, only work for certain phones or certain software on the computer. Finally I discovered anyremote from Mike Fedotov, which you can download from the project's site at sourceforge:

http://sourceforge.net/projects/anyremote/

The great thing is that it works for different connections like bluetooth, infrared or serial cable (though I only tested bluetooth) and, according to the project notes, for all kinds of phones. Several configuration files for different software, e.g. amarok, xmms, etc. are included, and it is easy to write new ones.

NB:

* This was tested on Ubuntu 6.10 (32bit).
* There is also the KDE version kAnyRemote, which provides a little panel applet to change configuration files. I also tried this flavor, as I have KDE installed. But I'll focus on anyremote, the CLI version, as it has the same functionality, and you don't need to install any KDE libraries.
* I only describe using bluetooth and assume you have already set up a bluetooth connection between your computer and your phone.
* I assume you have a java enabled phone (JSR-82), I haven't investigated yet how this works if your phone doesn't support java.
* This post will be edited if questions or suggestions come up.

Steps to take:

1. Install dependencies
I can't tell you exactly what you need, because I encountered only one missing package, and that was libbluetooth-dev. I guess you need the bluetooth libraries for compilation even if you'll use another kind of connection. So I'll simply list all the blue* packages that are installed on my system. Corrections considering unnecessary packages or missing packages are welcome! You can either use synaptic or aptitude or apt-get on the command line to install the packages, so for instance you have to enter:
Code:

$ sudo aptitude install checkinstall gcc build-essential other_missing_packages

* gcc
* build-essential
* bluetooth
* bluez-cups
* bluez-hcidump
* bluez-passkey-gnome
* bluez-pin
* bluez-utils
* gnome-bluetooth
* libbluetooth2
* libbluetooth2-dev
2. Install anyremote
In case you have already compiled from source code before, this is nothing new to you. If not: Don't be afraid, there is no dark magic involved After downloading anyremote-*.tar.gz, go to the download directory, decompress the file, change to the now extracted directory and prepare for installation:
Code:

$ tar xvzf anyremote-*.tar.gz
$ cd anyremote-*
$ ./configure
$ make

Now, I advise you to have checkinstall installed, this will allow you to easily remove anyremote later on.
Code:

$ sudo aptitude install checkinstall

We install it:
Code:

$ sudo checkinstall
or, if checkinstall is not available
$ sudo make install

3. Install the Java client
The anyremote directory we extracted earlier contains the phone client file anyRemote.jar. Install this on your phone, either by sending it via bluetooth or by using a data cable.

Now, using an existent bluetooth connection, we can start anyremote and indicate which configuration file to use:
Code:

$ anyremote -f anyremote-2.6/cfg-examples/Server-style/adminExample.cfg &

Finally we start the java application on the phone, connect to the computer, and have fun!
The author is very cooperative and likes to hear from you if you used his program successfully with a phone not yet on his list on this page: http://anyremote.sourceforge.net/doc-html/intro.html. But let's try to keep questions concerning installation and such here in the forum.

0 comments:

Counter

Followers

Blog Archive

Subscribe Via Email &Sms

Enter your email address:

Expert Hackers

Also Subscribe Via Sms Just click here to follow via
SMS