Proposed patch attached
On 3/15/11 4:48 AM, Sebastiaan Breedveld wrote:
> Hi,
>
> 3 points this time ;)
>
> On 03/15/2011 09:45 AM, DRC wrote:
>> I have lost track of the status of this. Can anyone still reproduce a
>> problem with the latest build I uploaded on 3/10? If not, then I will
>> spin a new build to incorporate the vncserver changes (reverting the
>> default behavior + fixing vncserver -fg&), and I think we'll be ready
>> for beta.
>>
> 1) The new vncserver script does something weird with -fg. When I use
> this switch, xfce4 refuses to start with:
>
> "Unable to contact settings server. Failed to connect to socket
> /tmp/dbus-GBOh4ZTlHF: Connection refused."
>
> The culprit is the close(STDIN). I also cannot reproduce your behaviour:
>
>> My assertion that 'vncserver -fg &' would produce the same behavior
> was incorrect. If I did that, then pressing Enter would stop the job. I
> had to also close STDIN to make it work correctly.
>
> as vncserver -fg &
>
> works perfectly for me. Maybe this depends on the WM. When I run
> 'startxfce4', I cannot put the job in the background (only closing the
> terminal very quickly works). However, I am using xfce4 now without the
> vncserver script problem.
>
> This has to be figured out, as the WM does not start properly with
> close(STDIN) for me, and without for you. I have this on 2 different
> systems (Ubuntu lucid and natty-alpha).
>
>
> 2)
> As for the Windows viewer: no delays have been noted.
>
>
> 3) I noticed that when moving a window left, the window looks garbaged.
> Moving into other directions is fine. Forcing a redraw (moving it
> vertically off/on the screen or switch desktop) works fine. Not all
> windows have this, but e.g. Thunar has. Both the Linux and Windows
> viewer have this. It is just a bit annoying sometimes, but I do not
> think we have to fix this in the beta. But attention should be payed later.
>
> Greetings,
> Sebastiaan
>
>
> ------------------------------------------------------------------------------
> Colocation vs. Managed Hosting
> A question and answer guide to determining the best fit
> for your organization - today and in the future.
> http://p.sf.net/sfu/internap-sfd2d
> _______________________________________________
> Tigervnc-devel mailing list
> Tigervnc-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tigervnc-devel
Index: unix/vncserver
===================================================================
--- unix/vncserver (revision 4360)
+++ unix/vncserver (working copy)
@@ -122,7 +122,7 @@
# Check command line options
&ParseOptions("-geometry",1,"-depth",1,"-pixelformat",1,"-name",1,"-kill",1,
- "-help",0,"-h",0,"--help",0,"-fp",1,"-list",0,"-fg",0);
+
"-help",0,"-h",0,"--help",0,"-fp",1,"-list",0,"-fg",0,"-autokill",0);
&Usage() if ($opt{'-help'} || $opt{'-h'} || $opt{'--help'});
@@ -338,10 +338,19 @@
$ENV{VNCDESKTOP}= $desktopName;
if ($opt{'-fg'}) {
- close(STDIN);
- system("($vncUserDir/xstartup; $0 -kill :$displayNumber) >> " .
"edString($desktopLog) . " 2>&1");
+ system("$vncUserDir/xstartup >> " . "edString($desktopLog) . " 2>&1");
+ if (kill 0, `cat $pidFile`) {
+ $opt{'-kill'} = ':'.$displayNumber;
+ &Kill();
+ }
} else {
- system("$vncUserDir/xstartup >> " . "edString($desktopLog) . " 2>&1
&");
+ if ($opt{'-autokill'}) {
+ system("($vncUserDir/xstartup; $0 -kill :$displayNumber) >> "
+ . "edString($desktopLog) . " 2>&1 &");
+ } else {
+ system("$vncUserDir/xstartup >> " . "edString($desktopLog)
+ . " 2>&1 &");
+ }
}
exit;
@@ -564,6 +573,7 @@
" [-pixelformat rgbNNN|bgrNNN]\n".
" [-fp <font-path>]\n".
" [-fg]\n".
+ " [-autokill]\n".
" <Xvnc-options>...\n\n".
" $prog -kill <X-display>\n\n".
" $prog -list\n\n");
Index: unix/vncserver.man
===================================================================
--- unix/vncserver.man (revision 4360)
+++ unix/vncserver.man (working copy)
@@ -15,6 +15,7 @@
.RB [ \-fp
.IR font-path ]
.RB [ \-fg ]
+.RB [ \-autokill ]
.RI [ Xvnc-options... ]
.br
.BI "vncserver \-kill :" display#
@@ -113,6 +114,12 @@
user logs out of the window manager in the VNC session. This may be necessary
when launching TigerVNC from within certain grid computing environments.
+.TP
+.B \-autokill
+Automatically kill Xvnc whenever the xstartup script exits. In most cases,
+this has the effect of terminating Xvnc when the user logs out of the window
+manager.
+
.SH FILES
Several VNC-related files are found in the directory $HOME/.vnc:
.TP
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel