Hi,
I've been wondering what to do about the ancillary packages for X in
the cygwin distro.
X-startup-scripts:
I guess something needs to be done with this, if these scripts are the
normal way for starting the X server
Attached is patch for the xinit package, which adds the scripts
startxwin.bat, startxwin.sh, startxdmcp.bat in a rather simple-minded
way (these scripts have been updated to use the correct paths for a
modular X server)
X-startup-scripts would then become empty.
I'm not totally sure this is the right approach, though.
X-start-menu-icons:
This needs some attention as well to update the paths from /usr/X11R6/.
In a modular X world, though, it might make sense to do some refactoring
so this is a tool for adding/removing start menu icons which is used
in the specific package install/remove scripts, rather than installing
all the icons at once.
--- origsrc/xinit-1.0.7/Makefile.am 2007-09-16 21:55:39.000000000 +0100
+++ src/xinit-1.0.7/Makefile.am 2008-10-02 20:22:45.609375000 +0100
@@ -22,7 +22,7 @@
XINITDIR = $(libdir)/X11/xinit
bin_PROGRAMS = xinit
-bin_SCRIPTS = startx
+bin_SCRIPTS = startx startxwin.sh startxwin.bat startxdmcp.bat
xinit_CFLAGS = $(XINIT_CFLAGS) -DXINITDIR=\"$(XINITDIR)\"
-DBINDIR=\"$(bindir)\"
xinit_LDADD = $(XINIT_LIBS)
--- origsrc/xinit-1.0.7/startxdmcp.bat 1970-01-01 00:00:00.000000000 +0000
+++ src/xinit-1.0.7/startxdmcp.bat 2008-10-02 20:13:52.703125000 +0100
@@ -0,0 +1,98 @@
[EMAIL PROTECTED] off
+SET DISPLAY=127.0.0.1:0.0
+
+REM
+REM Change REMOTE_HOST to the IP address or hostname of your remote host,
+REM unless your remote host happens to have the address 10.0.0.1.
+REM
+
+SET REMOTE_HOST=10.0.0.1
+
+
+REM
+REM The path in the CYGWIN_ROOT environment variable assignment assume
+REM that Cygwin is installed in a directory called 'cygwin' in the root
+REM directory of the current drive. You will only need to modify
+REM CYGWIN_ROOT if you have installed Cygwin in another directory. For
+REM example, if you installed Cygwin in \foo\bar\baz\cygwin, you will need
+REM to change \cygwin to \foo\bar\baz\cygwin.
+REM
+REM This batch file will almost always be run from the same drive (and
+REM directory) as the drive that contains Cygwin/X, therefore you will
+REM not need to add a drive letter to CYGWIN_ROOT. For example, you do
+REM not need to change \cygwin to c:\cygwin if you are running this
+REM batch file from the C drive.
+REM
+
+SET CYGWIN_ROOT=\cygwin
+SET RUN=%CYGWIN_ROOT%\bin\run -p /usr/bin
+
+SET PATH=.;%CYGWIN_ROOT%\bin;%CYGWIN_ROOT%\usr\bin;%PATH%
+
+SET XAPPLRESDIR=/usr/lib/X11/app-defaults
+SET XCMSDB=/usr/lib/X11/Xcms.txt
+SET XKEYSYMDB=/usr/lib/X11/XKeysymDB
+SET XNLSPATH=/usr/lib/X11/locale
+
+
+REM
+REM Cleanup after last run.
+REM
+
+if not exist %CYGWIN_ROOT%\tmp\.X11-unix\X0 goto CLEANUP-FINISH
+attrib -s %CYGWIN_ROOT%\tmp\.X11-unix\X0
+del %CYGWIN_ROOT%\tmp\.X11-unix\X0
+
+:CLEANUP-FINISH
+if exist %CYGWIN_ROOT%\tmp\.X11-unix rmdir %CYGWIN_ROOT%\tmp\.X11-unix
+
+
+REM
+REM Startup the X Server and attempt to connect to a remote XDM server.
+REM
+REM The error "Fatal server error: could not open default font 'fixed'" is
+REM caused by using a DOS mode mount for the mount that the Cygwin/X
+REM fonts are accessed through. See the Cygwin/X FAQ for more
+REM information:
+REM http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-error-font-eof
+REM
+
+if "%OS%" == "Windows_NT" goto OS_NT
+
+REM Windows 95/98/Me
+echo startxdmcp.bat - Starting on Windows 95/98/Me
+
+goto STARTUP
+
+:OS_NT
+
+REM Windows NT/2000/XP
+echo startxdmcp.bat - Starting on Windows NT/2000/XP
+
+:STARTUP
+
+
+REM
+REM A few examples of initiating an XDMCP connection are
+REM given below. The default is to connect to a specified host
+REM with -query. The second example connects to the first
+REM responding host with -broadcast. The third example shows
+REM how to connect to the font server of a remote host.
+REM
+REM See startxwin.bat for a description of the most typical
+REM command-line parameters for XWin.exe.
+REM
+
+REM Connect to a specified machine.
+
+%RUN% XWin -query %REMOTE_HOST% -nodecoration -lesspointer
+
+
+REM Connect to the first XDM machine to respond.
+
+REM %RUN% XWin -broadcast -nodecoration -lesspointer
+
+
+REM Connect to a specified machine and a specified font server.
+
+REM %RUN% XWin -query %REMOTE_HOST% -nodecoration -lesspointer -fp
tcp/%REMOTE_HOST%:7100
--- origsrc/xinit-1.0.7/startxwin.bat 1970-01-01 00:00:00.000000000 +0000
+++ src/xinit-1.0.7/startxwin.bat 2008-10-02 20:12:24.843750000 +0100
@@ -0,0 +1,166 @@
[EMAIL PROTECTED] off
+SET DISPLAY=127.0.0.1:0.0
+
+
+REM
+REM The path in the CYGWIN_ROOT environment variable assignment assume
+REM that Cygwin is installed in a directory called 'cygwin' in the root
+REM directory of the current drive. You will only need to modify
+REM CYGWIN_ROOT if you have installed Cygwin in another directory. For
+REM example, if you installed Cygwin in \foo\bar\baz\cygwin, you will need
+REM to change \cygwin to \foo\bar\baz\cygwin.
+REM
+REM This batch file will almost always be run from the same drive (and
+REM directory) as the drive that contains Cygwin/X, therefore you will
+REM not need to add a drive letter to CYGWIN_ROOT. For example, you do
+REM not need to change \cygwin to c:\cygwin if you are running this
+REM batch file from the C drive.
+REM
+
+SET CYGWIN_ROOT=\cygwin
+SET RUN=%CYGWIN_ROOT%\bin\run -p /usr/bin
+
+SET PATH=.;%CYGWIN_ROOT%\bin;%CYGWIN_ROOT%\usr\bin;%PATH%
+
+SET XAPPLRESDIR=/usr/lib/X11/app-defaults
+SET XCMSDB=/usr/lib/X11/Xcms.txt
+SET XKEYSYMDB=/usr/lib/X11/XKeysymDB
+SET XNLSPATH=/usr/lib/X11/locale
+
+
+REM
+REM Cleanup after last run.
+REM
+
+if not exist %CYGWIN_ROOT%\tmp\.X11-unix\X0 goto CLEANUP-FINISH
+attrib -s %CYGWIN_ROOT%\tmp\.X11-unix\X0
+del %CYGWIN_ROOT%\tmp\.X11-unix\X0
+
+:CLEANUP-FINISH
+if exist %CYGWIN_ROOT%\tmp\.X11-unix rmdir %CYGWIN_ROOT%\tmp\.X11-unix
+
+
+REM
+REM The error "Fatal server error: could not open default font 'fixed'" is
+REM caused by using a DOS mode mount for the mount that the Cygwin/X
+REM fonts are accessed through. See the Cygwin/X FAQ for more
+REM information:
+REM http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-error-font-eof
+REM
+
+if "%OS%" == "Windows_NT" goto OS_NT
+
+REM Windows 95/98/Me
+echo startxwin.bat - Starting on Windows 95/98/Me
+
+goto STARTUP
+
+:OS_NT
+
+REM Windows NT/2000/XP/2003
+echo startxwin.bat - Starting on Windows NT/2000/XP/2003
+
+: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
+REM Startup the programs
+REM
+
+
+REM Startup the X Server with the integrated Windows-based window manager.
+REM WARNING: Do not use 'xwinclip' in conjunction with the ``-clipboard''
+REM command-line parameter for XWin. Doing so would start two clipboard
+REM managers, which is never supposed to happen.
+
+%RUN% XWin -multiwindow -clipboard -silent-dup-error
+
+
+REM Startup an xterm, using bash as the shell.
+
+%RUN% xterm -e /usr/bin/bash -l
+
+
+REM
+REM Startup the twm window manager.
+REM WARNING: Do not use an external window manager in conjunction with
+REM the ``-multiwindow'' command-line parameter for XWin. Doing so
+REM would start two window managers, which is never supposed to happen.
+REM
+
+REM %RUN% twm
+
+
+REM Set a background color. Only needed when not using -multwindow for XWin.
+
+REM %RUN% xsetroot -solid aquamarine4
--- origsrc/xinit-1.0.7/startxwin.sh 1970-01-01 00:00:00.000000000 +0000
+++ src/xinit-1.0.7/startxwin.sh 2008-10-02 20:13:06.906250000 +0100
@@ -0,0 +1,125 @@
+#! /bin/sh
+export DISPLAY=127.0.0.1:0.0
+export PATH=/usr/bin:"$PATH"
+export XAPPLRESDIR=/usr/lib/X11/app-defaults
+export XCMSDB=/usr/lib/X11/Xcms.txt
+export XKEYSYMDB=/usr/lib/X11/XKeysymDB
+export XNLSPATH=/usr/lib/X11/locale
+
+# Cleanup from last run.
+rm -rf /tmp/.X11-unix
+
+
+# The error "Fatal server error: could not open default font 'fixed'" is
+# caused by using a DOS mode mount for the mount that the Cygwin/X
+# fonts are accessed through. See the Cygwin/X FAQ for more
+# information:
+# 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.
+
+
+#
+# Startup the programs
+#
+
+
+# Startup the X Server with the integrated Windows-based window manager.
+# WARNING: Do not use 'xwinclip' in conjunction with the ``-clipboard''
+# command-line parameter for XWin. Doing so would start two clipboard
+# managers, which is never supposed to happen.
+
+XWin -multiwindow -clipboard -silent-dup-error &
+
+
+# Startup an xterm, using bash as the shell.
+
+xterm -e /usr/bin/bash -l &
+
+
+#
+# Startup the twm window manager.
+# WARNING: Do not use an external window manager in conjunction with
+# the ``-multiwindow'' command-line parameter for XWin. Doing so
+# would start two window managers, which is never supposed to happen.
+#
+
+# twm &
+
+
+# Set a background color. Only needed when not using -multwindow for XWin.
+
+# xsetroot -solid aquamarine4
+
+
+# Return from sh.
+exit
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Cygwin-ports-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cygwin-ports-general