2009-07-03

My iPhone iSSH set up

Since my Psion Revo I've had terminal (later SSH) applications on my phones, just so I can access any server I might need to from anywhere. It's a very comforting thing to have, knowing that if there's a problem you can fix it.
I'm happy to say that the iPhone experience is better than any other mobile SSH solution I've ever used. This is thanks to the iPhone's UI and Dean Beeler of Zingersoft and the iSSH application. I've not tried other SSH apps for the iPhone as I'm very happy with Dean's efforts. He's also very active on the Google Group for iSSH. He's also (slightly reluctantly) dishing out AdHoc releases when the approval process of the AppStore is slow. Excellent!
This post pertains to iSSH 3.1, and I know it will probably be short-lived as Dean has already submitted 3.5 to Apple AppStore as I type this. It also is only about how to set up your connections, I'm not very versed in the advanced use (yet?).
Let's get started.
I wanted easy connection to my servers, and my passwords are tedious things, so typing them, even on a normal keyboard, is no fun, let alone the iPhone's keyboard. iSSH has got the option to store the password, and I think that's a good idea, but I find it safer to use the RSA key functionality. The reason for this is quite simple; Should I lose my iPhone I can log onto the servers and delete the keys from anywhere. I can't blank the passwords remotely. To add a bit of protection onto this "blanket log in", I use the "Passcode Lock" feature. This is simply a 4 digit PIN (personal identification number). If you don't know the PIN, you're locked out of the app.
Short config is thus;
  • Passcode (PIN) lock
  • RSA key pair for login
  • Never log in as root (Super User)
Simple enough!
Here's how to do it.
  1. Turn on "Passcode Lock" - Go into "General Settings". Flick on the "Passcode Lock" switch.
  2. Generate your key, RSA key in my case, by clicking the "Generate" under "RSA Key Functions".
  3. Create a new connection by clicking "Add Configuration".
  4. Enter your details as you would with these notes.
  5. This is optional; Use "screen -DRRS iphone" in the Command setting. This starts a screen session automatically or reconnects to an existing one. This enables you to shut down your iSSH application without losing anything from the terminal. Thanks to a lot of guys on the Google Group, and Jared Earle in particular for his "SSH on the iPhone at last" post.
  6. Then enter your password in as usual.
  7. Click "Save" at the top of the screen. This step shouldn't be necessary, but I found the app giving some error messages once. I'm sure Dean will fix it.
  8. Go back into your newly created connection and then click "Transfer Public RSA Key". This will copy the public key into your ~/.ssh/authorized_keys file. If you don't have the file, you need to create it; mkdir ~/.ssh && touch ~/.ssh/authorized_keys && chmod -R 700 ~/.ssh before you transfer the key.
  9. Once the key is successfully transferred, flick the "Use RSA Key" switch on. This switches from using your password to using the key.
  10. Click "Save" at the top of the screen.
  11. Test your new setting. You will be asked to confirm the host's certificate. (Note that you'll need to confirm the certificate every time you change the setting - I was almost getting annoyed with this until I figured it out).
What should happen when you connect is that you shouldn't have to enter a password, but you should be logged straight into the server and swished straight into a screen session.
Separately these steps aren't difficult, but figuring out the sequence took a bit of time for me, so hope this saves you a bit of time.
I've now got all my important connections on the phone. The useability of the iPhone iSSH application is just astonishing for such a small device. Screen swiping, pinch zoom, gestures, horizontal mode, etc, etc all make it surprisingly easy to control your server.

2009-06-11

Where's the iCal/vCal links in TV Shows, Events, Concerts, etc?!

This is bugging me more and more and more and more and more (hope you get my point). What I'm talking about here is the ability to download event information in iCalendar or vCalendar format from Internet sites.
A long time ago I wrote some sort of a web based calendar application, and one of the things we included in it was the ability to download the events to your computer's electronic calendar. It's so long ago that I almost forgot about it.
Either way, lately I've been trying to free up my head from remembering things like dates and times and really started getting back into organising my computer's and phone's calendar. They're synchronised so I don't have to worry about that. My mail application helps me a bit with these smart tags (or whatever they're called) so that I get this little highlight and a drop down on words that resemble dates and times. It's really easy for me to create a calendar event from it.
But 99% (not scientific 99%) of all websites I visit that have some sort of events do not supply any way for me to easily enter that into my calendar. What's wrong with these people?! Don't they want me to attend their events?!
Let me give you a few examples;
I like watching The Gadget Show, if not simply for the content but also to see how much Jason Bradbury's eyewear frames have grown since the last episode. I went to Five.tv's website to look for a program schedule - there was none, and natually there wasn't an iCal/vCal download.
I want to go to Silverstone Classic, so naturally I'd like to mark it in my calendar. You guessed it, no event iCal/vCal.
I use RadioTimes.com website to check when stuff is on TV... That's correct, there's no easy way to enter that data into my calendar.
I wanted to track Apple's WWDC 2009 keynote. I checked several websites for info, none of them had a downloadable iCal/vCal calendar entry.
I've been to several high-profile concerts this year and last, and none of the vendors of the tickets, including Ticketmaster and Seetickets, offered iCal/vCal downloads.
And so forth, and so forth. Not a single one! None!
I seldom get very animated by stuff like this, but here goes;
WHAT'S WRONG WITH YOU PEOPLE!?!?!?
Don't you want people to attend your events? Don't you want people to watch your shows?

Here's a tip for all of you web developers and web development sales guys/project managers out there; Have a look on your clients website and see if there's any information pertaining to dates and times on the site, and if there is, go sell them "your new downloadable calendar entry". Go do it!
Here's a tip for all of you content providers and event organisers; DEMAND THIS NOW. NOW!

Thank you. I feel better now (until next time I sit there copy-pasting dates incrorrectly from a web page to my calendar).

2009-06-04

Solar Charging my Car

My car stands, sometimes, for weeks on end, simply because I have nowhere to go in it. Its task is to chauffer big things around, not just me. So, there it stands. Batteries don't like that. They kind of like doing things. Kind of like me. Batteries get empty and soulless if left for a while. What I've done so far is to stick a small (Halfors [Halfrauds] call it "up to 1200cc" - as if you should measure battery capacity by the capacity of the engine) charger to the battery. This is sometimes annoying as I tend to forget it. I come out to the car and no charge. On top of this my 1200cc charger *cough* doesn't seem to charge the battery fully either.
The solution, I hope, is a solar panel. Maplin is flogging these panels that are designed to keep 12V batteries trickle charged. They've got different sizes, but when I walked into the shop I just opted for the cheap one. At £13 (well, £12.99) I wouldn't mind it if it didn't work. It's the Solar-Powered 12V / 2.4W Battery Trickle Charger that I bought.
I've already run into two little things that I would want to fix. First of all, the instructions say that I should disconnect the panel from the car before starting the engine. OK, fair enough. But the point of having a panel is to not having to disconnect it and reconnect it. See the "forget" point above. I need to locate a relay that is connected by default, and when power is added it disconnects. I can then take power from the cig lighter sockets to disconnect the panel. Another problem is that I have no 12V permanent point within the coupe. I'm not very keen on running a cable from the coupe straight to the battery as I think I should be able to connect it up in the coupe. I just need to find such a 12V point.
And then I obviously need to mount the panel (semi) permanently somewhere. On top of the dash would be the best spot as it's the only flat surface that can be hit by sunlight from above. All other windows are vertical. The panel comes with suction cups, but they won't work on the dash, so I might just hot-glue-gun the cups onto the dash. Heheheh... joking! Well, perhaps!
If I get all that done, then my car should be able to stay charged without me having to worry about giving it regular attention. In theory anyway.

2009-05-27

Removable Bathroom Speakers

This is probably weird to you, but here goes anyway. Being Finnish I miss my saunas. I really do, so I substitute the sauna with hot baths. I've previously made a magzine rack so I can read a book or magazine whilst soaking in the bath. In the past I've also turned up the music on my computer so I could hear it reasonably loud into the bathroom. Naturally this meant that the sound level was quite high nearer the speakers much to the annoyance of my girlfriend and probably the neighbours. The solution to this could have been a portable radio/stereo etc, or fixed waterproof speakers in the roof. However, my girlfriend wasn't really keen on me installing speakers into the ceiling. Therefore the solution couldn't be permanent, but had to be removable.
The solution is a set of computer speakers connected to our home server situated in the loft not too far from the bathroom. The server already houses all of our MP3s and runs several music streaming apps, including SqueezeCenter (artist formerly known as SlimServer). Not too far between the dots to connect them then?!
I already had a set of Creative I-Trigue 2200 speakers that has served me well over several years as desktop speakers for my computer. They're no super-duper HiFi speakers, but they're good enough to pump out some tunes in close range and not too high volume. They're also quite compact. Perfect for the job.
I had been hoping that I could do some aluminium welding on this project, but it turned out that it was not needed. I simply took a 13x13x13mm alu U-profile of 1mm thickness some 800mm long and affixed the two speakers onto this "arm". I left a part of the arm sticking out to prevent cables from getting too close to the bath. I then bough a simple suction cup, officially known as a "Suction Lifter", from Axminster Tools, cost me £2.40. Only problem with this one is that it's a hideous colour. Nevermind. I screwed the suction cup onto the arm. Then I collected the wires and taped and zip-tied them onto the bar. I'll need to extend the power supply a bit and put it in a permanent spot, but for now it still works.
That's the hardware done.
Now how do we get the tunes to the speakers?!
I spent quite a bit of time trying to stream from the SqueezeCenter onto localhost I tried mgp123, mpg321 (doesn't do streaming), madplay, and splay, but none of them worked. To make it a bit clearer, in theory you should be able to do something like this: mpg123 http://username:password@127.0.0.1:9000/stream.mp3 or even madplay http://username:password@127.0.0.1:9000/stream.mp3, but it just didn't seem to work. I tried using wget etc, but I got the streaming to work only for one song, then it cut. Something like this: wget -q -O - http://username:password@127.0.0.1:9000/stream.mp3 | madplay - but nope. And then by some pot luck I managed to find out that there's a headless (i.e command line) version of the very nice SoftSqueeze. SoftSqueeze is a Java application that runs on your desktop mimicing the commands from the hardware such as Squeezebox and Duet. It works well on the desktop but for me it was pointless as the server doesn't bother with the GUI stuff. I was very pleased when I found SqueezeSlave. I just downloaded the appropriate binary and started it and voila I had full control over the audio. Perfect!
I then installed a iPhone/iPod Touch specific skin for the SqueezeCenter called iPeng. Whilst it worked fine, it was still a web-app and not 100% good. However, there's native iPhone apps out there, three in fact. One by the same guys who do iPeng, but the one that caught my eye was Squeezemote. The reason I chose it was because it seemed to use the native iPhone look and so far it's worked flawlessly. At £4.99 it was a bit more than I wanted to spend, but hey. The total cost so far isn't too bad. ;)
I can now pick up my phone and create a playlist for my bathroom audio experience. All I then have to do is to make sure that the SqueezeSlave is running (which I plan to leave running and install on the garage laptop too) and that I clip the speakers onto the tiles in the bathroom and turn up the volume! If it's too loud, you're too old! ;)
Quite pleased.

2009-05-13

It's cloudy out there, but do read on..!

I realised that I've not posted in a long time, very long time in fact. It's really strange as a lot of things have happened between this post and the previous one.
Here's a some of the things that have happened.
  • I've bought a TIG welder. I've knackered my bank account. Why the hell a TIG welder?! Well, I freely admit to being a garage and welding deprived child. Since I stopped playing with my Lego Technic I've always yearned for the ability to weld. Last may I bought a small Milling Machine - allows me to shape metal - but not fuse it. I've now bought the TIG welder and I feel that the universe is the limit. It's difficult to describe how it feels to be able to weld. I've since buying it spend hours in the garage practising. It's not difficult to TIG weld, but it's not easy either. Needs practise
  • Caz has had her birthday. The whole family chipped in and got her something nice. I'm not saying what it is, because that's up to her.
  • We've been to the Nürburgring for the customary Easter season start. We stayed at Jochen's and Fia's. Huge thanks to them, we had a really good time! The SuperDuke R was great on the Ring, but it all was spoilt by a sliding feeling at the rear wheel. I'll look into that when the sun is shining.
  • Roomba got ill, but the doctor's bill was picked up by the warranty. All is well now.
  • We've sold tons of old gadgets on eBay and mobiles to Mazuma Mobile. Good to get rid of the old stuff.
  • I've been to LRUG and found it very interesting, especially Jon's talk which helped me see Ruby blocks in a different light. I'm going again next Monday.
  • I've been to see AC/DC in Birmingham. I loved it, Caz loved it, Wolfy loved it, Daz loved it. We all loved it! They're f***ing great! It's a no-BS show, that rocks from the start to the finish. Only bad thing was there was this tiny oriental girl who decided she had the right to squeeze past us, standing in between me and Caz, and she didn't even seem that much into AC/DC. There's always one, isn't there! I'm very much looking forward to the Wembley gig!
  • The day after AC/DC we saw NoFX in Birmingham too. It was utter cr*p. There was four, "support" acts. "Alienating acts" more like it. And when NoFX finally got on stage they spent most of their time talking. Sheeeesh! Everybody is a rock star, everybody is a clever programmer, everybody has got a guitar solo. The whole NoFX experience annoys me because I've got several of their albums and I really like their comedy take on the world.
  • Finland didn't win the World Ice Hockey Championship. In fact, didn't make it very far. *sobs*
  • We've got tickets for Green Day in Birmingham. YAY!
  • We went to Clacton-on-Sea for a Tae Kwon-Do training thing for Caz and her TKD buddies. Despite some awesome people, I would rather have stayed home in a dark closet with a bottle of booze, or better yet, shortening my ToDo list. I don't regret going, it was an experience, and another place to see. (And I did have a good chuckle at the chav-spotting).
  • I had another birthday. Pressie-wise I got a few bottle of red wine (thanks guys!), Big Bang Theory Season 1 DVD, but I should also mention my advanced BD cum Christmas Present; 22" LCD TV that also works as external monitor for my computer when needed. It's next to me in the office.
  • I have shortened the ToDo list by quite a few items.
As you can see, there's been tons of things going on, and I don't really know why I've not posted anything "clever" for a while. I guess I'm trying to do as much as I can of those things that have been lying around. For example, we gutted the downstairs cloakroom, but that's as far as we've got. The Espace is playing up and is currently of no use to me. As it's now been for about 6 months. I try to fix it when I can (read find energy). I need to fit a set of shocks to a K1200R, as soon as I get my hands on it. The garage roof will need doing this summer, and summer is approaching quickly. I have an Archos camcorder that I'd like to fit to my bike. I want to make non-foldable foot pegs for it. I want to make a GPS holder. I want to make SAS plates for it. And tons and tons and tons more things that I want to do.