PCTakeout – in a more permanent box

A client of mine recently came to me needing a way of accessing his company’s “central office” computer remotely. “Well, that’s quite a coincidence,” I said, and proceeded to tell him about PC Takeout (which, at $0, is definitely the right price). However, I could tell that he was interested in something a bit more permanent and responsive – having to go through a web browser to access the computer was far from ideal.

I was up for the challenge. After all, part of the reason that I based PC Takeout on VNC and SSH was because they were such commonly used protocols. Surely there had to be a nice, simple, standalone (at least for Windows) way of working with them.

Setting up the office computer was simple – I just downloaded the PC Takeout Installer, installed it, and set up the router in the office to forward port 22 to the desired computer. Finally, I set up a DynDNS account for the client and installed the free DynDNS Updater as a service so the host could be easily looked up (he wasn’t sure if he had a static IP or not, so better safe than sorry). A test confirmed that I could SSH in to the computer from the Internet at large.

(Side note: if you’re using the PC Takeout Installer for your own purposes and wondering what usernames/passwords to use, here’s a quick reference: the SSH user is pctakeout, the SSH password is set during the installation process, and the VNC password is “pctakeou”)

Next came the setup of the remote computer (from hereon out referred to as the “satellite” computer). At first, I thought of just using the “standalone” version of the Java client that PC Takeout uses. However, that has a few issues, one of which is the fact that the certificate is expired, and it also isn’t nearly as responsive as a native Windows application. I decided to go with the native TightVNC client, since PC Takeout uses the development version of the TightVNC server. This would let the client use the fancy file transfer stuff if they so desired.

With that figured out, it now came time to handle the SSH tunneling. I’ve used Plink in batch scripts to handle secure SQL updates – however, I’ve run into issues with the process dying unexpectedly, and it’s a pain to deal with all the possibilities in a simple batch/CMD script. I figured something along the lines of Plink was the way to go, though.

Somehow, a Google search turned up a Windows utility called MyEntunnel, a “background SSH tunnel daemon,” as its website describes it. Exactly what I was looking for! And another positive thing – it’s freeware! The author even encourages redistribution.

Setting up MyEntunnel was a piece of cake. When you first run it, you get a fairly straightforward settings screen. Fill in the username (pctakeout), enable compression (uses slightly more CPU, but could potentially help the overall speed), and set it to connect at startup if you like. Next step: set up the tunnels.

This is pretty simple. I just added the line “5999:localhost:5000” to the Local pane. This means that any attempts to connect to port 5999 on the local machine would be redirected to port 5900 on the “localhost” machine from the perspective of the central office computer. 5900 is the default port that VNC server listens on in Windows. I decided to use the local port 5999 instead of 5900, in case the client ever ended up running a VNC server on the satellite computer.

Clicking on the “Connect” key starts the magic of MyEntunnel. It will prompt for a password if you haven’t entered one already. It uses a system tray icon to convey the status of the connection – a green lock means a successful connection has been made.

Once the connection was made, it was then just a matter of configuring the VNC client. To connect to the forwarded port, I entered “localhost:99” as the VNC server (if you enter a number after the colon, that number gets added to 5900 to determine the port number to try). Since this was over an Internet connection, I chose the “low bandwidth” connection speed.

Testing it out – success! Only I found that input seemed pretty jerky, and screen updates seemed quite delayed. I traced this to the polling mode of the VNC server – the default settings in PC Takeout’s VNC server are set to poll the active window only. Changing this to full screen polling solved the issues with delayed screen updates (I’ll probably change this for future PC Takeout Installer releases).

All in all, things worked very nicely, and the client is very happy. Score one for PC Takeout!

VMWare Server + Xubuntu

Lately, I’ve been interested in the use of Virtual Machines, fueled in part by the free-ness of products such as VMWare Server and Virtual PC 2007. For a couple months I’ve been using Microsoft’s IE6Test virtual machine in Virtual PC 2004. I do a lot of freelance web development, and as such, I need to test in various web browsers.

Virtual PC 2004 has gotten the job done for its intended purpose – however, I’ve been annoyed with certain aspects of it. It’s sooo slow, and oftentimes, if I have Firefox and IE7 already open, it will simply fail to start the virtual machine due to a lack of RAM (This partly because I’ve only got 512 measly megs).

Without any particular attachment to VPC, a week ago I stumbled upon VMWare’s Virtual Appliance Marketplace. If you’ve never checked it out, it’s a whole bunch of prepackaged, ready-to-run virtual machines, with the configuring done for you. It’s like buying a brand new computer for free! My interest in VMWare’s offerings was piqued.

Anyway, one thing led to another, and finally today I decided I wanted to give the latest version of Ubuntu (Feisty Fawn) a whirl. Why, what a perfect task for my new totally free VMWare Server!

I decided not to go the prepackaged route, because I wanted to see what installation was like. Also, I decided to go with Xubuntu instead of Ubuntu, because Xubuntu’s system requirements are a bit lower than regular Ubuntu, and as I mentioned above, I’ve only got 512 MB of RAM.

Well, I downloaded the ISO image via a torrent, and fired up VMWare Server to create a new virtual machine. They’ve even got Ubuntu as one of the distros of Linux in the “New Virtual Machine” wizard, which is pretty cool.

I set the disk size to 10 GB and the RAM to 128 MB, as that is the recommended minimum amount of RAM for Xubuntu.

After setting the CD drive to the Xubuntu ISO, I fired up the virtual machine.

Xubuntu (and I’m guessing the other Ubuntu flavors) runs as a Live CD, from which you can install the OS onto the hard disk by running an Installer program that is conveniently located on the desktop. Pretty slick – although potentially confusing for new users, I didn’t have a hard time catching on.

I ran the Installer by double-clicking it, and was a bit annoyed by how slow everything seemed. It took more than a minute before the installer asked me what language I wanted to use. Even after it asked, it took a while before I could click the “Forward” button. All in all, things seemed very unresponsive – not at all what I had been expecting, even if it was in a virtual machine.

A few steps later, the installer was getting ready to partition my virtual hard disk – and it froze. It seemed like it was working, but after leaving it alone for 10 minutes, it was still in the same place. VMWare reported that it was reading the CD like crazy, and my computer’s hard disk was intermittently accessing (presumably the ISO), but it wasn’t moving anywhere. I decided to try rebooting (I know, I know, Windows mentality – it’s hard to kick the habit). This time, the installer froze in the exact same way at the language screen!

At this point, I was a bit frustrated. Then I remembered something that I had forgotten about when I should have been remembering it – using the graphical installer requires 192 MB of RAM! And apparently, it actually does. It would probably be helpful if there was some message in the installer reminding users of this fact.

In any case, I shut down the VM, upped the RAM to 192, and started it back up. And guess what? It installed without a hitch! The installer screens also loaded much quicker, more along the lines of what I was expecting (although there were still some undesirable delays between when a page was viewable and when it was clickable). I’m now in and exploring Xubuntu!

PC Takeout launched

A couple days ago I quietly put a website up on the Internet that has been several months in the making. It is now my pleasure to introduce you to… PC Takeout!

It takes some of the principles from my Java VNC over SSH post and applies them to a more general audience. For those unfamiliar with that post, it’s a free, open to the public service similar to GoToMyPC.

I’ve made a couple changes since then. It now uses TightVNC for the VNC server, and FreeSSH for the SSH server. What this means for you the user is that you can download and install both servers in one nice, easy-to-install package (available here)!

Currently I’m ironing out a lot of issues – trying to figure out how to solve problems with Windows XP’s fast user switching. However, I have big plans for it if there’s enough public interest in the service – currently, I’m planning on implementing a “helper” service to run alongside VNC and SSH that will contact the main pctakeout.net server with updated “host status,” so dynamic IP addresses will automatically get updated, and using this service, I hope to do some fancy P2P firewall punching stuff.

Anyhoo, feel free to leave any suggestions or feedback.

Getting svg paths into Expression or Photoshop

I’ve been doing some graphic design work lately, and I’ve been trying to make a much better effort to do things using vector format rather than raster. Photoshop (Version 6.0, no less!) is still my favorite image editing app, but I’ve realized just how powerful path/shape layers with effects applied to them are.

I found some shapes at the Open Clip Art Library that I wanted to use in Photoshop. All the things at Open Clip Art are available in raster (PNG) and vector (SVG) format. “Okay,” I thought, “I’ll get the SVG version, and copy the paths into Photoshop, getting super high quality paths.” Right? Not quite.

Photoshop (at least version 6 – I can’t speak for later versions) does not import paths from a file. Apparently, the only way you can get paths into Photoshop is by copying and pasting them from certain applications. I’m aware of two applications that Photoshop can import paths from: Adobe Illustrator and Microsoft Expression/Acrylic (aka Creature House Expression). I don’t have Illustrator installed on my machine currently (I’ve got the installation CD somewhere, but I’m not quite sure where…), so that was option was out.

(Side note: Microsoft used to give Expression 3 away for free, but they no longer shows a link to get it. Last time I checked, though, you could get it from them here. It’s a pretty snazzy vector graphics program, but it’s got some issues.)

Too bad that Inkscape wasn’t on that list. Inkscape does, however, save to EPS files, which Expression can supposedly open.

“Sweet,” I thought, “I’ll resave the SVG as an EPS in Inkscape, then just open up the EPS in Expression and copy it over.” Except – all I got when I tried opening the EPS in Expression was a blank page. I opened up the EPS in other programs, and it showed up fine. Expression just doesn’t seem to want to open them.

Back to the drawing board. I tried converting the EPS into various other formats using external tools, all to no avail. Boo.

I stumbled across an article that suggested that Expression could understand WMF data copied out of Microsoft Office products. So I fired up Microsoft Word. I was able to insert the EPS file that I saved in Inkscape into a Word document. From there, I tried copying and pasting into Expression – this time I got a blank box. I then experimented with changing the format of the image using the Paste Special feature of Word, and came across workable results when I pasted it as a WMF and copied THAT into Expression.

So, here are the steps I had to take:

  1. Open up the SVG file in Inkscape.
    • Optional: Get rid of any gradients in the image. SVG has some pretty sweet options for gradients that either WMF or EPS can’t quite use. Solid colors work best.
  2. In Inkscape, save the file as an EPS file.
  3. Insert the EPS file into a blank Word/Office document.
  4. In Word, copy the image, and then Paste Special. Choose “Picture (Windows Metafile)”.
  5. Copy the new image in Word and paste it into a blank Expression document.
  6. To get it into Photoshop, copy it in Expression and paste it into Photoshop. Choose the “Paths” option.

Whew!