Posts Tagged ‘ssh’

Hello  peeps, what’s up? I know right, two blog posts in the same year, what the hell!? Well, it has been documentet on several occasions that I get very productive during exams, I just don’t direct my energy towards the exams themselves. Hell, this whole blog project was started the day before a final exam back in high school. Anyway, you’re probably wondering what the title has to do with this, which is almost nothing, except that exams are closing in, and I’m doing cool shit that I want to blog about.

I’ve had this magnificent tablet that I’m typing on right now for a year, I think, maybe a year and a half, and it’s pretty rockin’. I’m an android power user, if such a thing exists, starting out on the HTC Hero, and staying there long past its expected lifetime, because I refused to spend money I didn’t really have on a new device, opting instead to flash unofficial ROMs from the lovely people over at the xda forums in order to stay with the times and the new features that came with new versions of android. God, I can’t even imagine the pain I’d experience if I had to go back to running Cupcake (android 1.6) on my Hero again, that’d be a nightmare! Anyway, at one point I lost my phone when I was in Oslo, and I had to purchase a new phone. I was pleased with my Hero, but I took it as an opportunity to make an upgrade, going with the Desire Z, which still to this day has the best qwerty keyboard of any phone on the market. That phone was rooted within an hour after I bought it, and it now runs a recent build of Ice Cream Sandwich (android 4.0). The keyboard is essential, but I’ll get back to that later. My point is that I love android. Any loyal readers will know that I love linux, and would install it on myself if I had a usb port and a network connection, and now I have this tablet thingie, with a keyboard dock that I got last christmas, and I’ve been using it on and off as a productivity device after my netbook’s battery died (fun fact, my netbook is also running a recent version of ICS from the android-x86 project). Now, while this gives me a nerdboner, tablets have limitations. The system isn’t really meant to be a replacement for your desktop OS, and working around these limitations at this point can get tiresome, and if you’ve ever opened up a terminal emulator on android, you’ll know that while it is running linux, it’s pretty barebones stuff. BUT! It is linux, and where there’s linux there’s a way.

I read a blog post a few days ago, I’ll link to it if I ever find it in my history, about a man who’d switched his workflow from a macbook to an ipad, and loved it. Now, this poses some problems for a computer engineer, but none that can’t be overcome with relative ease. I say relative, because you do need to be comfortable with the command line interface. Quick, think, what do you have stored in the cloud? I’m going to make an educated guess, and say you have music somewhere, email, probably some shared documents on Google Drive, and pictures in Picasa or Flickr. But that’s just for storage right? Well, yes, but they’re stored on computers, and if you take those fancy schmancy services away, you’re left with exactly what I need in order to work effectively from my tablet, a linux server with none of the hardware and system limitations of my android tablet. The guy who wrote the blog post was working from an ipad, and he was leasing a server (for pretty damn cheap) system called Linode. Now, I’ve looked at this before, but even if it’s cheap I just don’t feel that I can justify the extra monthly purchase. Luckily, a solution has been there for me all along, I just didn’t think about it much: I have access to the unix servers at the University in Stavanger! I got access way back in my freshman year! These are pretty powerful machines, able to handle the workloads of many students and employees simultaneously, and the internet speeds I can enjoy from them are out of this world. When Google told me syncing the android source tree would take an hour, I farted in their general direction, and then the sync was pretty much done. I’ve lost my train of thought, where was I?

Oh, yes, I have access to powerful machines though ssh, the secure shell protocol. All I needed was an android client, and I should be golden. Of course, this wasn’t exactly the case. The one thing people always bring up as a negative aspect of android is that it’s fragmented. As opposed to iGadgets, which are all produced by the same company, android gadgets are produced by a wide spectrum of companies, and they don’t allways see eye to eye when it comes to how to implement things, so you get things like tons of different keyboard layouts. I mentioned that my phone has the best keyboard out there for phones, but that’s just my (and HTCs) opinion. Samsung probably has a different idea, and Motorola a third, which is reflected in the keyboard dock I have. Now, I had downloaded an ssh client called ConnectBot, a great piece of software, except it doesn’t really support hardware keyboards that well, having been designed for a system that deals primarily with on-screen keyboards. It has a few workarounds for adding modifier keys (such as ctrl, alt, shift), but my keyboard actually has these keys, they just aren’t registered by the software! ARGH! There are even some bugs with this in the operating system itself, but the tablet comes with a software keyboard designed by Samsung that allows everything to work great. Except ConnectBot can’t know this, and can’t be designed to work with every single keyboard program for android, because there are, like, a thousand. Really. So I got frustrated, I needed keyboard shortcuts in order to use the programs that make working in the linux cli (command line interface) awesome and effective, but none of them were working! I downloaded experimental versions, I complained in the irc room, no one answered, and I downloaded more experimental versions and other programs. Nothing worked, and I was starting to feel jealous of the iPad guy, I was in a bad mood. And then I had an idea, why don’t I try to change the software keyboard? Ta-fucking-DAAAAA! Works like a charm. Well, alt key interactions don’t work, because this norwegian dock only has the alt-gr key, and I still have to use an experimental tablet version for it to work, but other than that, all is dandy! So, I bet you’re all wondering, but what can you do with it!?

What I can do with it

  • I can connect to a powerful machine from anywhere in the world!
  • I can use Gnu screen, a tool that lets me have many terminal windows open at the same time, and switch between them quickly.
    Screen is cool for another reason, it keeps all my terminal windows, even when I log out, even if I lose my internet connection, even if I burn my tablet.. Say I’m working on some files, have a blog post open in emacs, and I’m compiling a large project, when my tablet unexpectedly reboots. If I’d have been working locally, that would all most likely be irrevocably lost. Now, I can go make a cup of coffee, run down to the library, open up a portable ssh client, and log into the system again. It’s all there, and hey! The program is done compiling! Screen keeps doing shit while I’m not logged in, and that’s awesome Holy shit that’s a lot of emphasis in one bulletpoint, but Screen is just that good.
  • I can keep my cool. Serious programmers are likely to have some serious computing power sitting at home, churning away at their programs, and it gets hot, seriously hot. When I’m working from my tablet, it’s not actually doing anything intensive, so while the heavy machinery on campus is running laps around your computer, my battery will last all day. I don’t need more than this single-core ARM processor (over)clocked at 1.4Ghz.
  • I can goof around. While Screen is making sure that my shit keeps running on campus, I can disconnect and play some smooth games on my tablet. I can’t stress this enough, my tablet is completely unaffected by what the server is doing!
  • I can never buy a normal computer again. I will though, I need to play Diablo III.
  • I can compile the linux kernel in less time than it takes me to go to the store and buy donuts.
  • I can check the progress on the linux kernel compilation from my phone while I’m going to the store! Yes, my phone can connect via ssh too, android is android, and the keyboard on the DZ is sweet enough that if the compile failed, I can change a few small things around and try again before the cashier can offer me my receipt.
  • I can fly! Well, that’s not true, but I can make a server farm output this:

I can do more, but this blog post is already much too long. See ya on the other side!

Song of the blog: Hail to the Geek
Here to stay