This is the mail archive of the
cygwin-xfree
mailing list for the Cygwin XFree86 project.
[PATCH] xinit: avoid some 'keyboard not working' cases
- From: Jon TURNEY <jon dot turney at dronecode dot org dot uk>
- To: cygwin-xfree at cygwin dot com
- Date: Wed, 07 Jan 2009 17:26:30 +0000
- Subject: [PATCH] xinit: avoid some 'keyboard not working' cases
- Reply-to: cygwin-xfree at cygwin dot com
Yaakov,
Attached is a patch against the xinit package in cygports svn:
* In an attempt to avoid some instances of the ever popular "I upgraded X and
now my keyboard doesn't work" problem, update the X server starting sample
scripts to actively unset XKEYSYMDB etc., environment variables, rather than
assuming they are empty.
Also:
* Use 'run' in the shortcut to run startxwin.bat, to avoid a console window
flashing up, as suggested by Angelo Graziosi in [1]
* Point to 'man XWin' rather than summarizing all the XWin specific command
line options here, reducing the number of places in which this information is
kept, in preparation for when I get around to updating it...
[1] http://cygwin.com/ml/cygwin-xfree/2008-11/msg00299.html
For some reason, the postinstall.sh/preremove.sh don't get included in the
package when I tested building it, not quite sure what I'm doing wrong there...
Index: postinstall.sh
===================================================================
--- postinstall.sh (revision 5460)
+++ postinstall.sh (working copy)
@@ -1,2 +1,2 @@
/usr/bin/mkdir -p "$(/usr/bin/cygpath -AP)/Cygwin-X"
-/usr/bin/mkshortcut -AP -i /usr/bin/XWin.exe -n "Cygwin-X/XWin Server" -w "" /usr/bin/startxwin.bat
+/usr/bin/mkshortcut -AP -i /usr/bin/XWin.exe -n "Cygwin-X/XWin Server" -w "" -a /usr/bin/startxwin.bat /usr/bin/run.exe
Index: startxwin.bat
===================================================================
--- startxwin.bat (revision 5460)
+++ startxwin.bat (working copy)
@@ -22,6 +22,10 @@
SET PATH=.;%CYGWIN_ROOT%\bin;%PATH%
+SET XAPPLRESDIR=
+SET XCMSDB=
+SET XKEYSYMDB=
+SET XNLSPATH=
REM
@@ -58,77 +62,8 @@
:STARTUP
-REM Brief descriptions of XWin-specific options:
-REM
-REM -screen scr_num [width height]
-REM Enable screen scr_num and optionally specify a width and
-REM height for that screen.
-REM Most importantly, any parameters specified before the first -screen
-REM parameter apply to all screens. Any options after the first -screen
-REM parameter apply only to the screen that precedes the parameter.
-REM Example:
-REM XWin -fullscreen -screen 0 -screen 1 -depth 8 -screen 2
-REM All screens will be fullscreen, but screen 2 will be depth 8, while
-REM screens 0 and 1 will be the default depth (whatever depth Windows
-REM is currently running at).
-REM -multiwindow
-REM Start an integrated Windows-based window manager. Not to be used
-REM with -rootless nor -fullscreen.
-REM -rootless
-REM Use a transparent root window with an external window manager
-REM (such as twm). Not to be used with -multiwindow nor
-REM with -fullscreen.
-REM -fullscreen
-REM Use a window as large as possible on the primary monitor.
-REM -multiplemonitors
-REM Create a root window that covers all monitors on a
-REM system with multiple monitors.
-REM -clipboard
-REM Enable the integrated version of xwinclip. Do not use in
-REM conjunction with the xwinclip program.
-REM -depth bits_per_pixel
-REM Specify the screen depth to run at (in bits per pixel) using a
-REM DirectDraw-based engine in conjunction with the -fullscreen
-REM option, ignored if the -fullscreen option is not specified.
-REM By default, you will be using a DirectDraw based engine on any
-REM system that supports it.
-REM -unixkill
-REM Trap Ctrl+Alt+Backspace as a server shutdown key combination.
-REM -nounixkill
-REM Disable Ctrl+Alt+Backspace as a server shutdown key combination (default).
-REM Example:
-REM XWin -unixkill -screen 0 -screen 1 -screen 2 -nounixkill
-REM Screens 0 and 1 will allow Ctrl+Alt+Backspace, but screen 2 will not.
-REM -winkill
-REM Trap Alt+F4 as a server shutdown key combination (default).
-REM -nowinkill
-REM Disable Alt+F4 as a server shutdown key combination.
-REM -scrollbars
-REM Enable resizing of the server display window. Do not use in conjunction
-REM with -multiwindow nor with -rootless.
-REM -nodecoration
-REM Draw the server root window without a title bar or border.
-REM Do not use with -mutliwindow nor with -rootless.
-REM -lesspointer
-REM Hide the Windows mouse cursor anytime it is over any part of the
-REM window, even if Cygwin/X is not the window with the focus.
-REM -refresh rate_in_Hz
-REM Specify a refresh rate to use when used with the -fullscreen option.
-REM -trayicon
-REM Enable the tray icon (default).
-REM -notrayicon
-REM Disable the tray icon.
-REM Example:
-REM XWin -notrayicon -screen 0 -screen 1 -screen 2 -trayicon
-REM Screens 0 and 1 will not have tray icons, but screen 2 will.
-REM -emulate3buttons [timeout]
-REM Emulate 3 button mouse with an optional timeout in milliseconds.
-REM -xf86config
-REM Specify an XF86Config-style configuration file.
-REM -keyboard
-REM Specify a keyboard device from the configuration file.
+REM For a descriptions of XWin-specific options, see 'man XWin'
-
REM
REM Startup the programs
REM
Index: startxwin.sh
===================================================================
--- startxwin.sh (revision 5460)
+++ startxwin.sh (working copy)
@@ -1,6 +1,10 @@
#! /bin/sh
export DISPLAY=127.0.0.1:0.0
export PATH=/usr/bin:"$PATH"
+unset XAPPLRESDIR
+unset XCMSDB
+unset XKEYSYMDB
+unset XNLSPATH
# Cleanup from last run.
rm -rf /tmp/.X11-unix
@@ -13,77 +17,8 @@
# http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-error-font-eof
-# Brief descriptions of XWin-specific options:
-#
-# -screen scr_num [width height]
-# Enable screen scr_num and optionally specify a width and
-# height for that screen.
-# Most importantly, any parameters specified before the first -screen
-# parameter apply to all screens. Any options after the first -screen
-# parameter apply only to the screen that precedes the parameter.
-# Example:
-# XWin -fullscreen -screen 0 -screen 1 -depth 8 -screen 2
-# All screens will be fullscreen, but screen 2 will be depth 8, while
-# screens 0 and 1 will be the default depth (whatever depth Windows
-# is currently running at).
-# -multiwindow
-# Start an integrated Windows-based window manager. Not to be used
-# with -rootless nor -fullscreen.
-# -rootless
-# Use a transparent root window with an external window manager
-# (such as twm). Not to be used with -multiwindow nor
-# with -fullscreen.
-# -fullscreen
-# Use a window as large as possible on the primary monitor.
-# -multiplemonitors
-# Create a root window that covers all monitors on a
-# system with multiple monitors.
-# -clipboard
-# Enable the integrated version of xwinclip. Do not use in
-# conjunction with the xwinclip program.
-# -depth bits_per_pixel
-# Specify the screen depth to run at (in bits per pixel) using a
-# DirectDraw-based engine in conjunction with the -fullscreen
-# option, ignored if the -fullscreen option is not specified.
-# By default, you will be using a DirectDraw based engine on any
-# system that supports it.
-# -unixkill
-# Trap Ctrl+Alt+Backspace as a server shutdown key combination.
-# -nounixkill
-# Disable Ctrl+Alt+Backspace as a server shutdown key combination (default).
-# Example:
-# XWin -unixkill -screen 0 -screen 1 -screen 2 -nounixkill
-# Screens 0 and 1 will allow Ctrl+Alt+Backspace, but screen 2 will not.
-# -winkill
-# Trap Alt+F4 as a server shutdown key combination (default).
-# -nowinkill
-# Disable Alt+F4 as a server shutdown key combination.
-# -scrollbars
-# Enable resizing of the server display window. Do not use in conjunction
-# with -multiwindow nor with -rootless.
-# -nodecoration
-# Draw the server root window without a title bar or border.
-# Do not use with -mutliwindow nor with -rootless.
-# -lesspointer
-# Hide the Windows mouse cursor anytime it is over any part of the
-# window, even if Cygwin/X is not the window with the focus.
-# -refresh rate_in_Hz
-# Specify a refresh rate to use when used with the -fullscreen option.
-# -trayicon
-# Enable the tray icon (default).
-# -notrayicon
-# Disable the tray icon.
-# Example:
-# XWin -notrayicon -screen 0 -screen 1 -screen 2 -trayicon
-# Screens 0 and 1 will not have tray icons, but screen 2 will.
-# -emulate3buttons [timeout]
-# Emulate 3 button mouse with an optional timeout in milliseconds.
-# -xf86config
-# Specify an XF86Config-style configuration file.
-# -keyboard
-# Specify a keyboard device from the configuration file.
+# For a descriptions of XWin-specific options, see 'man XWin'
-
#
# Startup the programs
#
Index: startxdmcp.bat
===================================================================
--- startxdmcp.bat (revision 5460)
+++ startxdmcp.bat (working copy)
@@ -29,6 +29,10 @@
SET PATH=.;%CYGWIN_ROOT%\bin;%PATH%
+SET XAPPLRESDIR=
+SET XCMSDB=
+SET XKEYSYMDB=
+SET XNLSPATH=
REM
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/