Index: xc/ChangeLog =================================================================== RCS file: /cvs/xorg/xc/ChangeLog,v retrieving revision 1.64 diff -u -2 -0 -r1.64 ChangeLog --- xc/ChangeLog 19 Jun 2004 09:01:13 -0000 1.64 +++ xc/ChangeLog 19 Jun 2004 21:51:45 -0000 @@ -1,21 +1,30 @@ 2004-06-19 Roland Mainz + * xc/programs/Xserver/Xprint/Init.c + * xc/programs/Xserver/Xprint/etc/init.d/xprint + * xc/programs/Xserver/os/utils.c + Bugzilla #764: Rework previous solution and make Xprt to default + to "-noreset" (the default of Solaris's version of Xprt) + and add a "-reset" option which can be used to restore the + default behaviour on demand. + +2004-06-19 Roland Mainz * xc/programs/Xserver/Xprint/etc/init.d/xprint Bugzilla #764: Start Xprt with option "-noreset" to get rid of the problem that Xprt resets itself aftert each client disconnect when there is only one client and no dtpdmd. This solves at least the following problems: - Font paths set after Xprt startup via "xset +fp ..." get lost - Resources stored in the Xserver get lost - Displaying a print dialog is awfull slow 2004-06-17 Thomas Winischhofer * programs/Xserver/hw/xfree86/drivers/sis/300vtbl.h: * programs/Xserver/hw/xfree86/drivers/sis/310vtbl.h: * programs/Xserver/hw/xfree86/drivers/sis/init.c: * programs/Xserver/hw/xfree86/drivers/sis/init.h: * programs/Xserver/hw/xfree86/drivers/sis/init301.c: * programs/Xserver/hw/xfree86/drivers/sis/init301.h: * programs/Xserver/hw/xfree86/drivers/sis/initdef.h: * programs/Xserver/hw/xfree86/drivers/sis/oem300.h: * programs/Xserver/hw/xfree86/drivers/sis/oem310.h: Index: xc/programs/Xserver/Xprint/Init.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/Init.c,v retrieving revision 1.4 diff -u -2 -0 -r1.4 Init.c --- xc/programs/Xserver/Xprint/Init.c 15 May 2004 14:43:05 -0000 1.4 +++ xc/programs/Xserver/Xprint/Init.c 19 Jun 2004 21:51:54 -0000 @@ -278,60 +278,66 @@ "/etc/dt/config/print:/usr/dt/config/print"; static const char printServerConfigDir[] = "XPSERVERCONFIGDIR"; static int printScreenPrivIndex, printWindowPrivIndex, printGCPrivIndex; static unsigned long printGeneration = 0; static char *configFileName = (char *)NULL; static Bool freeDefaultFontPath = FALSE; static char *origFontPath = (char *)NULL; static Bool xprintInitGlobalsCalled = FALSE; /* * This function is responsible for doing initalisation of any global * variables at an very early point of server startup (even before * |ProcessCommandLine()|. */ void XprintInitGlobals(void) { + extern char dispatchExceptionAtReset; /* defined in Xserver/dix/dispatch.c */ + xprintInitGlobalsCalled = TRUE; #ifdef SMART_SCHEDULE /* Somehow the XF86 "smart scheduler" completely kills the Xprint DDX * (see http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=467 * ("Xfree86's "smart scheduler" breaks Xprt") */ SmartScheduleDisable = TRUE; #endif /* SMART_SCHEDULE */ /* Disable internal screensaver for Xprint (workaround for * http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=567 ("Xorg * Xprt starts to consume 100% CPU when being idle for some time")) */ defaultScreenSaverTime = 0; /* Ensure that the maximum request size for the BIGREQUESTS extension * is at least 8MB (see * http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=622 - "RFE: * Xprt's default BIGREQUESTS extension buffer size should be 8MB") */ maxBigRequestSize = (8*1048576)-1; + + /* Xprt should not reset by default when the last client exists + * (default for Xprt is |0|, video Xservers use |DE_RESET|) */ + dispatchExceptionAtReset = 0; } /* * XprintUseMsg() prints usage for the Xprint-specific options */ void XprintUseMsg() { XpSpoolerTypePtr curr = xpstm; /* Option '-XpFile' */ ErrorF("-XpFile file specifies an alternate `Xprinters' file, rather\n"); ErrorF(" than the default one (e.g.\n"); ErrorF(" `${XPCONFIGDIR}/${LANG}/print/Xprinters') or\n"); ErrorF(" `${XPCONFIGDIR}/C/print/Xprinters'.\n"); /* Option '-XpSpoolerType' */ ErrorF("-XpSpoolerType string specifies a spooler type.\n"); ErrorF(" Supported values are:\n"); while( curr->name != NULL ) Index: xc/programs/Xserver/Xprint/etc/init.d/xprint =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/etc/init.d/xprint,v retrieving revision 1.9 diff -u -2 -0 -r1.9 xprint --- xc/programs/Xserver/Xprint/etc/init.d/xprint 19 Jun 2004 09:01:13 -0000 1.9 +++ xc/programs/Xserver/Xprint/etc/init.d/xprint 19 Jun 2004 21:51:55 -0000 @@ -561,50 +561,50 @@ curr=0 while [ $curr -lt $num_xpstart ] ; do if [ "${xpstart_remote_server[$curr]}" != "" ] ; then # Remote Xprt, just put the entry into the registry lock_server_registry echo "display=${xpstart_remote_server[$curr]}" >>"${XP_SERVERS}" unlock_server_registry else # Run block in seperate process to avoid that changes to the # xpstart_* variables affect the next cycle ( # Use defaults if there are no special options [ "${xpstart_fontpath[$curr]}" = "" ] && xpstart_fontpath[$curr]="${default_fontpath}"; [ "${xpstart_fontpath_acceptpattern[$curr]}" = "" ] && xpstart_fontpath_acceptpattern[$curr]="$default_fontpath_acceptpattern"; [ "${xpstart_fontpath_rejectpattern[$curr]}" = "" ] && xpstart_fontpath_rejectpattern[$curr]="$default_fontpath_rejectpattern"; [ "${xpstart_displayid[$curr]}" = "" ] && xpstart_displayid[$curr]="$(FindFreeXDisplayNum)" [ "${xpstart_logger[$curr]}" = "" ] && xpstart_logger[$curr]="logger -p lpr.notice -t Xprt_${xpstart_displayid[$curr]}"; [ "${xpstart_logfile[$curr]}" = "" ] && xpstart_logfile[$curr]="/dev/null"; [ "${xpstart_xprt_binary[$curr]}" = "" ] && xpstart_xprt_binary[$curr]="${XPRT_BIN}"; if [ "${xpstart_xprt_binary[$curr]}" = "/usr/openwin/bin/Xprt" -o "$(uname -s)" = "SunOS" ] ; then - # Solaris /usr/openwin/bin/Xprt does not support "-nolisten tcp" or "noreset" + # Solaris /usr/openwin/bin/Xprt does not support "-nolisten tcp" # yet nor is it possible to run a Xserver on a unix socket only # in Solaris since access to the unix domain sockets in # /tmp/.X11-pipe and /tmp/.X11-unix is restricted to applications # with group-id "root" (e.g. the Xprt server would need to be # setgid "root" that plain users can start it listening on a unix # socket only) [ "${xpstart_options[$curr]}" = "" ] && xpstart_options[$curr]="-ac -pn" else - [ "${xpstart_options[$curr]}" = "" ] && xpstart_options[$curr]="-ac -pn -nolisten tcp -noreset" + [ "${xpstart_options[$curr]}" = "" ] && xpstart_options[$curr]="-ac -pn -nolisten tcp" fi # Check if the Xprt binary is available if [ ! -x "${xpstart_xprt_binary[$curr]}" ] ; then error_echo "Can't find \"${xpstart_xprt_binary[$curr]}\"." exit 1 # exit block fi # Verify and set location of font encodings directory file if [ "${xpstart_font_encodings_dir[$curr]}" = "" ] ; then if [ -f "${XPROJECTROOT}/lib/X11/fonts/xf86encodings/encodings.dir" ] ; then xpstart_font_encodings_dir[$curr]="${XPROJECTROOT}/lib/X11/fonts/xf86encodings/encodings.dir" else xpstart_font_encodings_dir[$curr]="${XPROJECTROOT}/lib/X11/fonts/encodings/encodings.dir"; fi fi unset FONT_ENCODINGS_DIRECTORY if [ ! -f "${xpstart_font_encodings_dir[$curr]}" ] ; then warning_echo "Can't find \"${xpstart_font_encodings_dir[$curr]}\", TrueType font support may not work." Index: xc/programs/Xserver/os/utils.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/os/utils.c,v retrieving revision 1.2 diff -u -2 -0 -r1.2 utils.c --- xc/programs/Xserver/os/utils.c 23 Apr 2004 19:54:28 -0000 1.2 +++ xc/programs/Xserver/os/utils.c 19 Jun 2004 21:51:58 -0000 @@ -499,40 +499,42 @@ ErrorF("-fp string default font path\n"); ErrorF("-help prints message with these options\n"); ErrorF("-I ignore all remaining arguments\n"); #ifdef RLIMIT_DATA ErrorF("-ld int limit data space to N Kb\n"); #endif #ifdef RLIMIT_NOFILE ErrorF("-lf int limit number of open files to N\n"); #endif #ifdef RLIMIT_STACK ErrorF("-ls int limit stack space to N Kb\n"); #endif #ifdef SERVER_LOCK ErrorF("-nolock disable the locking mechanism\n"); #endif #ifndef NOLOGOHACK ErrorF("-logo enable logo in screen saver\n"); ErrorF("nologo disable logo in screen saver\n"); #endif ErrorF("-nolisten string don't listen on protocol\n"); + ErrorF("-noreset don't reset after last client exists\n"); + ErrorF("-reset reset after last client exists\n"); ErrorF("-p # screen-saver pattern duration (minutes)\n"); ErrorF("-pn accept failure to listen on all ports\n"); ErrorF("-nopn reject failure to listen on all ports\n"); ErrorF("-r turns off auto-repeat\n"); ErrorF("r turns on auto-repeat \n"); #ifdef RENDER ErrorF("-render [default|mono|gray|color] set render color alloc policy\n"); #endif ErrorF("-s # screen-saver timeout (minutes)\n"); #ifdef XCSECURITY ErrorF("-sp file security policy file\n"); #endif ErrorF("-su disable any save under support\n"); ErrorF("-t # mouse threshold (pixels)\n"); ErrorF("-terminate terminate at server reset\n"); ErrorF("-to # connection time out\n"); ErrorF("-tst disable testing extensions\n"); ErrorF("ttyxx server started from init on /dev/ttyxx\n"); ErrorF("v video blanking for screen-saver\n"); ErrorF("-v screen-saver without video blanking\n"); @@ -806,40 +808,44 @@ logoScreenSaver = 1; } else if ( strcmp( argv[i], "nologo") == 0) { logoScreenSaver = 0; } #endif else if ( strcmp( argv[i], "-nolisten") == 0) { if(++i < argc) { if (_XSERVTransNoListen(argv[i])) FatalError ("Failed to disable listen for %s transport", argv[i]); } else UseMsg(); } else if ( strcmp( argv[i], "-noreset") == 0) { dispatchExceptionAtReset = 0; } + else if ( strcmp( argv[i], "-reset") == 0) + { + dispatchExceptionAtReset = DE_RESET; + } else if ( strcmp( argv[i], "-p") == 0) { if(++i < argc) defaultScreenSaverInterval = ((CARD32)atoi(argv[i])) * MILLI_PER_MIN; else UseMsg(); } else if ( strcmp( argv[i], "-pn") == 0) PartialNetwork = TRUE; else if ( strcmp( argv[i], "-nopn") == 0) PartialNetwork = FALSE; else if ( strcmp( argv[i], "r") == 0) defaultKeyboardControl.autoRepeat = TRUE; else if ( strcmp( argv[i], "-r") == 0) defaultKeyboardControl.autoRepeat = FALSE; else if ( strcmp( argv[i], "-s") == 0) { if(++i < argc) defaultScreenSaverTime = ((CARD32)atoi(argv[i])) *