Archive for the “Internet” Category

Ok, let me explain first what it is.. Synerygy2 is a way to share multiple computers with one keyboard and mouse.  No, it’s not a KVM replacement.. Synergy2 replaces only the keyboard and mouse, you’ll need to have a monitor attached to each machine on your desk.  This is actually a plus.  In the photo below you’ll see my working area at the office… I’ve labelled which each runs for an OS and below that the names of the computers (click to see the full size image)

office-desktop

The keyboard and mouse is actually attached to the Ubuntu machine, in other words that’s the “server”.  The XP and Windows 7 machines are “clients”.  One thing to consider with Synergy is that it’s not secure.  It does send everything you type in plain text over the network.  This can be avoided by tunnelling the connection over something like SSH.  Perhaps I’ll cover that later.  Synergy2 isn’t new, it’s been around a very long time.

I don’t want to reinvent the wheel or try to take any limelight from those that have already posted great articles on how to set it up, the best information can be found from the Synergy2 website itself.

What I’m posting about is really how to fix a problem that I’m sure others might have encountered.  Right.. so the problem is this.  As I’ve said, the server is on Ubuntu.  Naturally the “Windows key” on Ubuntu has no natural meaning to the OS, it’s just another key and not mapped to anything out of the box.  The problem I’ve had is that while using Synergy the “Windows Key” didn’t work on the Ubuntu machine even though I’d remapped it to do things, such as Win + T to open a new xterm, Win + R to open the Run Command Dialog (basically making it operate a bit like Windows).   the fix for this was a change in the $HOME/.synergy.ini file on the Ubuntu machine.  The weird thing was that when move the mouse to the XP machine the Windows key did what it should, however on the Windows 7 it wouldn’t work.

Right, so what was the fix?  Here is my .synergy.ini file

section: screens
burma:
scotland:
  meta = super
rambler:
  meta = super
end

section: links
burma:
left = scotland
right = rambler
scotland:
right = burma
left = rambler
rambler:
left = burma
right = scotland
end

section: options
screenSaverSync = true
end


The important lines above are the “meta = super”.  Under Ubuntu the Windows Key is called “meta”.  This tells Synergy when the focus is on the windows machines to map the “meta” key to the “super” key, or in other words the Windows key.  Once that was changed and synergys was restarted all was good again.

I’m posting this for anyone else that might have a problem with the windows key not working under synergy with Linux/Ubuntu/Unix machines and windows machines, but also as a reminder to myself should I forget how I fixed it :)   I’d been through this exercise about 4 years ago but having rebuilt that machine I couldn’t for the life of me recall how I fixed it .. well, now that I’ve blogged about it I’ll at least have one good place to go and find the answer again :)  

Comments No Comments »

It’s been a long time since I’ve blogged about anything meaningful. It’s not for the lack of anything to blog about, just more about my lack of ambition really.

In July I attended WordCampUK 2009 held in Caerdydd, Cymru (Cardiff, Wales). I was going to blog about this, but having read the huge number of postings by others that attended the event (A decent search), I figured there was nothing more that I could write to equal or better what others had already said. I will say that it was an awesome weekend though! Met loads of great people and even participated in the #Wordhack – Mobile Kubrick Theme project.

In July I also got a new phone, the Nokia N97. While it’s a very slick phone, it’s far from being without faults and bugs. To be completely honest, I’ve not been surprised by this, Nokia has made it a business mission it seems to release stunning devices that were only half thought out and loosely hacked up and released, clearly done late on a Friday afternoon after everyone had been out for a pub lunch lunch earlier in the day. For it’s flag ship phone it’s a pretty piss poor showing. Think I’m being too hard on it? See here “N97 Sucks”, “N97 Bugs”, “N97 is crap”. To contrast this however, “N97 is great”. Over all I really really love the device and it’s huge potential, but that is overshadowed by Nokia’s classic lackadaisical approach to building phones of late.

What else is new… I blogged recently about Lisa losing her first tooth… well it looks like another one is fixing to fall out soon. This is also the bottom one next to the one that fell out last month. Hehe poor kid will have a big hole in her smile for a while I think. There’s no sign yet of the new tooth showing up either.

Holiday’s… not really planned much this summer due the appalling weather we’ve been having this year. Typically British is the common phrase you’ll hear people mention. Loads of rain and grey/black skies. I have however booked a week off in August and we’re hoping to get out and do at least a couple days of camping. I’ve found a place in Suffolk that looks nice. Loads of woods to go walking through and they allow camp fire, which is very rare here. That would be nice for the kids to sit by the fire and we’ll take some marshmallows for them to roast over the fire too. We’ve done that before but it was over the BBQ, lets face it, there’s no competition between marshmallows over a BBQ or a camp fire!.

Not really much else to blog about right now. I’ll close off this posting for the time being. I hope to do more frequent blog postings, but then I’ve said that several times in the past and #failed at it :)

Comments No Comments »

Ok, it’s not a full location detection as such.. I use my laptop (Ubuntu 9.04) both at home and work, as well as other places.  The problem that I had was related to how SAMBA was configured.  At home I have one workgroup name and at work I want the machine to appear in the company domain.  But also, while out and about in the big bad world I don’t want SAMBA on at all, no need to share anything with anyone.

So, to over come this and correct it at boot time I’ve come up with the simple script below.  The only other thing you need to do is prepare a couple of smb.conf files to suit the locations you’ll be in.   I have 2 smb.conf files, one for HOME and one for WORK.   I run the script from /etc/rc.local so it runs when I should have networking fully up and running. 

Here is the script:

#!/bin/bash
 
HOME=YOUR_HOME_GW_IP
WORK=YOUR_WORK_GW_IP
 
GW=`route -n | grep ^0.0.0.0| awk '{print $2}'`
 
if [ $GW = $WORK ]; then
    #echo "You're at work"
    cp /etc/samba/smb.conf.WORK /etc/samba/smb.conf
    /etc/init.d/samba restart
elif [ $GW = $HOME ]; then
    #echo "You're at home"
    cp /etc/samba/smb.conf.HOME /etc/samba/smb.conf
    /etc/init.d/samba restart
else
    #echo "You're somewhere else"
    /etc/init.d/samba stop
fi

Pretty simple really.  Hope others will find it useful.

Comments 4 Comments »

Right, well Easter is actually over, but I’m doing a blog posting now really just to put the pics of the kids online more then anything.  The day was good, it started way to early though.  Man the kids were up at the crack of dawn, if only it were the crack of dawn in the UK and not for say India .. shesh.

 

Thankfully, Yuki’s dad is here staying with us and he was looking after the kids.. Yuki and I managed to sleep in until nearly 9am, which was nice.  In fact, we managed to sleep in until nearly 10am Friday and Saturday.   I can’t even begin to recall sleeping in that late when vast amounts of alcohol was the direct cause of it.  So can’t really complain much.

 

Anyhow, the day started with breakfast as usual.. then we sent the kids up stairs with their lao ye (grandfather in Chinese, it’s more specific then that, but trust me, you don’t want me to open that can of worms here and now :) ).  Yuki and I took to hiding all the stuff for the kids.. candy, chocolate eggs, bunny’s, all sorts of rubbish haha.  Then it was time to unleash the kids..

First, here is a quick tour of the hiding places of all the candy

Here’s a video of the “hunt” under way .. I love Emma’s comment at one point “I’ve got so many…”

Here are a few pics…

img_9173.jpgimg_9191.jpgimg_9192

img_9197img_9204.jpgimg_9205.jpg

img_9207.jpgimg_9208.jpgimg_9209.jpg

You can see all the pics and videos taken today by CLICKING HERE.

Enjoy the pics and videos.  I hope to do more blogging in the future.. I’ve been pretty slack at getting out updates, but life has been full of upheavals that… well… frankly made blogging a chore. 

Besides, I’m booked to attend WordCamp UK in July.  It’s the second year for the event and the first year I’m going … it’s a weekend full of meeting other bloggers, some who do it for a living but most because they enjoy it (I assume anyhow).   With enjoy luck this event will encourage me to blog more, or even just give me loads of ideas to make my blogging better (which frankly wouldn’t take much, I know I suck at blogging).

wordcampuk-2009-graphic

Comments No Comments »

It’s still a bit early and not all of the details are available as yet .. but I’m waiting with bated breath for all the details.. I’ve actually already booked my hotel room.. didn’t want that to be the primary reason I couldn’t get there.

I’ve been using WordPress now for what.. nearly 3 years I think.. maybe only 2, can’t remember. But I’m dead impressed with it… I’ve been watching all of the WordCamp events around the world and waiting for one to come up here.. I know they had a 2008 one in the UK, however I missed that completely for some reason..

Check out the WordCamp UK website:

http://wiki.wordcampuk.tonyscott.org.uk/Main_Page

And follow them on Twitter too: http://twitter.com/wordcampuk

I hope to meet loads of people there.. sounds like it should be great fun!

#wordcampuk

Comments 2 Comments »

While working on a couple of WordPress projects for two sites I host (www.cambridgerepeaters.net & www.cambridgeshire-raynet.net) I had the need to do mass account creation.  These were 30+ accounts at a time, not a thrilling prospect to do that via the normal admin interface.  Searching the net was nearly useless, until I found a WP plugin called “Import Users Plugin for WordPress”.  This worked, but was very simple and didn’t suit my needs.

So, after looking at the script and figuring out how it worked (I’m not PHP coder but I can get by in a pinch), I managed to hack the script to do what I wanted.  The script as provided above only allows for the email address and login name, the 2 required bits of info to create a new account on a WP system.  However, I needed to be able to specify:

  • first name
  • last name
  • password

Another nice thing to have on the import is being able to set the WordPress user role (access level), so I shoved that in as well.  On the plugin page I posted a comment about my updates and a link to the new modified script:

I’d like to submit another modified version of this great script. The changes I’ve made to the script allows for adding first and last names, setting a password and setting the role for the imports. I’m also using the more powerful method of account creation, “wp_insert_user” this allows a lot more in the way of adding nice things to the script and new account.

The import file or manually entered format is:

username|firstname|lastname|password|email|role

All fields except username and email are optional, but all fields must be delimited, ie:

fred|Fred|Rivers|mypassw0rd|fred@rivers.com|Editor
sam|Sam||sam@mypress.com|

Fred has everything assigned while Sam will be emailed his generated password and his role will be set to whatever was selected from the drop down box on the form.

I’d be interested in any comments on my changes. There have been quite a few changes, I suggest a diff of mine and the latest modified one.

My modified version can be found at:

http://www.gammaray-tech.com/scripts/dd-import-users-mod_wp27.txt

I hope people find this useful, I think it’s a function that’s needed by far more people then you might expect.  In my mind, it’s something that should be part of the core code for WordPress.  I can see more modifications coming to this script as my projects progress.  While looking into changes for the script I’ve found other things that would be nice to have at the time of import too…

Watch this space…
Updated script

2009.06.17 @ 2013GMT

Version 1.1.13 – Added user URL to be imported into user details (not the default assigned blog for WPMU)

dd-import-users-mod_wp27_v1.1.13.txt

Note the new format when using this version:

The import file or manually entered format is:

username|firstname|lastname|password|email|role|URL

All fields except username and email are optional, but all fields must be delimited, ie:

fred|Fred|Rivers|mypassw0rd|fred@rivers.com|Editor|http://blah.com
sam|Sam||sam@mypress.com||

Comments 38 Comments »

I’ve been searching the net for ages looking for the wiring diagram of the 12VDC power cable for my Respironics REMstar Plus CPAP machine.

 

Not having any luck at all on the net finding the information I needed to build a cable, I’ve finally broken down and paid £26.00 (including shipping) to buy one.  I’ve wanted a DC cable mostly so that I could a) go camping without the need to have a tent pitch that was powered (extra cost), and b) be able to power my CPAP should we have a prolonged power outage at home (fairly low risk of this, but a risk none the less).

 

Click on the image below to see the full sized one.  This is a page from the manual that came with my cable.

Basically, should someone have posted something like:

 

To make your own Respironics Shielded DC Cord, Part number 1001956, you will need the following:

  • 1 x 2.1mm (5.5mm outside) X 15mm Coaxial DC plug
    Such as: Maplin’s Part number HH61R (www.maplin.co.uk)
  • 2-3m of suitable wire for a max of 7amp DC (depending on your CPAP model)
  • 2-4 Clip on Ferrite suppressors, such as Maplin’s part N89AB
  • 1 x 12VDC cigarette plug, suitable for upto 7amp DC

The construction of a DIY Respironics CPAP DC Cable, model number 1001956 is quite simple.  Wire up the cigarette plug to the DC plug that will go to the CPAP, be sure to wire the tip of the cigarette plug (Positive 12V, I suggest a multi-meter to confirm this in your car or battery pack you intend to use) to the centre connector of the 2.1mm DC plug.  Wire the negative to the other remaining connections. 

At both ends of the cable, as close as possible to each of the plugs, leave not much more then 3-4cm of cable “exposed” put a couple of the clip on ferrite RF suppressors.  These are quite important as they will ensure the dc is free of RF (Radio Frequency) or Electromagnetic noise.  These, should they get into the machine, could cause damage.  You can likely get away without them, but frankly for the extra £5 it will cost for these it’s worth saving your £500+ CPAP.

 

That’s all there is to it.  I really hope people find this useful, for some reason there has been a black hole of info about these cables, and I’m not sure why.

 

**DISCLAIMER** This information has been provided purely for theoretical and personal information.  I will not, nor can not, be held responsible if you are not competent enough to build this simple cable and end up damaging or destroying your CPAP.  I’m pretty sure in the wonderful lawsuit happy world we  live in it’s also most likely a violation of your warranty to attach a home made DC cable to your CPAP machine.  You have been warned, don’t come crying to me if you blow something up, also, don’t ask me to make one for you.  These are beyond simple to make.

Comments 4 Comments »