## Patch originally from Fedora - Revision 1.1 of:
## Modified to make httpd service off by default and only offered via -httpd
diff --git a/unix/vncserver b/unix/vncserver
index 689641f..f3468ed 100755
--- a/unix/vncserver
+++ b/unix/vncserver
@@ -122,6 +122,7 @@ if ($fontPath eq "") {
# 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,"-list",0,"-fg",0,"-autokill",0);
&Usage() if ($opt{'-help'} || $opt{'-h'} || $opt{'--help'});
@@ -148,6 +149,12 @@ if ($opt{'-fp'}) {
$fontPath = $opt{'-fp'};
$fpArgSpecified = 1;
}
+if ($opt{'-httpd'}) {
+ $nohttpd = 0;
+}
+else {
+ $nohttpd = 1;
+}
&CheckGeometryAndDepth();
@@ -253,7 +260,7 @@ if ($opt{'-name'}) {
$cmd = $exedir."Xvnc :$displayNumber";
$cmd .= " -desktop " . "edString($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);
@@ -568,7 +575,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 --git a/unix/vncserver.man b/unix/vncserver.man
index 7654380..fef13f3 100644
@@ -82,6 +82,10 @@ for the \-cc option may result in strange behaviour, and PseudoColor desktops
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