llemarie’s weblog

Programming, tinkering – Lionel Lemarié

Archive for November, 2007

Programming: ezTunnel SSH – Port Forwarding Made Easy

Posted by llemarie on November 25, 2007

Update: Windows and Linux binaries, as well as open-source code under GPL are available here.

The freeware “ezTunnel SSH” is a GUI application for Windows and Linux that makes it easy to manage multiple SSH tunnels in the background. The interface is simple: creating a tunnel takes a few seconds, connecting to an existing tunnel is instant!

“Why would I want to do that?” you might ask… To make a secure connection to your home or to your office of course! If you wanted to control your home computer via Remote Desktop from work for example, you certainly don’t want to open port 3389 on your home firewall! Instead you set-up an SSH server at home (with a Linux box, or using cygwin under Windows, it’s easy either way) then you “tunnel” your connection via the port 22 (default for SSH) and you don’t have to open any other ports on your firewall. With one SSH server on your home network, you can access any computer on your network simply by creating a tunnel to it.

Now imagine you want to securely control your home PC from anywhere in the world, stream your home MP3s (using Jinzora, it’s brilliant), occasionally connect to a secure server at work, punch a hole through a local firewall administrated by somebody else, etc… That will take a few tunnels to set-up. No worries: with ezTunnel SSH it only take minutes and it all sits in one icon in the system tray.

Simply put, a tunnel works this way:

  • Tell it where the SSH server is (this is your home address, probably a static IP from your ISP or a dyndns address).
  • Tell it which computer you want to access on your home network (this is the internal IP, probably 192.168.0… ).
  • Specify the remote port (for remote desktop that’s 3389, for a web server it’s 80, etc…).
  • Choose a local port (that’s your choice, I tend to use ports in the 5000-6000 range).
  • Start the tunnel and connect to “localhost:5000” (if you chose 5000 as the local port).

That’s it, now you can access all your home computers from anywhere completely securely!

Get “ezTunnelSSH” for free here.

Advertisements

Posted in Blogroll, Programming | Tagged: | 8 Comments »

Programming: Updated Teenage Mutant Ninja Puppets

Posted by llemarie on November 11, 2007

I’ve received a few requests to post the full version of Teenage Mutant Ninja Puppets as shown in the YouTube video I posted a few months ago.

This version has the high resolution textures and character position editor enabled.

Update: Network support now works and the editor can save the current pose of the ghost (the pale guy) by pressing ‘R’ on the keyboard, then during the game you can use the pose by pressing ‘T’.

Download it free here (5MiB).

Screenshots on flickr.

Posted in Blogroll, Programming, Teenage Mutant Ninja Puppets | Tagged: , | 56 Comments »

Project: Musical Caps-Lock Key

Posted by llemarie on November 7, 2007

I posted my first Instructables after I received a comment on my Frankenphones post saying that I should have pusblished the instructions for the headphones.

For this project I took the idea from a Kipkay video and wired a greeting card musical module to the caps-lock key of a colleague’s keyboard, unbeknownst to him, and waited for him to press caps-lock by mistake. Music!

He googled for a virus that plays music on your keyboard, looked for accessibility settings, searched for the source of the Jingle Bells music: is it the PC? is it the monitor? no, it’s the keyboard! This prank is hilarious!

Read all about it on Instructables.

Photos on flickr.

Lire en français.

Posted in Blogroll, Musical CapsLock Key, Prank, Projects | Tagged: | Leave a Comment »

Tip: Use a higher resolution desktop than your monitor can support

Posted by llemarie on November 3, 2007

Note: This post has been superceded. Please see this update for a better way to do this. 

As a follow up from my previous post about scaling the screen for a remote session, here’s a new hack that allows you to scale the screen of your local session! Using this trick you can set the desktop to a resolution that is not supported by your monitor and it will be scaled down nicely to fit. There is of course a performance hit, but depending on your usage this could be very useful. For example I am writing this post in a comfortable Firefox window in 1600×1200 on a monitor that supports only 1280×1024.

There have been a number of hurdles to overcome: I needed to connect Remote Desktop to the machine I was currently using, and Windows does not make it easy for the user to do that. Windows XP does not allow multiple interactive users to log on at the same time normally, and Remote Desktop refuses to connect to localhost on port 3389. Now this simple tutorial will take you past those problems in no time.

Here’s how you do it:

1. How to allow multiple users to connect at once on Windows XP.

Get the Terminal Patch and install it. It’s really easy, just run the installer, there’s nothing to it. You need to reboot.

You can now login into your machine using multiple accounts at once, locally and using Remote Desktop.

2. Create a new user account and enable Fast User Switching

Add a new user whose sole purpose will be to Remote Desktop to localhost. Log-in as the new user for the remaining steps. No need to set the theme or anything.

To add a new user, open the Control Panel, open User Accounts, click “Create a new account”. Then enable Fast User Switching by clicking “Change the way users log on or off”.

3. Trick Remote Desktop into letting you connect to localhost

By default Remote Desktop will not let you connect to the local computer (even using another account) saying that you are already using it. That’s dumb because you can use Remote Desktop from another machine to connect to your computer fine.

Download a port forwarder and create a shortcut for it. Open the shortcut properties and change it like this:

From:

"C:\Documents and Settings\Lionel\Desktop\portforward.exe"

To:

"C:\Documents and Settings\Lionel\Desktop\portforward.exe" 5000 127.0.0.1 3389

Run it, this redirects all connections to port 5000 to port 3389 which is used normally by Remote Desktop. Now when you connect, use 5000 instead of the default port and you will get connected fine.

4. Create a saved RDP session with scaled settings

Follow the instructions from the previous post to create a .rdp file and add “smart sizing” to it.

Set the server to “localhost:5000” as we setup in the previous step.

Set the username as your normal username, not the new one.


That’s it! When you want high-res, simply log-in with your new account, start the port forwarder with the shortcut, start the connection by double-clicking on the .rdp and you’re connected as your usual user.

Posted in Blogroll, Remote Desktop, Tips | Tagged: , | 1 Comment »

Tip: Scaling your Remote Desktop session

Posted by llemarie on November 1, 2007

No matter whether you’re a Windows lover or hater, there’s no denying that Remote Desktop is one of the greatest features of the system. It beats VNC and many other remote control solutions by far for its sheer speed and picture quality (although of course VNC is genius for the fact that it works on Linux and Mac).

One gripe I have had with Remote Destop for years though is that I want to be able to connect to my desktop machine at its native high resolution from my laptop which has a lower resolution. Scaling isn’t that hard! Don’t give me those scrollbars, they are just useless. Both TightVNC and MaxiVista (and many others) support scaling the remote screen and it looks very good, so it’s been frustrating not to have the feature in RDP.

This morning I found that RDP does indeed support nice and efficient scaling, just not from the GUI settings. Here’s how:

  • Configure your remote connection from the GUI as usual.
  • In “Local Resources, make sure that “Apply Windows key combinations” is set to “On the remote computer”.
  • Save the connections settings to a file in a sensible directory. Call it for example “Remote.rdp”.
  • Open Notepad and edit that file “Remote.rdp”, it’s just a text file that looks like this (short version):
screen mode id:i:1
desktopwidth:i:1280
desktopheight:i:800
session bpp:i:16
winposstr:s:0,3,0,0,800,600
compression:i:1
keyboardhook:i:1
  • Add a new line with this text: “smart sizing:i:1”
  • Change the desktop width and height to what you want (for example 1600 and 960 to keep the aspect ratio).
  • You’re done! Save and quit Notepad. Double click on Remote.rdp, you’re connected at high resolution!

Using this extremely simple tip (hacking with notepad! where have the hex editor days gone ?) you can crank up your resolution to 4096×2048, if you don’t mind not being able not to read anything. I find that a factor of roughly 1.25 is sensible.

Posted in Blogroll, Remote Desktop, Tips | Tagged: , , | 29 Comments »

Software: LeDimmer – Unclutter your screen

Posted by llemarie on November 1, 2007

LeDimmer is a small Windows application (<200KB) that sits in the system tray and simply dims the screen around the foreground window. The numerous advantages include being able to focus on the task at hand, finding the window in focus at first glance even on multi-monitors, and it even looks nice. General Windows usage is not changed at all: click or alt-tab into a dimmed window and it brightens into focus.

You can specify a bitmap as the dimming picture to get a nice glossy effect on your screen, embed your company logo, admire your dulcine, etc…

It couldn’t be simpler to use: start it, it sits in the system tray, quit it with the tray menu or the shortcut ctrl-shift-q. That’s it…

LeDimmer works on Windows 2000, XP and Vista. Grab it free from the home page.

Comments, feature requests and bug reports are appreciated.

Posted in Blogroll, LeDimmer, Programming, Projects | Tagged: , , , , , , | 1 Comment »