diff -urN ../vnc-3.3.7-unixsrc.orig/vncserver ./vncserver
--- ../vnc-3.3.7-unixsrc.orig/vncserver	Wed Oct 30 02:21:33 2002
+++ ./vncserver	Wed Mar  3 09:02:19 2004
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!@PERL@
 #
 #  Copyright (C) 2002 RealVNC Ltd.
 #  Copyright (C) 1999 AT&T Laboratories Cambridge.  All Rights Reserved.
@@ -37,9 +37,9 @@
 $depth = 16;
 $desktopName = "X";
 $vncClasses = (((-d "/usr/share/vnc/classes") && "/usr/share/vnc/classes") ||
-               ((-d "/usr/local/vnc/classes") && "/usr/local/vnc/classes"));
+               ((-d "@PREFIX@/vnc/classes") && "@PREFIX@/vnc/classes"));
 $vncUserDir = "$ENV{HOME}/.vnc";
-$xauthorityFile = "$ENV{XAUTHORITY}" || "$ENV{HOME}/.Xauthority";
+$xauthorityFile = "$ENV{XAUTHORITY}" || "$ENV{HOME}/.Xauthority" || "$vncUserDir/.Xauthority";
 
 $defaultXStartup
     = ("#!/bin/sh\n\n".
