vnc-nohttpd.patch revision 822
## Patch originally from Fedora - Revision 1.1 of:
http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-nohttpd.patch
## Modified to make httpd service off by default and only offered via -httpd
diff -urp -x '*~' -x '*.orig' unix/vncserver unix/vncserver
--- unix/vncserver 2009-08-20 02:46:42.000000000 -0700
+++ unix/vncserver 2009-08-31 03:21:53.656835000 -0700
@@ -123,6 +123,7 @@ if ($defFontPath) {
# Check command line options
&ParseOptions("-geometry",1,"-depth",1,"-pixelformat",1,"-name",1,"-kill",1,
+ "-httpd",0,
"-help",0,"-h",0,"--help",0,"-fp",1);
&Usage() if ($opt{'-help'} || $opt{'-h'} || $opt{'--help'});
@@ -147,6 +148,12 @@ if ($opt{'-fp'}) {
$fontPath = $opt{'-fp'};
$fpArgSpecified = 1;
}
+if ($opt{'-httpd'}) {
+ $nohttpd = 0;
+}
+else {
+ $nohttpd = 1;
+}
&CheckGeometryAndDepth();
@@ -212,7 +219,7 @@ if ($opt{'-name'}) {
$cmd = $exedir."Xvnc :$displayNumber";
$cmd .= " -desktop " . &quotedString($desktopName);
-$cmd .= " -httpd $vncJavaFiles" if ($vncJavaFiles);
+$cmd .= " -httpd $vncJavaFiles" if ($vncJavaFiles && ! $nohttpd);
$cmd .= " -auth $xauthorityFile";
$cmd .= " -geometry $geometry" if ($geometry);
$cmd .= " -depth $depth" if ($depth);
@@ -535,7 +542,7 @@ sub removeSlashes
sub Usage
{
- die("\nusage: $prog [:<number>] [-name <desktop-name>] [-depth <depth>]\n".
+ die("\nusage: $prog [:<number>] [-httpd] [-name <desktop-name>] [-depth <depth>]\n".
" [-geometry <width>x<height>]\n".
" [-pixelformat rgbNNN|bgrNNN]\n".
" [-fp <font-path>]\n".
diff -urp -x '*~' -x '*.orig' unix/vncserver.man unix/vncserver.man
--- unix/vncserver.man 2009-08-20 02:46:42.000000000 -0700
+++ unix/vncserver.man 2009-08-31 03:21:53.663499000 -0700
@@ -80,6 +80,10 @@ for the \-cc option may result in strang
must have an 8-bit depth.
.TP
+.B \-httpd
+Instruct Xvnc to run a mini-httpd if the VNC Java applet is found.
+
+.TP
.B \-kill :\fIdisplay#\fP
This kills a VNC desktop previously started with vncserver. It does this by
killing the Xvnc process, whose process ID is stored in the file