Sunday, January 11, 2009

try windows 7 beta

So we can try this Windows 7 beta now, which is said to be better than Vista, and which we'll have to get used to anyway. Here a few tips which I may need when I find a machine to try it on, and which may help you too.

The official download seems to only work with IE 7, but if you get the direct link it does work normally. So with wget, that would be:

For the 32 bit version:
wget -c http://download.microsoft.com/download/6/3/3/633118BD-6C3D-45A4-B985-F0FDFFE1B021/EN/7000.0.081212-1400_client_en-us_Ultimate-GB1CULFRE_EN_DVD.ISO
And for the 64 bit version:
wget -c http://download.microsoft.com/download/6/3/3/633118BD-6C3D-45A4-B985-F0FDFFE1B021/EN/7000.0.081212-1400_client_en-us_Ultimate-GB1CULXFRE_EN_DVD.ISO

To have the beta working until August, you need a key. Apparently, there are only a few keys used:

7XRCQ-RPY28-YY9P8-R6HD8-84GH3
RFFTV-J6K7W-MHBQJ-XYMMJ-Q8DCH
482XP-6J9WR-4JXT3-VBPP6-FQF4M
D9RHV-JG8XC-C77H2-3YF6D-RYRJ9
JYDV8-H8VXG-74RPT-6BJPB-X42V4

4HJRK-X6Q28-HWRFY-WDYHJ-K8HDH
QXV7B-K78W2-QGPR6-9FWH9-KGMM7
6JKV2-QPB8H-RQ893-FW7TM-PBJ73
GG4MQ-MGK72-HVXFW-KHCRF-KW6KY
TQ32R-WFBDM-GFHD2-QGVMH-3P9GC

Possibly also useful:

Labels: , , , , ,

Sunday, July 06, 2008

Remote support through NAT firewalls

Remote support with tools like Remote Desktop, (Tight|Real|Ultra)VNC servers and clients etc. normally requires forwarding ports through NAT routers/firewalls on one side or the other.

In practice, this doesn't quite work: guiding the remote user over the phone to configure his router is unrealistic. He probably doesn't even know his router's password.

An alternative is to use reverse connections, so you deal with the port forwarding on your own router. But this doesn't work either if you are away from home and connect through someone else's router.

There are services which allow you to use someone else's server in the middle of the connection. But these services are usually expensive, charging a monthly fee, and besides you may not want the data to go through some third party's server for security reasons.

One nice solution I found for Windows is to use UltraVNC Single Click, and to run an UltraVNC repeater on my own server. The principle is shown here.

(I'm still looking for an equivalent solution to connect to remote Macs, so if you have suggestions, please post a comment).

So if you have a server with a public IP address you can do this to support Windows users.

Install a repeater on your server:

For my Debian Linux server, I installed the Linux version of the UltraVNC repeater from here:
http://koti.mbnet.fi/jtko/uvncrepeater/repeater014.zip.

After unzipping and moving into the directory, compilation was trouble free with a simple make.

The rest consisted of the following steps (which were quickly adapted from this post, and could probably be improved):
  • Create a new user: adduser uvncrep (with the shell set to /bin/false)
  • Edit the .ini file to produce a /etc/uvncrepeater.ini resembling this (use your server's IP for the "ownipaddress" value, and any numbers you like for the "idlistx" values).
    [general]
    viewerport = 5900
    serverport = 5500
    ownipaddress = aaa.bbb.ccc.ddd
    maxsessions = 10
    runasuser = uvncrep
    allowedmodes = 2
    logginglevel = 3

    [mode2]
    requirelistedid = 0
    idlist0 = 1800
    idlist1 = 1801
    idlist2 = 1803

    [eventinterface]
    useeventinterface = false
  • Copy the repeater executable to /usr/local/sbin/uvncrepeaterd
  • Create /etc/init.d/uvncrepeater:
    #!/bin/sh

    PATH=/sbin:/bin
    UVNCREPPID=/var/run/uvncrepeater.pid
    UVNCREPLOG=/var/log/uvncrepeater.log
    UVNCREPRUN=/usr/local/sbin/uvncrepeater-log
    UVNCREPSVC=/usr/local/sbin/uvncrepeaterd
    UVNCREPINI=/etc/uvncrepeater.ini

    #if service file does not exist then exit the script

    if test ! -x $UVNCREPSVC ; then
    echo $UVNCREPSVC file was not found.
    echo Exiting...
    exit 2
    fi

    #Create the file to start the service if it does not exist

    if test ! -x $UVNCREPRUN ; then
    echo '#!/bin/sh' > $UVNCREPRUN
    echo 'exec' $UVNCREPSVC $UVNCREPINI '2>>' $UVNCREPLOG >> $UVNCREPRUN
    chmod +x $UVNCREPRUN
    fi

    case "$1" in
    start)
    echo -n "Running UltraVNC Repeater..."
    start-stop-daemon --start -b -m -p $UVNCREPPID --exec $UVNCREPRUN -- $UVNCREPLOG
    echo "."
    ;;
    stop)
    echo "Stopping UltraVNC Repeater..."
    start-stop-daemon --stop -p $UVNCREPPID
    rm $UVNCREPPID
    ;;
    *)
    echo "Usage: $0 {start|stop}"
    exit 1
    esac
    exit 0
  • Start the daemon with /etc/init.d/uvncrepeater start

Configure the Single Click executable

This is the small executable which your clients will download and run so that you can access their computer.

You can follow the instructions here.

For the helpdesk.txt file, you can use the one provided in custom.zip. However, it is a bit messy, and has a few typos/spelling mistakes. If you prefer, you can try this alternative template or this sample file instead. Both will need editing, particularly to set your server's hostname and one of the IDs you configured on the server .

Then set up a page from which your clients can download the SC executable.

Set up the UltraVNC viewer

After installing UltraVNC on your machine, start the viewer, and configure it like this:

VNC Server: ID:xxxx (where xxxx is the id number used in your repeater .ini file and when creating the SC executable). "ID" must be in uppercase, and there must be no space in the whole field.

Check Proxy/Repeater and enter your repeater's name or IP and port. For example:
repeater.example.com:5900

UltraVNC Viewer settings

Notes:

As far as I can tell, VNC Reflector looks like it would provide the same functionality as the repeater. I haven't tried it.

To support Vista users, there are some difficulties. Apparently there may be solutions in this lengthy thread, but I haven't tried them yet. (Fortunately, I have been able to mostly avoid Vista until now.)

And, as mentioned at the beginning, I would be glad to find a solution to support Mac users from my Windows box through my repeater.

Labels: , , , ,

Monday, February 05, 2007

Linux desktop GUI in Windows

Just discovered a fantastic tool to allow remote access to a Linux GUI desktop from my Windows notebok: NoMachine's free NX Server.

While setting up a new server, after the initial basic install, I needed a way to compare the /etc trees of the old and new servers. There are over 500 file differences, so diff with it's unreadable output was not well suited to the task. At least, not by itself. The ideal tool would of course have been Total Commander's fantastic "Synchronize Dirs" command and it's built-in file comparison, but unfortunately that's only for Windows. The indispensable Linux Midnight Commander does have a directory comparison, but it doesn't go into subdirectories, nor does it compare files. Apparently, I needed something like Kompare, Meld or Kdiff3, which are all GUI programs, to get usable directory comparison. So I would have to install KDE or Gnome on a Linux server. That had always seemed pretty weird to me: why install a GUI on a machine which will have no keyboard or screen. Well, the times have changed, and you can now use KDE running on a remote server in some anonymous rack in a data center from your remote Windows machine. (BTW, Meld ended up being my preferred GUI diff tool).

I had first seen NX Server in a menu in Knoppix 5.1. I couldn't get it to work, but it had intrigued me. After spending far too much time struggling to try to get the open source version FreeNX to work on my new Debian Sarge server, I eventually came across this post which suggests just installing the NoMachine version. 10 minutes later, I had KDE running on my Windows notebook! The free NoMachine version is limited to 2 concurrent users, but that is one too many for me anyway.

While I'm still setting that server up, it's in an office with an ADSL link, and a very slow 100 kb/s. upstream speed. Still, I could connect to it from home, and use KDE as if I was sitting in front of the machine. It is orders of magnitude faster than VNC, which I sometimes use to access Windows machines over much faster links.

This technology also opens the door to the use of Linux in Windows offices. While it would be unrealistic to try to migrate most small businesses I know to Linux, it is now possible to add Linux applications running on the server to Windows users.We can now have the best of both worlds.

Download:

NX Client DEB for Linux

NX Node DEB for Linux

NX Desktop Server DEB for Linux

(You have to click a little through these pages to get to the real download link which you can use with wget)

Update: They seem to have grouped these 3 deb files onto the NX Free Edition for Linux page.

Install: (The order is important!)

# dpkg -i nxclient*.deb

# dpkg -i nxnode*.deb

# dpkg -i nxserver*.deb

Before I could install nxclient, I had to aptitude install libaudiofile0.

The server needs to connect to the ssh daemon. I use a non standard port, so I also had to

# perl -i.bak -pe 's/^[#\s]*(SSHDPort|SSHDAuthPort)\s*=.*/$1="MYOTHERPORT"/' /usr/NX/etc/node.cfg

# perl -i.bak -pe 's/^[#\s]*(SSHDPort|SSHDAuthPort)\s*=.*/$1="MYOTHERPORT"/' /usr/NX/etc/server.cfg

If you use AllowUsers in your /etc/ssh/sshd_config file, you need to add the nx user to that line:

# perl -i.bak -pe 's/^[#\s]*(AllowUsers\s*.*)/$1 nx/' /etc/ssh/sshd_config

If you get the error "cannot run startkde" or "cannot start gnome-session", you may need to  aptitude install ksmserver or the equivalent for gnome.


Labels: , , , , , ,