I’ve had a Linux PC under my TV for the best part of Two years now (There used to be an X-box running XBMC but it wasn’t powerful enough to play HD videos, so I dumped it.) and I’ve always had problems getting wireless peripherals to work. Therefore my only option was to trail a 5m USB cable to my sofa, which caused all manner of grief.
That was until I got a brand spanky HTC Desire, which is a touchscreen mobile phone.There are several applications (see what I did there) for the HTC phone which all “remote” control of PCs and basically they work by having a listening application sitting on your PC that is waiting for communication through a particular UDP port, then relaying the commands it recieves to the desktop and moving the mouse cursor and sending keystrokes to the PC.
The Phone has a bit of software installed which sends keystrokes and movement data to the server application on your PC.
Simples.
So I first tried remoteDroid which seems to be the defacto for remote control using a android phone.
Unfortunately, after installing the application on my linux box it gave itself an IP address of 127.0.1.1 which, understandably, my router didn’t like (and as ever, I couldn’t see how I could force remotedroid to change it otherwise). So, I in stalled gmote, which is an open source effort that runs on a java console on the PC and gave itself a sensible address that my router had no issues with. It worked a charm and soon had visions of ditching my USB cable deathtrap and just using my android phone to control the linux box.
This means forcing gmote to run on start up. and removing the login box for the linux machine. the latter part was easy, simply going to the Kubuntu start menu then through Applications>System>System Settings, then selecting System in the left hand side menu then Login Manager and setting up auto login.
Getting Gmote to autostart involves creating an init.d script in linux.
Init.d stands for “Initialise Daemon”. A Daemon is a self running computer program that usually does something not connected with user input, like serving webpages, or running a firewall. I think the Daemon reference comes from a branch of philosophy that expresses our awareness as a pantheon of daeomns living in our souls (but don’t quote me on that). Hence, a computer daemon is something that keeps the computer ticking…I digress.
Creating a daemon service means creating a BASH script. BASH is a shell language which enables access to programs and boot processes.
I copied my Gmote Server files to the shared part of linux systems, /usr/share and created a shell script to stay in init.d.
#!/bin/bash
cd /usr/share/gmote/GmoteServerLinux2.0.0
. /usr/share/gmote/GmoteServerLinux2.0.0/GmoteServer.sh
To edit the script you need to start KATE and Dolphin in sudo mode, from a terminal window.
Recent Comments