Re: I lose characters because keycode of Fn is same than DEL

2011-07-01 Thread Phil Betts
On 30 June 2011 17:51, Jon TURNEY jon.tur...@dronecode.org.uk wrote:
 I've fixed the mapping for this (undocumented) virtual key code, so hopefully
 this works correctly now. I've uploaded a snapshot at [1]

 I can't test this as the keyboards I have with an Fn key don't generate a
 separate keypress for that, apparently Lenovo laptops are special in this
 regard :-), so please let me know if this works.

 [1] ftp://cygwin.com/pub/cygwinx/XWin.20110630-git-e89b8ba1b44331d1.exe.bz2

Thanks Jon, that works a treat.

The new output for the Fn key is:
[ 89311.789] winTranslateKey: wParam 00ff lParam 01630001
[ 89311.789] winSendKeyEvent: dwKey: 85, fDown: 1, nEvents 2
[ 89311.789] winTranslateKey: wParam 00ff lParam c1630001
[ 89311.789] winSendKeyEvent: dwKey: 85, fDown: 0, nEvents 2

The corresponding output in xev is now:

KeyPress event, serial 27, synthetic NO, window 0x41,
root 0x101, subw 0x0, time 89443079, (86,83), root:(202,215),
state 0x0, keycode 93 (keysym 0xff7e, Mode_switch), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0x41,
root 0x101, subw 0x0, time 89443079, (86,83), root:(202,215),
state 0x0, keycode 93 (keysym 0xff7e, Mode_switch), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

Phil

--
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/



Re: Changing interactive shell from Bash to Zsh

2010-02-09 Thread Phil Betts
Anonymous bin ich writes:

 
 Hi!
 
 I am having trouble changing my shell from Bash to Zsh.
 
 Since there is no chsh, I have tried adding exec zsh -l to .bashrc
 
 Unfortunately, since cygwin is started as interactive login shell,
 it doesn't read .bashrc and so it starts as bash
 
 If I source .bashrc from .bash_profile (which I don't like), then it works.
 
 But then I cannot start X server from the start menu shortcut because
 bash reads .bashrc, executes zsh and exits; even though startxwin.exe
 is called by bash -l.
 
 So, is there a way to change shell?
 

All chsh does is edit the last field in /etc/passwd.  You can do this
yourself in any text editor (assuming you've got write access).  Just change
/bin/bash to /bin/zsh and you should be OK.

Don't even think about hacking .bashrc, .bash_profile or .profile.  If you
do, then anything that tries to run bash will end up running zsh, and will
probably fail. (This would include all post-install scripts run by setup.exe,
so you'd probably end up with a hosed system)

BTW, this is the wrong list for this topic; it has nothing to do with X.

Phil



--
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/



RE: [ANNOUNCEMENT] [1.7] Updated: xinit-1.1.1-5

2009-10-01 Thread Phil Betts
Charles Wilson wrote:
 Angelo Graziosi wrote:
 
 In 'startxwin.bat' I see:

 %RUN% bash -l -c XWin -multiwindow -clipboard -silent-dup-error

 Shouldn't it be

 %RUN% bash -l -c XWin -multiwindow -clipboard -silent-dup-error  ?
 
 No, run implicitly puts the target in the background, unless you add
 the '-w' (wait) option.

I think Angelo was trying to avoid having an unnecessary bash process
hanging around.  Bash is only used to prepare the environment, so why
not do it like this instead:

%RUN% bash -l -c exec XWin -multiwindow -clipboard -silent-dup-error

i.e. the bash process is replaced by XWin rather than spawning a new
process, putting it in the background, then exiting.  Under *IX, this 
is usually more efficient than Angelo's method, but I don't know if 
this is true under cygwin, given the complexity of getting exec/fork 
etc. to work under Windows.

Phil
-- 


This email has been scanned by Ascribe Ltd using Microsoft Antigen for Exchange.

--
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/



RE: Cut Paste problem between X windows

2009-09-15 Thread Phil Betts
Steve Wallace wrote, 
 I am using the logitech setpoint utility within XP with the default
 settings, although these were also used on the previous setup.

In setpoint (assuming it's similar to the version I have), there's a 
tab with 1. Select Mouse, 2. Select Button, and 3.Select Task

Select your mouse model in 1, click on the middle button in 2, and 
in 3, you need to select Other.  Then click on Select Functions.  
You should see a number of options.  Select Middle Mouse and you 
should be in business.

HTH,

Phil
-- 


This email has been scanned by Ascribe Ltd using Microsoft Antigen for Exchange.

--
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/



RE: Problems starting rxvt from startxwin.bat

2009-09-01 Thread Phil Betts
Jose Luis wrote:
 I can start xterm from startxwin.bat:
 
 %RUN% xterm -e /usr/bin/bash -l
 
 but no rxvt:
 
 %RUN% rxvt -bg white -fg black -e /bin/bash
 
 although it can be started from command line:
 
  jlfd...@jlfdiazwxp ~
  $ rxvt -bg white -fg black -e /bin/bash  
 
 
 Why does rvxt starting from startxwin.bat fail?

This is almost certainly a timing issue.  The line in the batch file
that starts the server uses %RUN% to start it in the background.  This
means that the following commands in the batch file may execute before
the X server has completed (or even started) its initialisation.

I suspect that the reason the two terminals behave differently is
that, xterm tries to connect to the server a number of times before
giving up, whereas rxvt gives up at the first failure.

Because the time taken to initialise the X server can vary, rather
than using just sleep, I have added the following:

REM wait up to 30 seconds for the X server
set /a COUNT=0
:WAITFORX
  checkx -d %DISPLAY%
  if not errorlevel 1 goto FINISHOFF
  set /a COUNT+=1
  if %COUNT% GEQ 30 goto NOX
  echo Waiting for X on display %DISPLAY% ...
  sleep 1
goto WAITFORX

:NOX
echo WARNING: X doesn't appear to have started
exit /B 1

:FINISHOFF


Jon/Yaakov, could this be added to the distributed startxwin.bat?
Perhaps the warning could be extended to include instructions to
check the log.

Phil
-- 


This email has been scanned by Ascribe Ltd using Microsoft Antigen for Exchange.

--
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/



RE: Why is remote client being rejected? AUDIT: XWin: client 4 rejected from IP 192.168.3.3

2009-07-20 Thread Phil Betts
Linda Walsh wrote:
 Yeah, know about that one:
   (xosview)
 saves it from the HUP's when the window closes...

No need for that (which adds an unnecessary extra fork), just unset
the bash option huponexit (probably in your ~/.bashrc):

shopt -u huponexit

Although I think that's the default setting now.


Phil
-- 

This email has been scanned by Ascribe Ltd using Microsoft Antigen for Exchange.


RE: Mouse chording question

2009-07-02 Thread Phil Betts
Peter Scott wrote:
 Hello.  I would like to migrate from eXceed to Cygwin for the
 performance improvement, but there is a feature I currently have that
 I have not figured out in Cygwin yet. I want MB1+MB3 to generate
 paste (as in MB2).

You need the -emulate3buttons option for XWin (exactly how you set it 
depends on how you start XWin)

Phil
-- 


This email has been scanned by Ascribe Ltd using Microsoft Antigen for Exchange.

--
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/



RE: cygwin Xserver issues

2009-06-07 Thread Phil Betts
samitj wrote:
 I keep getting this error:
 sj...@dksjdksj~
 $ startx
 xauth: creating new authority file /cygdrive/c/Documents and
 Settings/samitj/.se
 rverauth.8172
 
 giving up.
 xinit: Connection refused (errno 111): unable to connect to X server
 xinit: No such process (errno 3): Server error.

This suggests that the server probably failed to start.  Look in the 
server log file /var/log/XWin.0.log, which should give you more of a
clue.

You should also look into changing your $HOME so that it doesn't have 
spaces.  This might not be the problem here, but spaces in paths are 
a dumb idea and you're just increasing the risk of problems.

The easiest way to do this without actually moving its location is to 
mount C:/Documents and Settings as /home, i.e.:
  mount -f -s -b C:/Documents and Settings /home
then set your home directory in /etc/passwd to /home/samitj

Note however that users have reported problems with permissions on
Windows7 when their home directory is the same as the Windows profile
directory, so you may just want to avoid Documents and Settings
completely so that you avoid problems in the long run.

 I just upgraded my cygwin installation of X-server and I am doomed.
 Nothing is working. I am unable to start xserver. Sometimes it 
 starts and crashes immediately. It does not start in multiple windows
 as it used it in the previous version. I'm also not able to copy 
 paste between windows and unix applications.
 
 Please advise. I just want to type 'startx' and it should work as
 before.

All that has happened is that the default server arguments have 
changed.  Removing the cygwin-specific default options makes startx 
the same as on other platforms.

You have 3 options:
a) run startx -- -clipboard -multiwindow to get the old behaviour.
b) edit the startx script instead, setting defaultserverargs=
   -multiwindow -clipboard, but your changes would be lost each 
   time you updated.
c) Use startxwin.bat.  That is the best supported method of starting 
   XWin, and works the way startx used to.

You should also read the FAQ, because a lot has changed between
X11R6 and X11R7:  http://x.cygwin.com/docs/faq/

[I note that there is no mention of the change to startx's default
server arguments in the FAQ.  This isn't the first time that this
has been raised, so perhaps it should be added to the FAQ]

 I have tried numerous re-installations (about 20) but nothing is
 working..

It's been said that one of the signs of madness is continually 
repeating an action and expecting a different result ;-)  What made 
you think that things would work out any better the 20th time?  OK, 
so this is Windows, where the 3rd or 4th time sometimes *does* 
produce a different result, but 20 times!

For future reference, the way you should have gone about this is:

1) Read the update announcements so you don't get any nasty shocks:
http://cygwin.com/ml/cygwin-xfree-announce/  The major announcement
for the initial X11R7 release is here:
http://cygwin.com/ml/cygwin-xfree-announce/2008-11/msg0.html
This is linked to in the first paragraph on the Cygwin X front page:
http://x.cygwin.com/

2) Update, following any instructions in the announcements

3) If you have problems, read the documentation:
http://x.cygwin.com/docs/

4) If you can't find your answer there, search the mailing list
archives:  http://cygwin.com/ml/cygwin-xfree/

5) If you're *still* stuck, post your problem here, following the 
instructions here:  http://cygwin.com/problems.html
In addition, for X related problems, you should also attach your
/var/log/XWin.0.log

When it comes to software, the thing to remember is if at first
you don't succeed, read the documentation, not try, try and try
again.

Phil
-- 


This email has been scanned by Ascribe Ltd using Microsoft Antigen for Exchange.

--
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/



RE: drop-down menu with multiwindow option doesn't work

2009-04-02 Thread Phil Betts
Raphaël Langella wrote:
 Hi,
 I'm using Tecplot 360, a proprietary program written with a Motif
 toolkit. It runs on a Linux server and the display is a win2k PC
 with cygwin X Server 1.5.3. The problem only happens with the
 multiwindow option.
   The problem is with the drop-down menu. When I click it, it
 seems the menu appears behind the window and immediately disappear.
 I made a screenshot of it but didn't attached it because I'm not
 sure about the file attachment policy of the mailing list. There's
 a grey rectangle that briefly appears under the window. It's plain
 grey, with no text in it.
   I understand that the problem is probably related to the
 Windows wm, since it doesn't show up without the multiwindow
 option, but I was wondering if it's a known bug. Or maybe it's
 win2k specific?
   I've got a workaround: rootless option and any Unix wm, but I'd
 like to understand what is causing this problem.
 Thanks for your attention.
 
 Raphaël Langella

I was waiting to see if you got a reply from someone else, as I
don't really have a solution for you.  However, Windows seems to 
have real difficulties with Z-ordering: MS Word opens a new 
document beneath an existing one, modal dialogs often open below 
the parent window (which is a real PITA because you can't move the 
parent!), always-on-top widgets are often hidden below something 
else, and desktop widgets obscure application windows. (Only MS 
has the resources to screw up such a simple concept so 
comprehensively!)

Having said that, I use emacs on X every day, and I can't remember
its menus ever appearing below the main window (except perhaps a 
very early version of XWin.  The emacs version I run was compiled 
to use the X toolkit.  I would guess that when Motif creates the 
window for the menu, it's not setting a hint which multiwindow mode 
requires in order to force the correct Z-order.  It might be worth
checking what the difference is between Xt menu creation and Motif
menu creation.

If that's the case, it's not clear where the blame lies.  It might
be that Motif just happens to work on UNIX based servers, and XWin
just exposes a long-standing bug.  Conversely, it may be that XWin
is misinterpreting the hints that Motif sets up, and doesn't set up
the Windows' window with the correct flags.

Perhaps Yaakov or Jon could shed more light on this?

In the meantime, I think you've already found the best workaround.

I suspect the reason the menu window disappears is because your
mouse is still in the parent window, and gives it the focus, so 
Motif thinks you've moved off the menu and closes it.

Phil
-- 


This email has been scanned by Ascribe Ltd using Microsoft Antigen for Exchange.

--
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/



RE: XWin wrong fonts after update

2009-04-01 Thread Phil Betts
catia.lava...@xxx.xxx wrote:
 I've been using since ages cygwin and XWin (XWin :0 -clipboard
 -multiwindow) on a Win XP Prof 32bit and I had no problems at all.
Last
 update of cygwin I did was some month ago (I do not know exactly
when).
 Yesterday afternoon I did again an update (like I always did without
 looking at he home page of cygwin) and I have realized that the X.org
 was updated.

You can always tell which packages are going to be updated by clicking
the View button in setup.exe until the label next to it reads Partial.
In fact, I wouldn't recommend updating without first checking that
list.

You should then read the announcements for the packages about to be 
updated so that you're not surprised by any changes.  The X update was 
a VERY large one and came with quite a detailed announcement.

 The problem is since then a graphical application which is ssh
tunneled
 from a remote linux machine, which was working until the update, now
is
 showing up with horrible (almost not readable) text fonts (Is there a
 way
 to attach a screenshot?).

There's no point.  Anyone subscribed to this list will already know
what your problem is.

 I have tried to do a new installation of cygwin on another machine. On
 the
 fresh installed machine the same application exports fine with the
 correct
 fonts.
 
 This means that the update is the problem.

No.  The problem is that you didn't do your research before updating,
and once you had the problem, you don't appear to have tried to find
out the answer before posting your question.

Please look in the announcements archive at
  http://cygwin.com/ml/cygwin-xfree-announce/
You should then check the FAQ here
  http://cygwin.com/ml/cygwin-xfree-announce/
and the user guide here
  http://x.cygwin.com/docs/ug/

If you're still not sure what your problem is, before posting again
please search the archives of this mailing list at
  http://cygwin.com/ml/cygwin-xfree/
where the topic has been discussed MANY times.

Phil
This email has been scanned by Ascribe Ltd using Microsoft Antigen for Exchange.

--
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/



RE: 'no acceptable C compiler found in $PATH' error message on install

2009-04-01 Thread Phil Betts
Jaroslav Rynik wrote:
 when I wanted to install, the program with cygwin (using package for
 NetBSD), the error message no acceptable C compiler found in $PATH
 came up.

This list is for X related questions only, setting the follow-up address
to the main cygwin list.

 However, I have installed cygwin directly from web not unsellecting any
 option, so the instalation should be complete.  The program is
 installed in D:\pokus\cygwin directory.

Only a limited set of packages is installed by default.  You have to
manually select the compiler(s) and other development tools.  Just re-run 
setup.exe and select the appropriate gcc packages.

 To keep track all the steps I made, I send the picture of 3 screenshot
 showing all I have done until the error message appeared. I also attach
 the log file made by cygwin after the action.
 
 If you need any further information, feel welcome to let me know.
 

It would have been better if you had followed the instructions in this
link:

 Problem reports:   http://cygwin.com/problems.html

In particular, note the part about *attaching* the output from running
cygcheck -svr.  That would let us know which packages were actually 
installed.

If re-running setup doesn't solve your problem, then that attachment
would be very useful.

Phil

This email has been scanned by Ascribe Ltd using Microsoft Antigen for Exchange.


RE: XWin wrong fonts after update

2009-04-01 Thread Phil Betts
catia.lava...@xxx.xxx wrote:
 I know I can always tell which packages are to be updated, what 
 if I do not what to?

You click on the second column until it says Keep.  The interface 
could be more user friendly, but it does the job.  I've not updated 
this PC to X11R7 because I need a server with accelerated GL.  That 
hasn't stopped me from updating the rest of my cygwin packages.

The rest of your response was just a pointless and unwarranted rant.
Just follow the links I gave you, do what they tell you, and if 
you've still got a problem, we can start dealing with it.

 Even if I accept (which I do not really) that I was not enough careful
 in applying the update what should I do now: kill myself?

Erm... only if you really, really want to, and it has to be your own
decision.

 p.s. I did googled and I did look in the previous threads and I did
 not find any answer to my question, that's why am am asking.

I just googled too, for fonts site:x.cygwin.com, and the first
result was the cygwin X FAQ that I previously listed.  The section on
updates includes what is almost certainly the answer to your problem.

If your problem genuinely is not covered by any of the links I gave 
you, then by all means post a follow-up, but in that case, you should 
tell us exactly what you *have* tried to resolve it, and why your 
problem isn't covered by the existing documentation.  If you don't
include that information, then we can only assume that the existing
answers are good enough, but that you've not read or tried them.

If you don't understand the documentation, then that is an equally 
valid point to raise.  I assume from your email that you are not a 
native English speaker, and so it's possible that the language could be
made simpler for you.  If this is the case for you, then you should 
say which parts need clarifying.

Remember, this is free software, written, maintained and supported by 
unpaid volunteers.  Nobody owes you anything.


Phil
This email has been scanned by Ascribe Ltd using Microsoft Antigen for Exchange.

--
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/



RE: Re: Is there any way to make the key combination Ctrl+Space work under cygwin-XServer?

2009-03-30 Thread Phil Betts
SUN, Jian wrote:
 I am very sorry because I made a mistake. It's actually the key
 combination Alt-Space that does not work on my computer I want
 to use it to active the x-window's menu and then I cam press x to
 maximize the window. Alt-space does not work under cygwin xserver
 but works under Exceed's xserver. Is there anyway to enable it under
 cygwin xserver?

Alt-space is used by emacs at least, so any X server that intercepts 
that keystroke is breaking emacs.  For the record, ctrl-space is also 
used by emacs.  Both keys work as expected (i.e. emacs sees them).

I rejected Exceed's server because they seemed to be more concerned
with making it Windows-user friendly than a good (i.e. standard) X 
server.  You shouldn't have to change the way you work with X apps
depending on which OS you're connecting from.

X is by no means the only application that doesn't support alt-space
as a shortcut for the window menu.  Any terminal emulator will also 
pass that key combination to the client application as well (if it 
didn't, it would be broken).

Phil

This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.


RE: Re: Is there any way to make the key combination Ctrl+Space work under cygwin-XServer?

2009-03-30 Thread Phil Betts
SUN, Jian wrote:
 Thanks a lot, do you mean that Exceed breaks X convenience and catches
 the key sequences?

It's a few years since I tried Exceed's server, but IIRC that was one
of the problems I had.  I had to tailor my .emacs to remap keys, but
because I only used Exceed at work, I got sick of trying to remember
which server I was using, and therefore which keystroke I could use,
and ditched Exceed as soon as XWin became stable enough.

 So the standard XFree server's behavior is to pass the key sequence to
 the x applications and let them to decide what to do. Am i right?

Yes

 If so, how can I configure xterm or gnome-terminal to let them
 response to the ALt-Space key combination? I like this feature very
 much and it's also the default behavior of Gnome.

The problem is that (in multiwindow mode), the window menu is a 
_Windows_ menu; it's not an X window menu.  I don't believe there is a
way to activate that from within an X application.  However, you can
use translations in your ~/.Xdefaults to map keystrokes to minimize/
maximize/restore.  man xterm, and search for translations and 
ACTIONS.  I'd advise against using alt-space (it's also used by 
readline, and therefore by bash, as well as emacs).  I would suggest
using the context menu key (usually next to Alt Gr), which, as a 
fairly recent addition to keyboards is unlikely to be used by console 
apps.  E.g. something like this should work:

XTerm*VT100.Translations: #override \n\
KeyPressMenu:maximize() \n\
CtrlKeyPressMenu:restore() \n\
ShiftKeyPressMenu:iconify() \n\
MetaKeyPressMenu:deiconify()

I've not tested this, and it's several years since I needed to define
any translations, so if you don't understand how translations work,
you should read the documentation before trying this.

The same technique should work with any Xt based X application.

 Thanks a lot,
 SUN, Jian  (Jason)
 On Mon, Mar 30, 2009 at 5:41 PM, Phil Betts phil.be...@xxx.xxx

Please don't quote raw email addresses in your replies.  They appear in
the archives on the web, and are therefore available to be harvested by
spammers.

Phil
This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.


RE: Re: Is there any way to make the key combination Ctrl+Space work under cygwin-XServer?

2009-03-30 Thread Phil Betts
SUN, Jian wrote:
 I think I may turn to xtermcontrol and use commands to resize the
 windows instead of key combinations.
 xtermcontrol --maximize
 xtermcontrol --restore

If you're content to only have this available from the command line,
you could assign the xtermcontrol commands to shortcut keys in your
~/.bashrc.  E.g. to bind F1 to maximize and F2 to restore:

bind '\eOP:'$'\201'; bind -x $'\201:xtermcontrol --maximize'
bind '\eOQ:'$'\202'; bind -x $'\202:xtermcontrol --restore'

You can't bind a shell command to a key that doesn't already feature 
in readline's map, so you have to translate the key (\eOP) into a 
non-existent key (\201) that is in its map, then bind the non-
existent key to the command.

 Thanks a lot for your help. I really appreciate it.

No problem, glad to be of assistance,

Phil

This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.


RE: -query not working on cygwin/windows

2009-02-24 Thread Phil Betts
km4hr wrote:
 Phil Betts-2 wrote:

 km4hr wrote:

 Perhaps you missed my suggestions here:
 http://cygwin.com/ml/cygwin-xfree/2009-02/msg00222.html

 Try the telnet check first to see if the port is accessible from
 Windows
 because that only takes a few seconds.  (Make sure you run the cygwin
 telnet.exe)

 Phil,

 Thanks for hanging in there.

 I tried your telnet suggestion. I get the following:

 $telnet xxx.xxx.xxx.xxx 6000
 trying xxx.xxx.xxx.xxx...
 Connected to xxx.xxx.xxx.xxx.
 Escape character is '^]'.

 The above is all I get. A login prompt never appears. I waited for
 several minutes.

 When I press Ctrl-c I get:
 Connection closed by foreign host.

 If I telnet using an unopen port I the response gets past the
 trying
 statement.


Your quoting went a bit wrong there.

Sorry, I should have explained that that was the expected outcome.  If
you get the Connected to message, the port is open and you can close
the connection.  The proper way to terminated a telnet session from that
situation is to press Ctrl-] (the Escape character mentioned in the
message).  You then get a telnet prompt, where you just type quit.

You wouldn't normally expect a prompt (unless the port was 23 - telnet's
own).  In theory, if you knew enough about the protocol expected on the
opened port, you could simulate a normal connection and debug the
connection using telnet, but you have to have a certain masochistic
streak to try it!

So, now we know that the port is accessible from Windows.  In that case,
it *should* work, so something else is interfering.

Have you investigated the BLODA angle?  Prime suspects are anti-virus
and
other security software, but hardware drivers have caused problems
too.
These programs inject themselves into every running process at a fairly
low level and, whilst they are mostly benign, can cause nasty, spurious
problems, particularly when the code you are trying to run is slightly
off the beaten track.  X and XCMCP probably falls into that category for
Windows machines.

The usual advice is to uninstall these, rather than just disable them.
The faulty components are frequently left in place when disabled.
Once
you have ruled out a candidate, you can reinstall it.  If you do find
one
that is causing the problem, it may be possible to configure it in a way
which avoids the problem (e.g. disabling real-time virus scanning).

You can often spot BLODA by running the program which is failing, and
then seeing which DLLs are loaded using something like Process Explorer.
Any unexpected DLLs, particularly if not under C:\Windows or C:\cygwin
are prime suspects.  In your case, because the -query option is failing,
you won't get chance to see the DLLs before X terminates, so you could
just start a normal server (e.g. via startxwin.bat) instead.

You may find that an app that is not on the BLODA is causing the
problem.
If so, a message to the main cygwin list would be appreciated so that
the
BLODA can be updated.

If the BLODA hunt fails, you could try running the server via strace so
that the point of failure might be spotted, but I'm not familiar with
the
source.  Yaakov or Jon would probably be better at making sense of that.

Phil
-- 


This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: -query not working on cygwin/windows

2009-02-23 Thread Phil Betts
km4hr wrote:
 Well, I have now turned on all relevant ports in the Windows firewall.
 I still can't connnect.
 I turned on port 177(UDP) and 6000-6006(TCP).  I even turned on extra
 ports as recommend by

http://www.starnet.com/xwin32kb/What_ports_need_to_be_opened_for_XDMCP/
 this source.
 
 I'm about out of ideas. I love to hear some more.

Perhaps you missed my suggestions here:
http://cygwin.com/ml/cygwin-xfree/2009-02/msg00222.html

Try the telnet check first to see if the port is accessible from Windows
because that only takes a few seconds.  (Make sure you run the cygwin
telnet.exe)

 I don't know how firewalls work but on the linux host side (CentOS)
 simplyturning off the firewall did not open the ports. I had to turn
 the firewall on and specify which ports to open. Otherwise no
computers
 could connect via xdmcp over the network.

I've not used CentOS, but other distros I've used start with a default
set of firewall rules that just block all externally initiated
connections.  Turning off the firewall actually leaves those rules in
force.  Turning on the firewall enables more complex rules.  If they
didn't do this, then you'd be wide open to attack before you'd
configured
the system.  You can disable the firewall completely, but I think it
would be irresponsible to post how here.  If you must, man iptables is
your friend.

Phil
-- 


This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: X.org 7.4 dying under Geomview

2009-02-23 Thread Phil Betts
Lloyd Wood wrote:
 Some improvement is seen in full desktop mode, where geomview doesn't
 crash, and can be used (modulo missing hardware acceleration.)

Since you keep mentioning hardware acceleration at every available
opportunity (it's getting a bit tiresome now), I thought I should point
out that the XWin_GL server was only ever released as an experimental
package.  It is therefore NOT a regression to have no hardware
acceleration in the current release.  Yaakov's announcement for the
first
X11R7 release specifically said there was no hardware acceleration yet,
so you can't claim that you weren't warned.

The experimental version was one of the last things released by the
maintainer at the time, so no further work was done on it to bring it
into the main branch.

If acceleration matters so much to you, I'm sure Yaakov and Jon would
welcome patches to enable it ;-)

The source for the experimental version isn't available via setup.exe,
and I haven't been able to locate the source elsewhere.  Since the
original package is still available (even if obsolete), I thought that
the GPL insisted that the source was similarly available.  I would like
to take a diff of the two X11R6 server packages, with a view to merging
the changes into the current, much changed, source, but without access
to
the source for both accelerated and unaccelerated, this is impossible.

Does anyone know where one might find the source package for 
xorg-x11-xwin-gl-6.8.99.901-1?  I've tried the Cygwin Time Machine, but
it appears to be down.

Phil
-- 



This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: Reproducing the cygwin X problems

2009-02-23 Thread Phil Betts
Dan Tsafrir wrote:
 I confirm this exact behavior.
 
 This is exactly the problem I'm experiencing in terms of copy-paste on
 my XP machine. Specifically, if the vncviewer (TightVNC) is open, and
 I select a text in a cygwin xterm or emacs, then copy-paste /
 cut-and-paste completely stops functioning on my machine.

This doesn't fix the problem, but in the meantime you might find the
following makes emacs more usable (and quicker too).  I use it because
emacs was almost unusable over a slow VPN connection, but it should also
help in this situation too.

It prevents normal selections in emacs from synchronizing with the X
clipboard.  Cut/copy/paste within emacs itself works as normal, but much
quicker.  If you do need to copy from emacs to another app, just use 
S-delete instead of M-w.  To paste from another app into emacs, use 
S-insert instead of C-y.  It's a bit inconvenient, but I soon got used
to
it.

Just add the following code to your .emacs

--- snip ---
 
;;;
  ;; Code to prevent emacs synchronizing the clipboard with X for every
  ;; cut  paste operation.  This is what slows down emacs most on slow
  ;; connections.
  ;; Originally obtained from:
  ;;   http://snarfed.org/space/Emacs%20and%20remote%20X%20Windows
  ;; but changed the keystrokes to avoid messing up use of escape as
meta
  (setq interprogram-cut-function nil)
  (setq interprogram-paste-function nil)

  (global-set-key [S-delete]
  (lambda ()
(interactive)
(eval-expression
 '(setq interprogram-cut-function
'x-select-text))
(kill-ring-save (region-beginning) (region-end))
(eval-expression
 '(setq interprogram-cut-function nil

  (global-set-key [S-insert]
  (lambda ()
(interactive)
(eval-expression
 '(setq interprogram-paste-function
'x-cut-buffer-or-selection-value))
(yank)
(eval-expression
 '(setq interprogram-paste-function nil
 
;;;
--- snip ---

Phil
-- 


This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: -query not working on cygwin/windows

2009-02-20 Thread Phil Betts
km4hr wrote:
 This is a update including further information regarding my quest to
 get cygwin/x to connect to my CentOS linux server via xdmcp.
 
 I believe I have isolated the problem to either cygwin/x or Windows,
 probably Windows because no X-server that I've tried works. I've tried
 cygwin/x, Xming, and X-Win32. I've isolated the problem by booting my
 Windows PC from a Linux LiveCD (pclos). Using the pclos X-server I
 successfully connected to my CentOS host using X :1 -query centos
 box .
 It works perfectly. A beautiful gdm login screen pops up immediately.
I
 think this proves that xdmcp is configured correctly on the CentOS
host
 and that my network is not contributing to the problem.

OK.  So the problem seems to be that X cannot communicate with the
remote
host.  Do you have another host you could connect to, and if so do you
have the same problem?  You could try telnet remotehost 6000.  If you
can connect, then the X port (6000) is open, and the problem is protocol
related.  If you get connection refused, then the port is closed.

 The above successful connection seems to isolate the problem to either
 cygwin/x, Windows, or the combination of both. Although no one on this
 site has confirmed that they are actually using cygwin/x successfully 
 in an xdmcp environment I'm assuming that it does work for somebody.

I have used it successfully, but that was a few years ago.

 If that assumption is correct then it appears something in my Windows
 configuration is blocking cygwin/x, and the other X-servers, from
 working properly. Could it be that necessary ports on my Windows box
 are blocked? I have my Windows firewall turned off. But I'm not sure
 that disabling the firewall opens the ports. Do I even need to open
 certain ports on the Windows box? This is an area that I know
virtually
 nothing about.

Do you have any other security software installed?  Perhaps you have
http://cygwin.com/acronyms/#BLODA  These are applications/drivers (often
apparently nothing to do with the problem, e.g. Logitech Webcam), that
inject their code into each process and cause all sorts of weird
problems.

 Phil, you had several questions. One was, why do you want to use
 xdmcp?. I want to use xdmcp for the same reason anyone wants to use
it
 and for the same reason that it exists. That is, I want to log in to a
 complete gnome environment. I don't want to run individual
 applications.

That's fine.  I only asked because there have been several queries over
the years from people who did just want to display individual apps and
thought XDMCP was the way to go because it showed up first in a web
search.

 You suggested I contact someone who is familiar with my Linux
 distribution to make sure I have xdmcp set up correctly. I have
already
 done that. I am asking many of the same questions on the CentOS forum
 that I'm asking here. You gave me several links to study. I've read
 those and more. I've been at this for days.

That's good (the researching, not the outcome ;-).  As with any fault
finding, a lot of time can be saved if we know what has already been
read/tried.

 You asked why I'm blaming cygwin. I don't know what I said that
 made you think that.

It was partly your other thread about the -ac option which suggested
that
you though XWin was denying the access.

 I'm not blaming anybody or anything. I'm just trying to get a gdm
login
 screen on my PC.

I understand.  Perhaps blaming was too loaded a word to use.

 My problem may be related to Windows security.
 Can you suggest a good forum where I can find an expert on that? I
 don't know any Windows experts personally. I'm not sure they exist.

They do exist, but they come at a price.  Most of the self-professed
experts I see on the web are pretty poor.

I think investigating the BLODA avenue is perhaps your best course of
action for now.  It's amazing how many of the seemingly intractable
problems turn out to be caused by some dodgy app.

Phil
-- 


This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: -query not working on cygwin/windows

2009-02-19 Thread Phil Betts
km4hr wrote:
 This is an update on my hard-fought attempt to get -query access to
a
 linux
 xdmcp server running CentOS 5 from my Windows PC running cygwin-x.
 
 I installed X-Win32 (a commercial X-server) on my Windows PC. Unlike
 cygwin-x and Xming the X-Win32 server does detect available xdmcp
hosts
 when
 I use the -broadcast switch. But I can only get a login prompt one
of
 them, an HPUX host. My linux box is in the broadcast list but X-Win32
 won't
 connect to it. No reason or error message is given. I may go ahead and
 purchase a copy X-Win32 just so I can get their tech support people
 involved.
 
 Anyway, my question is, why won't cygwin-x bring up the same -
 broadcast
 list as X-Win32?
 
 Any suggestions are greatly appreciated.

The XWin -broadcast option connects to the first XDM machine to 
respond.  I can only assume that your Linux box responded first, but 
denied access for the same reason that -query fails.

I think you are looking in the wrong place for the answer.  Your mail 
about the -ac option also suggests you are blaming XWin.  It is the 
Linux box which is denying you access, and you need to look on that 
box for the answer.

Try looking in the logs on your Linux box as Jon suggested.  Reading 
the man pages for your distro will tell you where the logs are.  Try 
man xdm and man xauth, for a start.  You are also likely to get 
less speculative answers by asking on the forum specific to your 
Linux distribution.

Perhaps it would be better if you told us what you are trying to 
achieve rather than what you are attempting in order to achieve it.  
In other words, you have told us that you can't connect using -query, 
rather than WHY you are trying to connect using XDMCP.  If you are 
simply trying to get Linux apps to display on your Windows box, then 
you are probably better off using the ssh -Y method rather than
XDMCP.

If you haven't done so already, the FAQ should give you some useful
pointers, particularly sections 6  7:
  http://x.cygwin.com/docs/faq/cygwin-x-faq.html
Also try:
  http://en.tldp.org/HOWTO/XDMCP-HOWTO/
  http://www.xs4all.nl/~zweije/xauth.html


Phil
-- 

This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: Reproducing the cygwin X problems

2009-02-19 Thread Phil Betts
Mike Ayers wrote:
   Today I noticed a new problem, which may or may not be related:
 
 [SNIP]
 mike-ayers-lap ssh -Y -l mayers mikeayers-linux-2
 Warning: No xauth data; using fake authentication data for X11
 forwarding.
 Last login: Thu Feb 19 11:54:55 2009 from 192.168.2.87
 mikeayers-linux-2 export DISPLAY=192.168.2.87:0
 mikeayers-linux-2 xterm
 Xlib: connection to 192.168.2.87:0.0 refused by server
 Xlib: No protocol specified
 
 xterm Xt error: Can't open display: 192.168.2.87:0
 mikeayers-linux-2
 [/SNIP]
 
   This same technique used to work.  The only changes I have made
 since it last worked was (1) update cygwin, including X, and (2) add 
 -- -multiwindow -clipboard to my invocation of startx (I used to get
 those by default).
 

It might have worked, but it was wrong.  Do not set the DISPLAY
environment variable.  It is set by ssh -Y to something similar to
localhost:10.0 - the actual value depends on whether there are other
forwarded X connections to that box.

BEFORE running ssh, you need to ensure that $DISPLAY is set correctly
for local connections (probably :0).

By specifying your own value for $DISPLAY inside the ssh session, you 
are ensuring that all X traffic bypasses the ssh tunnel and sets up its 
own (insecure and not encrypted) connection.  This new connection must 
then go through the normal authentication process and it will appear 
to the X server as a remote connection, whereas the ssh connection 
looks like a local connection to the server.

Phil
-- 

This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.


RE: question

2009-01-26 Thread Phil Betts
On Monday, January 26, 2009 marwa chendeb wrote:

 Hello
 I updated Cygwin but the problem is that x server don't work. when i

You haven't updated the X server.  Version 6.8.99.901 is the old one.

Please see this:
 Problem reports:   http://cygwin.com/problems.html

Pay particular attention to *attaching* the output of cygcheck -srv

 type X the response is that :
 see attachment.

Please don't attach screenshots when you can easily copy and paste the 
text.  A picture is only worth 1000 words - not 44kb!

 I don't have the package CID fonts?? 

That is not an error.  It is just a warning (and a very minor one at 
that).

 What is the solution for this problem.

It is not a problem.  The only error shown in your output relates to
the keyboard, but that isn't usually fatal.

Perhaps you should *really* update your X, but before you do, you 
should read _carefully_ the announcement message so you know what 
needs updating.  The new X is a MAJOR update from the one you are 
running, and many things have changed.

If you still have problems, check the faq at
  http://x.cygwin.com/docs/faq/cygwin-x-faq.html

And if that still doesn't resolve them, attach /var/log/XWin.0.log as 
well as the aforementioned cygcheck output.


Phil
-- 


This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: Windows scaling

2008-12-19 Thread Phil Betts
Jon TURNEY wrote on Tuesday, December 16, 2008 6:48 PM::

 Gionatan Danti wrote:
 Hi all,
 I have a question regarding CygWin/X.
 
 I would like to know if there is a method to scale a window, similar
 to what is possible with UltraVNC and its scaling option.
 
 To be more clear, I will explain my setup. I have a Linux server
 where run a fixed-resolution application: it's window can't be
 resized and/or maximized. When I connect to this Linux server via
 CygWin and SSH X forwarding, I can maximize the window (because
 CygWin start in multiwindow mode and use it's own window manager),
 but the majority of the maximized window is empty (it's white).
 
 This sounds like a bug.  Ideally, the Cygwin/X multiwindow mode
 window manager should also take note of the hint that this window
 isn't resizable/maximizable and not allow it to be maximized.

I agree

 I would like to know if there is a method to scale the image so that
 it can fit completely the maximized window (eg: by mean of linear /
 bilinear filtering).
 
 This feature doesn't exist.

Agree again, but it would be nice.  Perhaps with a fully hardware 
accelerated GL, compiz or similar would be usable?

On the other hand, almost all X applications support the -geometry
option, and/or setting the font, so even though it isn't resizable, it 
may be possible to run it with a larger window initially, and by using
a larger font achieve a similar (perhaps better) result.

Phil
-- 
This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: cygwin and cygwin-xfree lists to merge

2008-12-12 Thread Phil Betts
Christopher Faylor wrote on Wednesday, December 10, 2008 5:49 PM::

 The historical reasons for merging the cygwin and cygwin-xfree lists
 no longer seems to exist so I am contemplating merging the two lists.
 
 If anyone has a compelling reason why this should not happen please
 send it to one of the two lists.  If I don't hear a coherent argument
 against doing this, I'll throw the switch over the weekend.
 
 Btw, I'm only mildly sympathetic to arguments like It will be more
 email for me.  I'm more concerned with having to constantly shuttle
 people back and forth between the two lists.  Unless there is a
 compelling argument to the contrary, I think that the fact that people
 are confused about which list to use outweighs the increase in email
 traffic for people who just want to hear about cygwin/x.
 
 cgf

Although I currently have rules to put the two lists in different mail 
folders and it works well for me, but I'd also be perfectly happy with 
the change.  There are plenty of borderline issues where it's not 
clear (to the user at least) whether the problem is X related or 
cygwin related, so a unified list removes any need to speculate.  With 
the 1.7 release now officially available for public test, there are 
bound to be issues in X apps, where the cause is really in the cygwin 
DLL, so merging the lists asap will save everyone having to play the
guess-the-list game.

A couple of things to consider (although you're probably way ahead of 
me):

Will mail sent to the xfree ML email address be diverted (or mirrored)
to the cygwin ML?  Human nature being what it is, it's unrealistic to 
expect everyone replying to an old thread to remember to change the 
To: line.

Also, what will happen to the archives?  Will they be merged too?  If
they are, any links to xfree archived posts (both within the ML 
itself, and also from bookmarks/blogs/forums/other MLs/etc) will be 
broken.  Would it be possible to alias the old URLs to avoid breaking 
links?

If the archives are not merged, the threading should at least be 
maintained (both ways) between the old xfree list and the merged list.
(i.e. a reply to a message on cygwin-xfree which goes to the cygwin ML
needs the References entry to point back to the xfree archive, and the
xfree message needs the Follow-ups entry to point to the cygwin 
archive).


Phil
-- 
This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: xterm line wrapping

2008-12-09 Thread Phil Betts
Thomas Dickey wrote on Wednesday, December 10, 2008 1:31 AM::

 On Tue, Dec 09, 2008 at 10:57:53AM -0500, Gustavo Seabra wrote:
 Hi All,
 
 I wonder if anyone else sees this. When I open an xterm, it all works
 fine with the default dimensions. But if I resize the terminal, line
 wrapping stops working until I return to the initial size. This was
 present in the old xterm, and persists after upgrading to the new
 one. 
 
 that sounds like the feature in bash which makes it not pass on the
 SIGWINCH signal, depending on bash's settings.  (I should add it to
 my ncurses faq, since the bash maintainer doesn't answer this
 question) 
 
 Interestingly, if I have a file opened in vi when resizing, vi works
 quite well and wraps the lines correctly according to the terminal
 size. But when I get out of vi I get the same problems back :-(
 
 vi is probably doing the ioctl to check on the screensize...

Try the command shopt -s checkwinsize in bash.  This causes bash to
check the terminal size after every command and adjusts $LINES and
$COLUMNS to the correct values.

If that works, add it to your .bashrc


Phil
-- 
This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: adobe-courier not found

2008-12-08 Thread Phil Betts
Mattias Hellström wrote on Monday, December 08, 2008 12:00 PM::

 How can I solve the following error (when trying to view emacs from
 remote linux machine)?
 
 No fonts match `-adobe-courier-medium-r-*-*-12-120-75-75-*-*-*-*'
 
 I haved tried to install all fonts but the particular one does not
 seam to exist.
 bash-3.2$ ./xlsfonts.exe |./grep.exe adobe|./grep.exe courier
 -bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-adobe-standard
 -bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-adobe-standard
 -bitstream-courier 10
 pitch-medium-i-normal--0-0-0-0-m-0-adobe-standard 
 -bitstream-courier 10
 pitch-medium-r-normal--0-0-0-0-m-0-adobe-standard 
 -ibm-courier-bold-i-normal--0-0-0-0-m-0-adobe-standard
 -ibm-courier-bold-r-normal--0-0-0-0-m-0-adobe-standard
 -ibm-courier-medium-i-normal--0-0-0-0-m-0-adobe-standard
 -ibm-courier-medium-r-normal--0-0-0-0-m-0-adobe-standard

You need to configure emacs not to request a font that doesn't exist.
In your case, this means changing -adobe-courier- to -ibm-courier-

Because you don't give any details about the linux configuration (i.e.
where the font is specified), it's impossible to be more precise than 
that.

You should probably look in the linux box's app-defaults directory, and
also ~/.Xdefaults and/or ~/.Xresources, but it could also be in any of 
the emacs lisp, or even specified on the command-line.

Phil
-- 
This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: startx doesn't if $HOME contains white spaces

2008-11-19 Thread Phil Betts
Marco Atzeri wrote on Wednesday, November 19, 2008 1:49 PM::

 --- ludo  ha scritto:
 
 my $HOME is :
 $ echo $HOME
 /c/Documents and Settings/patrick.PRO2204
 
 
 it is not a good idea:
 
 http://cygwin.com/faq/faq-nochunks.html#faq.using.filename-spaces
 
 
 I think that white spaces in my $HOME directory name causes the
 problem. 

 [...]

 does anybody encounters the same problem ?
 
 
 of course, for this reason we don't do it :-)
 
 my $HOME in cygwin is /home/marco
 

If you wish cygwin to use /c/Documents and Settings/patrick.PRO2204
rather than setting up a separate $HOME directory, you could just
use mount:

mount $USERPROFILE /home/patrick

Then edit your /etc/passwd file to set your home directory to 
/home/patrick.  You $HOME would now be /home/patrick for cygwin
programs, and Windows can continue using its Hey! Now that we 
*can* have spaces in filenames, let's use them EVERYWHERE! 


Phil
-- 

This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: Regarding installation of X11 server in my Laptop with Windows Vista home basic OS

2008-10-15 Thread Phil Betts
mallikarjun reddy wrote on Wednesday, October 15, 2008 1:02 PM::

 Dear Sir,
   I,G Mallikarjun Reddy, am a student of B.Tech final year
 studying in National Institute of Technology,Warangal.I want to
 install Magic VLSI design tool in my Laptop which has Windows Vista
 Home Basic as its Operating System.So I installed Cygwin by following
 the instructions as given in the following site
   http://opencircuitdesign.com/cygwin/tcltk.html
 But I couldn't get X11 server installed though I followed the steps
 perfectly. Please give me a solution regarding this.
 
 Thanking you,in anticipation.
 Yours faithfully,
 Mallikarjun

You haven't given us anywhere near enough information to let us work
out what your problem is.

What follows is a general procedure to follow to get X working.


If you installed cygwin with DOS line endings, you would be better off
cutting your losses and uninstall cygwin.  Then start again using UNIX 
line endings.  DOS line endings just cause more trouble than they are 
worth, and there is no good reason to use them. (The option is being 
removed from setup for cygwin 1.7)

Next, read these links (even if X is now working):

Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/

If you still have a problem, check /tmp/XWin.log for errors.

If you're still no wiser, try searching the mailing list archive:
http://cygwin.com/ml/cygwin-xfree/

In particular, search the archives for references to any error 
messages you see in /tmp/XWin.log.  If XWin aborted, the error message
related to this will usually be near the end of the file, so it's best
to work backwards through the file.

You might be suffering from http://cygwin.com/acronyms/#BLODA 
If you have any of the software on the list, it's important to try
uninstalling it.  Just disabling it is unlikely to be enough to stop 
such badly written software from interfering.

Finally, if you're still stuck, you need to follow the instructions 
here:

 Problem reports:   http://cygwin.com/problems.html

In particular, *attach* the output from running cygcheck -svr.
For X related problems, you should also attach /tmp/XWin.log.


Phil
-- 
This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: .Xdefaults not being read

2008-09-16 Thread Phil Betts
thetrystero wrote on Tuesday, September 16, 2008 5:19 PM::

 oops .. so all i need to do is look for the package called cpp in
 setup.exe an install that?

No, I already told you which package you need - gcc-core


Phil

-- 
This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: Windows Vista

2008-08-26 Thread Phil Betts
Monson Hayes wrote on Sunday, August 24, 2008 12:51 PM::

[snip]
 
 Fatal server error:
 could not open default font 'fixed'

It's pretty obvious that this is the reason it's failed, and googling 
for this would have found the answer.  Whilst I could give you the 
definitive solution, it's such a frequently asked question, and I get 
tired of repeating myself.  The answers are already out there, so I 
think it's up to you to do the work.

If you don't know how use google to search the mail archives, try 
adding site:cygwin.com inurl:ml/cygwin-xfree (without the quotes) 
to the query.

Phil
This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: Running a simple GUI app

2008-08-19 Thread Phil Betts
John Emmas wrote on Monday, August 18, 2008 7:43 PM::

 Sorry Phil if my questions seem 'lame'.  I should have explained that
 I only installed Cygwin this morning so I'm by no means up to speed
 with the concepts or terminology.

I'm sorry if it came across wrongly.  I didn't mean to suggest you were
currently lame.  I had assumed from the context that you were probably 
new to at least some of the technology and was trying to steer you away 
from _becoming_ a lame Windows user.

 Anyway, I managed to arrange Windows so that it now starts X at boot
 up. This means that I can use a (DOS) console window to navigate to
 the appropriate directory, type 'HelloWorld' and my HelloWorld app
 launches with X just running silently in the background.  That's a
 lot slicker than the procedure I was using a few hours ago.  Thanks
 for the suggestion. 
 
 What's strange though is that I can't just double-click on the app's
 icon and launch it.  There's a (slim) chance that this could be a
 Windows problem but I've never known any other Windows app that can
 be started from a command line but can't be started by clicking its
 icon.  Any ideas? 

As cgf has suggested, it's probably the DISPLAY environment variable.
Alternatively, you could use the standard X parameter -display :0 
if your program supports it.

Phil
-- 
This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: Running a simple GUI app

2008-08-18 Thread Phil Betts
John Emmas wrote on Monday, August 18, 2008 4:55 PM::

 Hi there,
 
 After installing Cygwin (under WinXP) I've got to the stage of
 compiling a very simple Hello World app which just displays an
 empty GTK dialog with the title Hello World.  To run the app I
 (currently) have to start Cygwin (using its desktop icon), type
 startx into the DOS terminal (which opens a second terminal
 window), navigate to the folder containing my executable and finally
 type ./HelloWorld.  Obviously this is all a bit convoluted.  Is
 there a simpler way to launch my app - for example:- 
 
 a)  Double clicking on an icon, or
 b)  Issuing some command (from a DOS terminal) that would launch the
 app - but starting Cygwin and X invisibly.
 
 Thanks,
 
 John

First, there's no such concept as starting Cygwin.  Cygwin is just
a DLL.  If you mean start a bash session, there's no need to do
that just to run an X program.


You could* write a bash script along the lines of:

 /path/to/runyourprog ---
#!/bin/bash --login

checkx || startx
exec yourprogname
-

The --login should ensure that the environment is set up correctly.

Then you can create a shortcut with a target of:

C:\cygwin\bin\bash -c /path/to/runyourprog


* This is very much a lame Windows-user type of thing to be doing.
Xwin is a SERVER.  It should not be started by running a client.  
If you were to ask a linux mailing list for a way to switch runlevel
if someone tried to run your program without an X server, you would 
rightly expect the electronic equivalent of howls of derision.

Why do you not just start X when you log on?  If you'd rather not 
start X every time you log on, you only need to start it the first 
time you try to run an X program.  Any properly written X program 
(including yours) should tell the user if it cannot connect to the 
X server, so if you get this message, you just need to run the 
server - once, then try again.

Phil

-- 
This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: various X-based apps (konsole, mplayer, mencoder) fail to start

2008-06-25 Thread Phil Betts
John J. McDonough, WB8RCR wrote on Wednesday, June 25, 2008 12:01 AM::

 Do ANY X applications work?  Have you ever seen a GUI screen on your
 XP laptop?
 
 Bringing up a Cygwin terminal window is NOT the same as starting an
 Xterm. Do you have the Cygwin X displayed in the tray?

This is a valid question, but I think the lack of any error message
points to a missing DLL.  If it was due to there being no X server,
the normal response is to say something to the effect that it
cannot connect to the display.

Running cygcheck konsole.exe will show if any DLLs couldn't be
found.

If any DLLs are missing, e.g. C:\cygwin\bin\cygkdefx-4.dll,
run cygcheck -p /bin/cygkdefx-4.dll to find out which package needs
to be installed.

Phil

 
 --McD
 
 - Original Message -
 From: Marco Schuster [EMAIL PROTECTED]
 To: cygwin-xfree@cygwin.com
 Sent: Tuesday, June 24, 2008 5:51 PM
 Subject: various X-based apps (konsole, mplayer, mencoder) fail to
 start 
 
 
 hello all,
 
 hopefully one of you can help me:
 i have a win xp home sp2 laptop here; i have cygwin up and running
 (mirrors are sunsite.dk and xmission.com). the only thing that does
 not work are any of the kde apps (e.g. konsole) or mplayer/mencoder,
 which are AFAIR compiled with X support (at least mplayer must be).
 even if ran in a (working!) xterm, they simply exit without
 displaying an error or other info or displaying some GUI.
 this also prevents the kde desktop from being started, as
 kstartupconfig suffers from the same problem.
 
 any idea what might go wrong here?
 
 thanks,
 the|m.
 

-- 
This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: can't get visual from xserver

2008-06-25 Thread Phil Betts
Olaf Eisen wrote on Wednesday, June 25, 2008 10:50 AM::

 I use use X11 tunneling with ssh -Y which works fine for xterms and
 graphics. However, for the software called Focus I get the fatal
 error 
 
 OmGetVisual Can't Find TrueColor Visual of Depth = 24!
 Error: XtCreatePopupShell requires non-NULL parent
 Focus can not find TrueColor visual from X server!
 PseudoColor is selected instead.
 Focus can not find a visual from X server!
 Please check X installation with system administrator.
 
 I did not find any related information in the faq or list, any
 suggestions? 
 
 Thanks, Olaf

XWin is limited to supporting the current Windows display mode.
If Focus requires 24 bit true colour, then you need to set the
Windows display to 24 bits.  Alternatively, you may be able to
configure Focus to use a display mode that matches your current
display.

Run xdpyinfo to list the visuals available.

Phil

-- 
This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: Couldn't load XKB keymap (fr_CH)

2008-05-30 Thread Phil Betts
Xavier Robin wrote on Friday, May 30, 2008 8:57 AM::


 It looks like the file /etc/X11/xkb/keymap/xfree86 cannot be found.
 However, it exists:
 
 $ ls -l /etc/X11/xkb/keymap/xfree86
 -rwxr--r--+ 1 ROBINX Utilisateurs 12788 Oct 27  2005
 /etc/X11/xkb/keymap/xfree86 
 (It was -rwx--+ and I tried to chmod it so I'm sure it is ok).

Directories also need the execute permission for one to be able
to read them (this is an over-simplification, but essentially true).

On my installation, which hasn't had the permissions tinkered with,
all directories under /etc/X11 have permissions 770.

Try running this command:

find /etc/X11 -type d -exec chmod 770 {} +


Phil

-- 
One of the following statements is true:
This email has not been scanned by Ascribe PLC using Microsoft Antigen
for Exchange.
This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: Start X server crashes with dual monitors

2008-05-15 Thread Phil Betts
Top posting - reformatted.

Krzysztof Syryczynski wrote on Thursday, May 15, 2008 1:11 AM::

 Did you perform the steps in the FAQ for the fatal error message you
 received? Fatal server error: could not open default font 'fixed'
 http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-error-font-eof

 Yes, it didn't work:
 umount /usr/X11R6/lib/X11/fonts
 umount: /usr/X11R6/lib/X11/fonts: No such file or directory
 But directory exist:
 ls /user/X11R6/lib/X11/fonts
 100dpi 75dpi TTF Type1 cyrilic encodings misc util
 
 (installed: Editors, System, Shels, X11; the rest default or
 installed) 
 

You have almost certainly opted to install cygwin with text mode
mounts (DOS style line endings).  If this is the case (you can 
verify this using cygcheck), you have two options:

1) reinstall cygwin with binary mounts (UNIX style line endings)

This is the preferred option, because installing using textmode
mounts can cause all sorts of other problems unless you're very 
careful.

[ It is possible to change the mount mode without reinstalling, 
but there is a high probability that you have some files with DOS
style line endings, each of which would need converting with d2u.
Finding and fixing them all is error prone and more trouble than 
it's worth.]

2) Ensure that the fonts directory is on a binary mount.  To do 
this, you need to delete the contents of /usr/X11R6/lib/X11/fonts:

$ rm -rf /usr/X11R6/lib/X11/fonts/*

Then create a binary mount for the fonts:

$ mount -f -b $(cygpath -m /usr/X11R6/lib/X11/fonts)
/usr/X11R6/lib/X11/fonts

You then need to reinstall the fonts packages via setup.exe


Phil
This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: unable to configure mpich2 in xterm - worked fine in non-X cygwin terminal

2008-05-06 Thread Phil Betts
Anderson, Carl wrote on Monday, May 05, 2008 5:46 PM::

 I recently tried to configure and make mpich2 for a parallel
 programming class.  I was working from an xterm window running bash. 
 The configure script would hang on certain checks.  Another student
 had the exact same problem on his machine too.   
 
 We discovered that we could configure and build the exact same
 sources from the standard non-X11 cygwin terminal. 

This almost certainly has nothing to do with X, so it's really OT
here.

My WAG is that your makefile invokes a native windows program at
some point, and that program doesn't understand cygwin's ptys.
I suggest searching the archives for the main cygwin list where 
you'll find similar questions have been asked (and answered) many 
times before.

Phil
This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
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/



RE: rxvt window size change not detected

2008-03-13 Thread Phil Betts
Thomas Dickey wrote on Thursday, March 13, 2008 10:23 AM::

 On Thu, 13 Mar 2008, xerces8 wrote:
 
 Hi!
 
 Found this problem:
 
 - start bash in rxvt (C:\cygwin\bin\rxvt.exe -sl 5000 -fn 20 -bg
 black -fg white -sr -e bash --login 
 -i)
 - less /etc/passwd
 - maximize the rxvt window
 - quit less (key q)
 - type a long command line in bash
 
 expected behavior :
 - works fine
 
 actual behavior :
 - the line is wrapped at the width of the windows as it was before
 maximized and continues in the same line at first column (a mess,
 basically) 
 
 versions:
 up to date as of today (13-mar-2008)
 
 bash 3.2.33-18
 
 I've seen several comments that indicate the problem is a bash setting
 

Put the following line in ~/.bashrc

shopt -s checkwinsize


Phil

--
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/



RE: enquiry on the error message for the Release:6.8.99.901-4

2008-03-04 Thread Phil Betts
Ning Wang wrote on Tuesday, March 04, 2008 9:07 AM::

 Dear Sir/Mdm,
 
 I am confused by the following error message generated each time when
 I start my cygwin program: C:\cygwin\usr\X11R6\bin\startxwin.bat.
 
 Error Message displayed as followings--
 A fatal error has occurred and Cygwin/X will now exit.
 Please open /tmp/Xwin.log for more information.
 
 Vendor: The Cygwin/X Project
 Release: 6.8.99.901-4
 Contact: cygwin-xfree@cygwin.com
 XWin was started with the following command-line:
 
 /usr/X11R6/bin/XWin -multiwindow -clipboard -silent-dup-error
 - End of the error message 
 
 Could you please let me know why this error message is displayed each
 time when I run CygwinXFree86 and how to fix this problem?
 

Did you even try to follow the instructions in the message?

 Please open /tmp/Xwin.log for more information.

Follow the instructions, then search the FAQ and the mailing list 
archives for any messages it contains.  If you're still confused,
post the full contents of /tmp/Xwin.log.  Remember - nobody on 
the list can see your PC, so you're going to have to provide as 
much information as possible, including what you've tried to do
to resolve the problem.

--
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/



Re: Problems using startxwin.bat

2008-02-07 Thread Phil Betts
PEDRO MACANAS VALVERDE wrote on Thursday, February 07, 2008 1:30 PM::

 -Mensaje original-
 De: [EMAIL PROTECTED]
  ^
Please don't feed the spammers:
http://cygwin.com/acronyms/#PCYMTNQREAIYR

 [mailto:[EMAIL PROTECTED] En nombre de Cary Jamison
   
Ditto

 Enviado el: miércoles, 06 de febrero de 2008 18:19
 Para: [EMAIL PROTECTED]
^^^
Ditto

You appear to be using Outlook or Outlook Express, so you should 
investigate using Outlook-Quotefix if you use Outlook:
 http://home.in.tum.de/~jain/software/outlook-quotefix/
or OE-Quotefix if you use Outlook Express:
 http://home.in.tum.de/~jain/software/oe-quotefix/

 Asunto: Re: Problems using startxwin.bat
 
 
 There have been similar posts in the past about how to set up for
 multiple users.  Since I don't have that setup, I can only offer a
 couple vague suggestions, including that you search again for those
 posts. 
 
 You seem to be on the right track that the problem is access to these
 files and directories in /tmp.  If the files are there owned by you,
 another user can't come along and overwrite them.  I believe some of
 the suggestions in the past included things like making sure this
 stuff gets cleaned up in /tmp and/or giving each user their own /tmp
 ($TMP or $TEMP). 
 
 
 Good ideas.
 
 Regards

Just to clarify, the suggested workaround was actually to make /tmp
a user-specific mount - i.e. each X user would need to do something
like:

mount -u -b $USERPROFILE/Local Settings/Temp /tmp



--
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/



RE: fatal error

2008-02-05 Thread Phil Betts
Carlos Moran Tejeda wrote on Tuesday, February 05, 2008 2:55 PM::

 Fatal server error:
 could not open default font 'fixed'
 
 Please, could you let me know how to fix it?

Try looking in the FAQ - there's a link to it at the bottom of
every message on the list.

This is almost always caused by choosing to install for DOS style
text files.  If this is what you did, be advised that this causes 
all sorts of other problems, so if you've only just installed 
cygwin, I'd recommend deleting your cygwin installation directory 
and reinstalling from scratch.  

--
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/



RE: Problem with arrow keys in x-based applications on cygwin

2008-01-28 Thread Phil Betts
Per Thorlacius wrote on Sunday, January 27, 2008 7:30 PM::

 The arrow keys are not sending escape sequences, they are entirely
 ignored. 

Do you get any keypress events when you press the keys?  Try running
xev.  In the window that opens, press the cursor keys and watch the
output.  If you get an event when you press the keys, make a note of
the keycode.

You can then use xmodmap to associate the keycode with a keysym.

E.g. my keyboard produces the following keycodes:

Left  100
Right 102
Up98
Down  104

Using this information I would create a .xmodmaprc file in my home 
directory with the following lines:

keycode  98 = Up
keycode 100 = Left
keycode 102 = Right
keycode 104 = Down

I'm not sure if it matters in this case, but it's best to avoid 
DOS style CRLF line endings, so don't use notepad to do this (or
if you do, run d2u ~/.xmodmaprc afterwards).

Run the command xmodmap ~/.xmodmaprc to enable the keys.  This
command may be added to the script you use to start X.  Note that 
I have found it is necessary to wait for Xwin to complete its 
initialisation, otherwise the command does nothing, so after 
running Xwin, sleep for a few seconds before running xmodmap.

HTH

Phil

--
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/



RE: Use remote graphical program

2008-01-14 Thread Phil Betts
Gustavo Seabra wrote on Thursday, January 03, 2008 3:16 PM::

 On Jan 3, 2008 7:08 AM, Phil Betts [EMAIL PROTECTED]
wrote:
  ^

http://cygwin.com/acronyms/#PCYMTNQREAIYR

 There is an experimental, but (in my experience) very stable, version
 of XWin with GLX support.  This is in package xorg-x11-xwin-gl and
 installs the executable XWin_GL.exe.  You would need to alter your
 startxwin.sh to run this instead of XWin.exe.  It works, just don't
 expect great performance. 
 
 Phil
 
 That's interesting... Last time I checked, there was no maintainer for
 X in Cygwin, but I do admit that was some time ago. So, I'm very
 curious to learn about this newer XWin version. If you don't mind, I'd
 like to ask a couple of questions:
 
 1. Is this package available through setup.exe? Or do we need to
 recompile it for Cygwin ourselves?
 
 2. What do you mean by don't expect great performance.? Is it a GLX
 issue or something related to this particular version of XWin, as
 compared to the older ones?
 
 Thanks a lot!
 Gustavo.

Sorry for the delay in replying.  I thought I'd sent it thanks to 
Outlook telling me I had, when in fact it had only saved it in my 
drafts folder!

This isn't new, it was experimental at the time Xwin last had a
maintainer and just never got promoted to stable.

It's available through setup.exe, but I guess you have to tick the 
exp radio button at the top to see it (once it's installed, it 
appears without selecting exp).

In terms of performance, GL software is really designed for running 
on the local host, so you're never going to get blazing performance
running clients on a remote host.  The network overhead slows it 
down considerably.  However, XWin's GLX is not particularly fast, 
even when running locally.  Running glxgears.exe at the default size,
on XWin running on my laptop, I get (approximately):

62 fps running locally
31 fps running on a linux box without using ssh forwarding
21 fps running on a linux box via ssh forwarding without compression.
47 fps running on a linux box via ssh forwarding with compression.

None of these are stunning (IIRC, I get several hundreds of fps on a
linux box at home), but it may be adequate for your purposes.

My experience is that native GL applications running on Windows (e.g.
Blender3D) run noticeably faster when running full screen (if they can),
because there is no contention with DirectX.  I haven't tested it, 
but if performance is a problem, it may be worth trying XWin 
full screen before giving up on it.

I haven't looked at the code, but the locally run glxgears runs at 
100% cpu on my laptop, which suggests that much of the GL code is 
handled in software, rather than hardware accelerated.  The remote 
tests all run at about 92% cpu, so the network is (just) the 
limiting factor.

Phil

--
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/



RE: Use remote graphical program

2008-01-03 Thread Phil Betts
Larry Hall (Cygwin X) wrote on Thursday, December 27, 2007 1:40 AM::

 horacioemilio wrote:
 Hi,
 
 I am trying to use a remote program which is installed on a remote
 linux machine. In these situations I usually do;
 
 0) on my windows machine I start cygwin and afterwards use
 startxwin.sh 
 
 1) ssh -X name-of-the-gateway-machine
 
 2) ssh -X name-of-the-linux-machine-inside-the-remote-network
 
 3) program-name 
 
 and programs like emacs or firefox appear on my desktop.
 
 But for some other program which uses more advanced graphics it does
 not work, I get the following error message;
 
 [EMAIL PROTECTED]:~ Xlib:  extension GLX missing on display
 localhost:10.0 . Xlib:  extension GLX missing on display
 localhost:10.0. 
 
 snip
 
 
 Do you know how could I overcome this situation ?
 
 This is more appropriately directed to the Cygwin X list.  I've reset
 the Reply-To there.  Please send any follow-up the the Cygwin X
 list. 
 
  From the above, it's clear the application you're trying to use wants
 to access the underlying hardware (via OpenGL).  This is not supported
 in the current Cygwin X server.  I believe there is a MinGW version
 which has some support for this though.  You may want to investigate
 that. 
 
 --
 Larry Hall  http://www.rfk.com
 RFK Partners, Inc.  (508) 893-9779 - RFK Office
 216 Dalton Rd.  (508) 429-6305 - FAX
 Holliston, MA 01746

There is an experimental, but (in my experience) very stable, version
of XWin with GLX support.  This is in package xorg-x11-xwin-gl and
installs the executable XWin_GL.exe.  You would need to alter your
startxwin.sh to run this instead of XWin.exe.  It works, just don't
expect great performance.

Phil

--
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/



RE: Xwin crashed when i use -depth 24

2008-01-03 Thread Phil Betts
Ali asghar Toraby wrote on Wednesday, January 02, 2008 6:12 AM::

 hi friends

Asking the same question 3 times in quick succession without waiting
for a response will not make you any friends here.

 i use xwin to remote solaris8 CDE environment. when i use
 24 bpp option it crashed and following is the output that it prompt
 to me: ##

[snip]

 winAllocateFBShadowDD - Changing video mode
 winAllocateFBShadowDD - Could not set full screen display mode:
 80004001 winFinishScreenInitFB - Could not allocate framebuffer
 winScreenInit - winFinishScreenInit () failed

[snip]

 how to i can fix this problem?

The -depth parameter must match what your hardware is capable of 
displaying.  It is usually safest to omit the depth option and let 
XWin use the current Windows mode.

 i want to use 24 bpp to have a right
 colors in CDE session. in  other modes (8,16,32) colors not properly.
 in Xconnect-pro when i use 24 bpp it worked successfully but in
 cygwin/x it crashed and core dumped!! WHY?? :(
 please help me. thanks for any reply

If your Windows display is set to 32bpp, and XWin is started without
the depth option, but CDE does not display the correct colours, I can 
only assume that CDE (or the Solaris X11 library) is making invalid
assumptions about the pixel format.  If so, then you should address
your question to Sun.  There is no problem when running X software
from other vendors.

Phil

--
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/



RE: how can i change the color of xterms that connected with ssh to unix account

2007-12-21 Thread Phil Betts
Meir Yanovich wrote on Wednesday, December 19, 2007 2:51 PM::

 Hello all
 Im new to cygwin and X im using the
 cygwin\usr\X11R6\bin\startxwin.bat for simple x display
 for using the unix tools in windows and to connect with ssh to unix
 accounts
 now i like to be able to change the color of the xterm every time I
 connect with ssh to remote host
 can it be done ?
 Thanks

To change the xterm background to pink, use this command:
$ echo -e '\e]11;pink\007'

To do this automatically when you log in via ssh, add the following 
to your .bash_profile on the remote host.

if [ ! -z $SSH_TTY ];then echo -e '\e]11;pink\007';fi

To ensure this only happens on interactive shells, change the first
part to:

if [[ $- == *i* ]]  [ ! -z $SSH_TTY ];then ...


Read the file /usr/share/doc/xterm-229/ctlseqs.txt for other escape
sequences you can use to control xterm.

Phil

--
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/



RE: Trapping clicks on Cygwin/X Server icon

2007-12-04 Thread Phil Betts
phiroc wrote on Tuesday, December 04, 2007 2:45 PM::

 is there a way to trap clicks on the Cygwin/X Server icon in the
 System Tray or on the Exit Button in the dialog that appears?
 

I don't know of a way to trap the exit, but...

 I would like cygwin to run a script before shutting down.

You could try adding a menu item (to the menu that appears when you 
right click on the X icon) to provide your own exit method.  This is
done using the $HOME/.XWinrc file.

If you don't already have a file ~/.Xwinrc, you can get a basic one
from http://www.msu.edu/~huntharo/xwin/devel/server/example.XWinrc 

Place it in your $HOME directory, and rename it to .XWinrc

You could then change the root menu to something like this:

menu root {
// Comments fit here, too...
Reload .XWinrcRELOAD
Kill XWin exec my_script ; kill $PPID
Applications  menuapps
SEParATOR
}

The Exit menu item will not be affected, but the new item Kill XWin
will run my_script (assuming it is in your PATH), then kill XWin.

I haven't tested how XWin responds to kill, so you may want to 
experiment with changing the signal, e.g. to kill -HUP $PPID in 
order to get a clean exit.

If you want to know more about the .Xwinrc file, type man XWinrc
(case is significant).

HTH,

 Phil

--
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/



RE: Using XWin.exe to connect to a linux X Server

2007-12-04 Thread Phil Betts
jose isaias cabrera wrote on Monday, December 03, 2007 11:43 PM::

 Just to complete this issue, I had to delete the account and recreate
 it. The reason why was that I previously had an SPARC sunworkstion
 with Gentoo on it, and I rsync-ed all of the files and directories
 from that server.  I was running gnome on that server also, but
 somehow the previous settings were getting picked up by the new
 gnome, which was a newer version and it was kicking me out.  After
 creating the new user with the same name I am able to login and do my
 work. 
 
 thanks,
 
 josé

I'm glad you've got it working, but just for the benefit of anyone
picking up on this thread via the archives, unless you really *want*
to run a Linux desktop in XWin, the advice to use XDMCP is wrong (or 
at least, it's not the best advice).

The recommended way to run client applications is documented in the
XWin user guide:
 http://x.cygwin.com/docs/ug/using-remote-apps.html

Using ssh is secure, reliable and easy both on the network and the 
remote box.

In contrast, XDMCP is woefully insecure, overkill for running 
individual applications, and inefficient in terms of network resources 
and the remote host's resources - all window manager operations are 
transmitted over the network in addition to anything going on in the 
client area of the windows.  If in doubt, watch the spike in network 
activity when you drag a window under XDMCP.  Compare this with the 
same action using ssh tunnelling.  At the same time, you can also 
watch the spike in CPU activity on the remote box.

If you are running Gnome or KDE on the Linux box, you are running a 
fairly resource heavy application.  There have been efforts lately to 
reduce their footprint, but try getting 100 users connecting to your
Linux box, each using XDMCP and you'll soon notice the difference.

Using XDMCP to run display managers also goes against the spirit of X, 
which is to have a single, local display and window-manager/desktop on 
which you can run clients on many different hosts.  XDMCP was developed
to allow using X on the graphical equivalent of dumb-terminals.

Another problem with using XDMCP is that the remote X clients are,
as far as Windows is concerned, just one application - XWin.  You
cannot use alt-tab to cycle through your Windows and your Linux clients
at the same time.  If you connect to multiple remote hosts, each using
XDMCP, things can quickly become confusing.

Sorry if that all sounded a bit preachy - it wasn't meant to.  I only 
want people to make informed decisions, not make the decisions for 
them.

Phil

--
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/



RE: X server already running?

2007-11-26 Thread Phil Betts
Kevin Porter wrote on Monday, November 26, 2007 9:08 AM::

 /tmp/XWin.log says:
 
 -- START /tmp/XWin.log --
 
 _XSERVTransSocketINETCreateListener: ...SocketCreateListener() failed
 _XSERVTransMakeAllCOTSServerListeners: server already running
 
 Fatal server error:
 Cannot establish any listening sockets - Make sure an X server isn't
 already running
 winDeinitMultiWindowWM - Noting shutdown in progress
 
 -- END /tmp/XWin.log --
 
 I suspect a there's a pid file still hanging around for X from the
 previous crashed session? I can't find one, and googling for a
 solution turned up nothing useful.
 

The file you're looking for is /tmp/.X11-unix/X0

If you'd started X with startxwin.bat or startxwin.sh this would have
been done as a matter of course.

Phil

--
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/



RE: stopping the cygwin X Server

2007-11-08 Thread Phil Betts
John Windberg wrote on Wednesday, November 07, 2007 6:13 PM::

 There's a nifty startxwin.bat file for starting the x server, but I
 was wondering how to stop it. So I went searching and found:
 
 http://x.cygwin.com/docs/ug/using-stopping.html
 
 When you are done using Cygwin/X, press Alt-F4 to shutdown the X
 Server; this is the default key combination to shutdown the X Server.
 
 As far as I can tell, this is quite wrong. Alt-F4 will close any open
 window, but not the server, but if you are rootless, and there are no
 X apps open, alt-f4 simply closes whichever windows app you have open.
 the xwin.exe process continues to run.
 
 You cannot switch to the xwin process to bring it forward to then
 close it. There is no way to send an alt-f4 to it.
 
 Should there be a stopxwin.bat?
 
 -j

Just right click the X icon in the system tray and select Exit

--
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/



RE: OpenGL files

2007-10-12 Thread Phil Betts
Suresh Keswani wrote on Thursday, October 11, 2007 5:46 PM::

 I have a small question relating to developing OpenGL applications
 *locally*: I have installed the gcc/++ compiler suite, freeglut
 library files and the OpenGL-related files via the setup program.
 However, compiling OpenGL programs fails as the linker cannot find
 the GL libraries. Nor can I when I try looking for libgl.* and
 libglu.* in the usual locations. (libglut files are there).
 
 My questions: - have these files changed names / locations in the
 Cygwin heirarchy? - or does OpenGL-related files refer to other
 supplementary files but not to the main GL library files - if so -
 where can I find the GL lib files?
 
 Many thanks for any help on this.
 
 All the best,
 
 Suresh Keswani

You need to install the xorg-x11-devel package.  Note that the 
runtime libraries are called cygGL* and are part of the xorg-x11-bin 
package.  The files called libGL* are only the import libraries.

Phil



--
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/



RE: Checking if the X Server is running

2007-10-01 Thread Phil Betts
O. Olson wrote on Monday, October 01, 2007 1:49 AM::

   I still don't think I can get this to work. I tried
 this from the command line (and my file is in
 /usr/local/bin/sd.sh)
 
 C:\cygwin\bin\bash --login /usr/local/bin/sd.sh
 
 This still brings up the Fatal Error Window.
 

It's probably not the cause of your problem, but you should
never use ps | grep xxx to detect if a process is running.
This is because the grep process will (sometimes) detect 
itself and give you a false positive, and your xterm will 
try to start when there is no server running.

Since you already installed checkx, that's what you should 
be using, because (I believe) it actually connects to the X
server.

What you may be experiencing, is a race condition between
whatever process actually started X and the sd.sh.

I.e. if you initially start X using startxwin.bat (or similar),
and it hasn't got as far as starting the server when sd.sh 
checks if it's running, sd.sh will try to start the server.  
However, by the time sd.sh gets round to starting X, the 
first server has started, and therefore the second gives you 
the error.

Try something like this:


#!/bin/bash -l

# wait up to 5 seconds before deciding if X needs starting. You may
# need to up this to 10 seconds or more depending on your system.
wait_for_x ()
{
x_down=1
for (( i=0 ; i  5 ; i++ ));do
echo waiting for X
if checkx;then
x_down=0
break
fi
sleep 1
done
return $x_down
}

if ! wait_for_x;then
  # X not yet up
  run XWin  # see [1]
  wait_for_x# see [2]
fi

exec xterm


[1] I don't advise running XWin directly.  It is better to use 
startxwin.sh.  This ensures that the required environment variables 
are set up, and that any stray socket left from an earlier unclean 
exit is cleaned up.  The script does what it does for good reasons.
Of course the default startxwin.sh starts xterm anyway, so you may
want to edit it.  (IMHO it was a big mistake to start xterm in the 
server start scripts.  It confuses way too many newbies, who think 
the scripts are the proper way to start xterm, then complain when 
they get errors trying to open a second xterm.)

[2] The run command returns control to bash before XWin has finished 
initialising, so the wait is necessary to ensure that xterm isn't
started before the server is usable.


Phil

--
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/



RE: How to use the X clipboard

2007-09-18 Thread Phil Betts
Robert Kiesling wrote on Tuesday, September 18, 2007 3:02 AM::

 I need to set the X server option, emulate3Buttons, in order to use
 the X clipboard with the Cygwin system's mouse.  The FAQ tells me that
 I can add, -emulate3buttons ms, to the X server arguments.
 However, if I start the server with
 
   startx -- -emulate3buttons 10
 
 all of the X server's default arguments seem to get overriden.  I
 would like to know where are the X server resources are located so I
 can add this option without overriding the X server's default
 arguments.


You can create a script file .xserverrc in your home directory that is
called to actually start the server.  This could be something as simple
as:

  #!/bin/bash
  exec /usr/X11R6/bin/X $@ -emulate3buttons 10

Here, if you run startx without any arguments, $@ will contain the 
display number (e.g. :0), but not the default server arguments, so 
you would need to add them to the above line yourself. For more 
information, man xinit.

Alternatively, start XWin using startxwin.bat and edit that to add
your own options.  It's a much simpler script than startx, so you're 
less likely to go astray.

 On a related note, the server and display addresses default to
 127.0.0.1, and that limits clipboard use to clients on the local
 host.

Not true.  The display IS on the PC where you started it, therefore it
is on the localhost for clients started on the localhost.  The 
clipboard is available to all clients running on the server, wherever 
they may be.

 Because 
 this network gets its addresses through DHCP, I would like to know if
 there's a way to tell the X server beforehand what the network
 address is. I assume I can parse the output of Windows netstat after
 booting and add the address to /etc/hosts before starting the X
 server, but I would welcome any clues, hints, or suggestions how to
 go about telling the resolver library about the network address with
 a documented interface. 

There's no need for any of this.

Suppose the PC where you run the server is hosta and the remote box 
is hostb.  You start the server on hosta, where it is known as 
localhost:0.

You then log into hostb.  From there, the server would be known as 
hosta:0, so you would set DISPLAY=hosta:0.

If hosta is not set up in your nameserver, then you would need to
use hosta's IP address, however it's still not necessary, nor is it
advisable.  If you connect directly to the server as a named host (or 
IP address), you either need to use XDMCP or the insecure xhost to 
allow access to your server from hostb.  The much preferred way is to 
use ssh with trusted X11 forwarding instead.

To do this, you log into hostb using:
  ssh -Y [EMAIL PROTECTED]

You need to ensure that $DISPLAY is set BEFORE you run ssh.  You can 
ensure this by running ssh like this:
  DISPLAY=localhost:0 ssh -Y [EMAIL PROTECTED]
However, if you start it from a cygwin shell, $DISPLAY should already
be set correctly.

On hostb, you will find that ssh has set up the DISPLAY to _look_ 
like it is connecting to a server on hostb - i.e. it will be 
localhost:10.0 or similar. Do not change this because it looks wrong.
It simply means that ssh has opened a port on hostb (in this case 
6010), to which hostb's clients connect.  Traffic on this port is 
forwarded over the secure link to hosta's port 6000.

For more information (including what you may need to set up to
enable X11 forwarding), consult the FAQ:
http://x.cygwin.com/docs/faq/cygwin-x-faq.html#remote

Finally, this is the wrong list for X related questions. Check out
http://cygwin.com/lists.html

I've redirected replies to the correct list.

Phil

--
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/



RE: Problems starting X and a solution to be appended to the FAQ

2007-09-17 Thread Phil Betts
Martin Sebastian Wain wrote on Friday, September 14, 2007 4:45 PM::

 I was going crazy with the fixed font error... to later find out
 (somewhere) that it was caused by the DOS/Text mode (\r\n) in the
 instalation of cygwin.
 With a textmode mounted root, it seems the fonts fail to load, and the
 diagnostic from X isn't very helpfull.
 
 I'm a newbie with this, and it was hard enought to figure out. If you
 append it to the FAQ maybe someone else doesn't have to suffer from
 this. 
 
 -Martín

It's not obvious which FAQ you looked at.  Did you read this in 
the X FAQ?

http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-error-font-eof

If you did, and followed the instructions, then even if your 
/usr/X11R6/lib/X11 is on a text mode mount, setup *should* have 
created a binary mount for the fonts directory.  At least, that's
what it used to do, but I've a suspicion it may have been removed.

If you followed those instructions and that didn't happen, then the 
FAQ should probably have a third reason added to question 8.4,
worded something like this:

| 3. /usr/X11R6/lib/X11/fonts is on a textmode mount.
|
| Run the command:
|
|   mount -M /usr/X11R6/lib/X11/fonts
|
| If it is shown as textmode, you should do the following:
|
|   umount /usr/X11R6/lib/X11/fonts
| 
| If this reports no such file or directory, you can safely ignore 
| this - it just means that the directory wasn't mounted.
|
|   rm -rf /usr/X11R6/lib/X11/fonts
|   mkdir /usr/X11R6/lib/X11/fonts
|   mount -b $(cygpath -m /usr/X11R6/lib/X11/fonts) /usr/X11R6/lib/X11/fonts
|
| If the last command fails with an error message stating 
| insufficient rights, try:
|
|   mount -b -u $(cygpath -m /usr/X11R6/lib/X11/fonts) 
/usr/X11R6/lib/X11/fonts
|
| Then re-run setup.exe.
|
| For each of the following packages, if they are marked Keep, then select 
| Reinstall, otherwise leave them as they are:
|   * xorg-x11-f100
|   * xorg-x11-fcyr
|   * xorg-x11-fenc
|   * xorg-x11-fnts
|   * xorg-x11-fscl

In case any of the above lines have been wrapped, lines not starting
with | are supposed to be on the end of the preceding line.

I don't know if anyone currently maintains the cygwin-X FAQ, so if it
doesn't appear there, hopefully this reply will be found by searching 
the archives.

Phil

--
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/



RE: Xdmcp too slow with SOME Linux accounts.

2007-09-11 Thread Phil Betts
Michael Giroux wrote on Tuesday, September 11, 2007 2:25 PM::

 Since I'm only starting one client (Eclipse) the others I have no way
 of knowing what the others are.

Try xlsclients



--
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/



RE: Modal windows

2007-06-07 Thread Phil Betts
Michel Bardiaux wrote on Thursday, June 07, 2007 4:01 PM::

 We have a MOTIF app that works correctly when displayed on a debian
 sarge (that is, using xfree) or win2k+exceed8.0.
 
 With cygwin-xfree on winxp, however, the modal windows do NOT stay on
 top of the main application window, the main comes up whenever one
 clicks in it.
 
 In all 3 cases, the client libraries are linux/xfree, at exactly the
 same version.
 
 Is that behavior
 
 - by design?
 
 - a known bug?
 
 - due to a user error?
 
 - a bug never reported yet?
 

Assuming you're using multiwindow mode, each X window is rendered in a
different Windows window.  Unfortunately, modality in X is not the same 
as in Windows.  In X, the display (server), window manager, and client 
are separate processes, and have clearly defined roles.  This is why 
it's possible to move the parent of a modal window, because the client 
is not responsible for its window's placement.  In Windows, the client
process is responsible for handling windows movement events, so the
entire parent window, including the frame is effectively iced.  I think 
the decision was taken that rather than inflict Windows' arguably 
broken concept of modality on an unsuspecting X process, all X windows 
are created as non-modal Windows windows.  The modality at the client
level is still maintained (i.e. you can't do anything in the parent),
but you will still be able to move the parent window about.

If you really need full X-style modality, you should be able to use
one of the other modes (rootless or fullscreen) and run an external
window manager.  The only problem with this IIRC, is that all X 
windows are really just images in a single Windows window, so 
clicking on any X window brings all X windows to the top.

Note that Windows' notion of stacking order is completely broken.
Always-on-top windows are frequently rendered on the bottom.  This
includes modal windows, which  is just great if they are rendered
completely beneath the now disabled parent window!


--
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/



RE: Startxwin.bat fatal error in Windows Vista

2007-05-15 Thread Phil Betts
Allen Rongone wrote on Monday, May 14, 2007 8:29 PM::

 I've seen this before under Windows XP and it was due to the fact
 that the previous user was the owner of the /tmp/.X11-unix directory
 and no one else had permissions to delete the X0 file nor were they
 able to remove this directory. I just gave Everyone Full Control to
 the /tmp directory and made it inheritable, that solved the problem.
 However, now under Vista, Everyone no longer gets propagated to the
 /tmp/X11-unix directory so when another user runs startxwin.bat it
 cannot delete the X0 file and remove the sud-directory.
 

The usual workaround for this is to make /tmp a user mount, i.e. each
user has their own /tmp.

E.g.:  mount -u -b $APPDATA\\tmp /tmp

If that doesn't work, there's either a program already using port
6000, or your firewall/antivirus is blocking access to it.

X uses port 6000 + the display number, so if another program's using 
port 6000, you can start X on say port 6002 with XWin :2.

--
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/



RE: XWin 6.8.99.901-4-Problems with fonts and clipboard module - cygcheck.out (0/1)

2007-05-11 Thread Phil Betts
Robert Neville wrote on Thursday, May 10, 2007 10:07 PM::

 After reinstalling X and all fonts, I mounted the font path and still
 receive this error. 
 
 Could not init font path element /usr/X11R6/lib/X11/fonts/CID/,
 removing from list!

This is not an error, it is just a warning.  If you had searched the
archive you would have known this.  Everyone will get this in their 
log unless they've explicitly installed fonts into the CID directory.

Your problem has nothing to do with fonts.

 winProcSetSelectionOwner - Clipboard not yet started, aborting. 
 winProcSetSelectionOwner - Clipboard not yet started, aborting.
 winClipboardProc - winClipboardFlushWindowsMessageQueue trapped
 WM_QUIT message, exiting main loop. winClipboardProc - XDestroyWindow
 succeeded. 
 
 winClipboardIOErrorHandler!

This appears to be your problem.  My guess is that either:

a) something is trying to communicate with the X clipboard before 
it has finished its initialisation.  If this is the case, you might
find my version of startxwin.bat useful (attached, just save  rename 
it).  This waits for a key line to appear in the XWin log file before
trying to launch any client programs.

b) you have some firewall/antivirus/other software that is interfering 
with the communication with the X clipboard.  The advice is generally 
to uninstall such software. Just disabling them still leaves them 
hooked into the system.  Dave Korn has been compiling a list of the 
known offenders in the cygwin-talk thread The Big List of Dodgy Apps.
Search the mail archives to see if you have any of the mentioned 
programs.

If none of the above works, you could always try the obsolete xwinclip,
which is a standalone clipboard handler.  To install it via cygwin 
setup, you need to uncheck the hide obsolete and administrative 
packages option.  To use it, you need to remove the -clipboard option 
from the XWin command line, start the X server, then enter the command 
run xwinclip.  This is not particularly reliable, and IIRC some key 
changes regarding data conversion are missing from it, but at least 
when it crashes, it doesn't cause X to die too.  Note that because 
this package is obsolete (and has been for quite some time), you 
cannot expect any support for it.

HTH,

Phil
@echo off
SET DISNO=0
SET DISPLAY=127.0.0.1:%DISNO%.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=C:\cygwin
SET CYGWIN_TMP=C:\cygwin\tmp
SET CYGWIN_USR=C:\cygwin\usr

SET PATH=%CYGWIN_USR%\X11R6\bin;%CYGWIN_ROOT%\bin;%CYGWIN_USR%\local\bin;%PATH%

SET XAPPLRESDIR=/usr/X11R6/lib/X11/app-defaults
SET XCMSDB=/usr/X11R6/lib/X11/Xcms.txt
SET XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
SET XNLSPATH=/usr/X11R6/lib/X11/locale

REM
REM Cleanup after last run.
REM

if not exist %CYGWIN_TMP%\.X11-unix\X%DISNO% goto CLEANUP-FINISH
attrib -s %CYGWIN_TMP%\.X11-unix\X%DISNO%
del %CYGWIN_TMP%\.X11-unix\X%DISNO%

:CLEANUP-FINISH
if exist %CYGWIN_TMP%\.X11-unix rmdir %CYGWIN_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 -engine engine_type_id
REM  Override the server's automatically selected engine type:
REM 1 - Shadow GDI
REM 2 - Shadow DirectDraw
REM 4 - Shadow DirectDraw4 Non-Locking
REM 16 - Native GDI - experimental
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, 

RE: FW: Wide char support on cygwin

2007-04-30 Thread Phil Betts
Arthi N (RBIN/ECM2) wrote on Friday, April 27, 2007 10:28 AM::

 Thank you for the reply, from this reply, I shall concentrate more on
 cygwin.
 
 But I have included the needed header inspite of that I get the error
   !)  error: ISO C++ forbids declaration of `wostream' with no
 type
   2)  error: `std::wostream' should have been declared inside
 `std' 
   3)  error: `wostream' is neither function nor member function;
 cannot be decl
 ared friend
 
 1)what could be the problem.
 
 2) I had downloaded the latest cygwin from the net and installed. Is
 there any other library to be included while installation
 
 3) How do I know which version of STL is getting used in cygwin.
 
 Thanks and Regards
 Arthi

This is off topic for this list as it has nothing to do with X, you 
should ask again on the main cygwin list.

--
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/



RE: Changing port number

2007-04-13 Thread Phil Betts
Zxarr wrote on Friday, April 13, 2007 4:26 PM::

 Well, I tried using the -screen 2 option, is that what you were
 thinking?  I 
 still get the same error.

Not surprising, because that wasn't the solution you were given ;-)

 
 Command:
 run XWin -multiwindow -clipboard -silent-dup-error -trayicon -screen 2

run XWin :2 -multiwindow -clipboard -silent-dup-error -trayicon

is what you want.


--
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/



RE: xinitrc final command with -multiwindow

2007-03-21 Thread Phil Betts
J. David Blackstone wrote on Wednesday, March 21, 2007 2:29 PM::

 Jason wrote:
 
 I don't know that this helps, but I use the stock startxwin.bat batch
 file Cygwin/X shipped with. Using that batch file, I am free to close
 down the Xterm that it starts up, without X dying off.
 
   That seems to function by running the X server directly rather than
 running xinit.  Anyone know what I'll miss out on by skipping xinit? 
 (Other than the problem I have with needing to force the xinit
 process to stick around?)  I will seem to lose the ability to run
 custom stuff in my .xinitrc file, but I think I'd be customizing
 startxwin.bat/.sh anyway so that wouldn't be an issue I suppose. 

That's what I do.  Just convert anything you need from the xinitrc to
run in the .bat file, or put them in a separate script and run it via
bash.

Make sure you don't change startxwin.bat itself, but work on a copy
instead.  If you change the original, the next update will overwrite 
your changes (you might detect the voice of bitter experience here).

 The only caveate is that this prevents a attendentless shutdown. When
 you try to shut Windows down, an confirmation will pop up asking if
 you are sure you want to disconnect all X clients. Even if there are
 no X clients left running. Windows then sits and waits indefinitely
 for your answer.
 
   You get the same thing with startx.

There's a registry setting to force programs to quit on shutdown/logoff:
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/rege
ntry/34615.mspx?mfr=true

True to form, MS only tell half the story in their documentation.  They
don't say whether the timeouts are honoured before forcing the shutdown,
so a shutdown may be immediate, even if an app is prompting you to click
OK to cancel the missile launches!  You may want to test this first.


Phil

--
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/



RE: Can't get Cygwin/X to run on my Windows XP

2007-03-19 Thread Phil Betts
Christopher Faylor wrote on Monday, March 19, 2007 11:07 AM::

 On Sun, Mar 18, 2007 at 08:29:40PM -0700, hendrau wrote:
 Christopher Faylor-8 wrote:
 On Sun, Mar 18, 2007 at 07:02:37PM -0700, hendrau wrote:
 
 Hi Christopher, I did intentionally put ''s in my messages, they
 just sort of appear after I post my message. I don't know how to
 avoid it. 
 
 I think you should try a little harder.
 
 cgf

Translation: don't use nabble

--
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/



RE: Setting xterm title over ssh problems

2007-01-02 Thread Phil Betts
pgrodt wrote on Tuesday, January 02, 2007 3:59 PM::

 Forgive me if this is not really a cygwin question, I'm uncertain.  I

It isn't really, but...

 am spawning xterm instances while ssh fowarding a linux box to
 cygwin-xfree, and am unable to set the title of these windows.  I
 first tried calling xterm with the '-title' argument, which works for
 about a 10th of a second and then resets to $CWD.

The fact that your title appears momentarily, before being changed 
suggests that either $PS1 or $PROMPT_COMMAND already includes a command
that sets the title.

Try setting PS1='\$ ' and unsetting PROMPT_COMMAND, then try again.


Phil

--
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/



RE: modification of startx.bat not work

2006-07-26 Thread Phil Betts
Dirk Schleicher wrote on Tuesday, July 25, 2006 9:48 AM::

 Am Tue, 25 Jul 2006 03:16:51 -0500
 schrieb René Berber [EMAIL PROTECTED]:
 
 [snip]
 Correct, the way XWin is started using startxwin.bat does make the
 whole server execution depend on the xterm, so when the xterm is
 closed XWin terminates. 

This is not true.  It's startx (or rather, xinit) that closes the 
server on exit.  You can safely remove the xterm line from startxwin.bat
(or startxwin.sh) and the server just keeps going.

 That can be changed easily by using startx (instead of startxwin.bat)
 and creating a file in your home directory named .xsession like this:
 
 #!/bin/sh
 #
 # FILE: $HOME/.xsession
 
 # exec SylpheedClaws
 
 /usr/bin/sylpheed-claws  scpid=$!
 
 # Now wait for program to terminate
 
 wait $scpid
 exit 0
 
 I try it. The only thing is that if SC is close the Xserver close too.

That's to be expected.

 What I try to get is one script where I can start a Xserver without
 any bash window and SC.
 
 Again to start this I have to start a cygwin bash shell. I like to
 start SC without a shell 

Your problem is that you're using xinit via startx.  The last command 
executed is intended to be a window manager.  It is designed so that 
when the window manager dies, X is shut down.  This is (usually) what 
one wants.  Unfortunately for users of startx, XWin by default uses its 
built-in window manager, so in order to keep X alive some other process 
must be started.  An xterm was chosen IIRC because most users will want 
a shell at some point in their session.

If you use startxwin.* to start X instead, you'll find it doesn't 
require any process to hang around.  The distributed files start an 
xterm, but you can safely remove that line.

Please don't be tempted to try hacking startxwin.* to start sylpheed.
It's bad practice to use a server initialisation script to start client
programs.  I would guess that at least half of the fault reports on 
this list are from people who try to use startx* to run xterm, then
complain that they get a duplicate invocation error.

It's much better to use startxwin.bat to start XWin once (you can put a
shortcut to startxwin.bat in your Windows startup folder), then have a
shortcut to start your client programs such as sylpheed.

If you want to start sylpheed without explicitly starting XWin, you can 
write a small script to use checkx to see if the server is running and
if it isn't, start it.

E.g.

--- /tmp/xdemo.sh -
#!/bin/bash
export DISPLAY=:0
/usr/bin/checkx || /usr/X11R6/bin/startxwin.sh
exec /usr/X11R6/bin/xeyes
--

You can then run this script from a shortcut where the target is:

C:\cygwin\bin\run.exe /bin/bash -c /tmp/xdemo.sh

You would need to remove the line from startxwin.sh that starts xterm,
which means you should really use a copy of it, otherwise the next 
time you update X, you'd be likely to lose your change.

HTH

Phil
-- 

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the H.E Information Systems Ltd. 
Tel:0161 866 9066
Web:  www.heis.co.uk

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.clearswift.com
**


--
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/



RE: OpenGL under XFree; Server config app

2006-03-22 Thread Phil Betts
Berndt, Jon S wrote on Tuesday, March 21, 2006 3:36 PM::

 Two questions:
 
 1) I assume that the plain vanilla XFree server distributed via a
 Cygwin install does not natively support OpenGL. Regardless, how
 would I enable support for OpenGL, if possible, and/or where can I
 find out more about OpenGL support under CygWin/XFree. I'd like to
 run an OpenGL application on a remote machine and have the display on
 my local PC running XFree. 

Try installing the xorg-x11-xwin-gl server.  It's marked as
***EXPERIMENTAL***, but I've been running it without problem for months.
I've not done too much extreme GL stuff, but what I've  tried all seems
to work.  You'll also need the opengl package for your GL clients.

If you have problems with the native (i.e. accelerated) GL server, you 
can use the Mesa package with the non-GL XWin as a fallback.

 
 2) Is there a stable XFree server configuration application that
 controls the various X server characteristics? 
 

Emacs and vi (yes I use both - we're not all editor bigots) do just
fine for me ;)

I'm not sure what characteristics you had in mind.  The server startup
parameters are documented in /usr/X11R6/bin/startxwin.bat (which may be
moved to /bin soon).  This is the file that you need to edit.

Once X is running, xset, xmodmap etc. are your friends.  You can add 
these to the end of startxwin.bat.

I assume what you were really after was a GUI X launcher application.
There was talk of such a beast quite a while back, but I think it was
shelved because it would need to be a native Windows application and
would therefore not sit well within cygwin.  I don't know if any
further work has been done in this direction.

Phil
-- 

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the H.E Information Systems Ltd. 
Tel:0161 866 9066
Web:  www.heis.co.uk

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.clearswift.com
**


--
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/



RE: windows XP : cygwin -X server not opening

2006-03-15 Thread Phil Betts
Alexander wrote on Wednesday, March 15, 2006 11:32 AM::

 I thought you're off working for a real company.
 The lines I was refering to are:
 
 MIT-SHM extension disabled due to lack of kernel support
 XFree86-Bigfont extension local-client optimization disabled due to
 lack of shared memory
 And this imo does cause XWin to fail.
   ^^^

Your opinion is worth how much squat?  Diddley?

I have been running XWin without shared memory support for years 
without fault.  In fact, my experience is that it is MORE reliable
without it.

Since you are so keen on urging others to read the documentation, I
suggest you do so yourself before criticising others.

If you had done so, you would have seen in
http://x.cygwin.com/docs/ug/using-shared-memory.html that:

~ XWin.exe will not use Shared Memory if the CYGWIN does not contain
~ the server keyword. Starting XWin.exe with
~   CYGWIN=server XWin.exe 
~ will enable Shared Memory support if the cygserver service is running.

Shared memory use is OPTIONAL.  This is also implied by the log entry.
There have also been numerous references to this on this list (which 
is archived and searchable).


Phil
-- 

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the H.E Information Systems Ltd. 
Tel:0161 866 9066
Web:  www.heis.co.uk

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.clearswift.com
**


--
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/



RE: would you mind answering this problem?

2006-03-14 Thread Phil Betts
Yoshida akira wrote on Tuesday, March 14, 2006 11:33 AM::

 i had an error in attached file using cygwin.
 would you mind answering how i can solve this problem ?
 
 --
 1. i set erroneous PATH statement in .bashrc :
export PATH='c:/Program Files/Java':$/{PATH}
:{G4INSTALL}/bin/${G4SYSTEM} 2. start cygwin and $ startx

In cygwin, the colon is used to separate path elements, so 
c:/Program Files/Java actually adds two paths c and 
/Program Files/Java, neither of which you want.

Instead what you need is the Posix path which will be 
/cygdrive/c/Program Files/Java

e.g.:
export PATH=/cygdrive/c/Program
Files/Java:${PATH}:${G4INSTALL}/bin/${G4SYSTEM}

(assuming that ${G4INSTALL}/bin/${G4SYSTEM} is a valid Posix path)


Phil
-- 

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the H.E Information Systems Ltd. 
Tel:0161 866 9066
Web:  www.heis.co.uk

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.clearswift.com
**


--
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/



RE: Problem with cygfreetype-6.dll

2006-02-28 Thread Phil Betts
Dick Jay wrote on Tuesday, February 28, 2006 12:21 AM::

 I recently installed cygwin 2.510.2.2 (that's the version displayed
 by the setup program) including the X11 stuff.

That's only the version number of the setup.exe you're using.  Each 
package you install has its own version number which is one of the
reasons http://cygwin.com/problems.html requests faults be reported 
with the output of cygcheck -srv attached.  (Among other things this
lists each installed package and its version).

 cygfreetype-6.dll was not found. I've searched and found that file as
 part of package libfreetype, but that's not one of the packages that
 the setup program lists.

The first place to check for questions like this is
http://www.cygwin.com/packages/

Entering cygfreetype-6.dll into the search box reveals the package to 
be libfreetype26 (current version is 2.1.9-1).  This should be at all 
cygwin mirrors.

Phil
-- 

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the H.E Information Systems Ltd. 
Tel:0161 866 9066
Web:  www.heis.co.uk

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.clearswift.com
**


--
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/



RE: x-term font

2006-01-25 Thread Phil Betts
Igor Peshansky wrote on Tuesday, January 24, 2006 3:04 AM::

 On Mon, 23 Jan 2006, thad wrote:
 
 how can i change the font size of xterm?
 
 You need to use the -fn option to pass the name/size combination for
   the font you want. Igor

Alternatively, ctrl-right-click once xterm is running to choose from a
menu of font sizes.

The -fn option is documented in the xterm man page, but the keystroke
for the menu appears to be missing from the MENUS section.


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**

--
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/



RE: Pseudo Colors on Solaris

2005-09-23 Thread Phil Betts
On Thursday, September 22, 2005 4:34 PM, James.Bassett wrote:

 0 0 but white was also red 255 0 0).  When I do not do ether, I can sort
 of see the image but it is very very dark.

Don't do ether, do LSD.  The colours will still be wrong, but they'll
be really bright and you'll get far more than 256.

(Sorry, couldn't resist - I've got that Friday feeling)

Phil
-- 


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**

--
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/



RE: Mouse scroll wheel acts as left arrow/right arrow.

2005-09-01 Thread Phil Betts
On Thursday, September 01 at 01:35, Brian Keener wrote:
 I have a microsoft mouse with a scroll wheel that scrolls both up and 
 down, and left/right.  The up/down scrolling action seems to act as 
 left/right arrows.
 
 In firefox, using the scroll wheel goes back/forwards a page, for an 
 example.
 
 Any idea what to do to fix this?
 
 Brian K

If this behaviour is consistent across all X applications, you could
try using xmodmap:

First, use xev to identify which button numbers are associated with the
up, down, left  right movements.  Let's say these are 4, 5, 6  7
respectively.  If you want the up button swapping with left, and
down swapping with right, you would enter:

xmodmap -e pointer = 1 2 3 6 7 4 5

you can use xmodmap -pp to verify the change.  You should see
something like this:

$ xmodmap -pp
There are 7 pointer buttons defined.

PhysicalButton
 Button  Code
1  1
2  2
3  3
4  6
5  7
6  4
7  5

I can't guarantee that this will work with XWin, but this technique
works for xorg on Linux, so it's likely to be OK.

HTH

Phil
-- 


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**

--
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/



RE: How to have more than one X display?

2005-09-01 Thread Phil Betts
On Thursday, September 01 at 2:09, Soong, SylokeJ wrote:
 I had tried both
 
 SET DISPLAY=127.0.0.1:1.0
 
 SET DISPLAY=127.0.0.1:0.1
 
 I was guessing to recall which way it could be
 to change the display number and had to decide
 which to copy and paste into the email.
 
 Either way gives me the same the same message
 and similar logs.

I think the problem is the use of -screen 1.  I've never used the
-screen option myself, so apologies if I'm way off the mark, but I seem
to recall that it was introduced to allow a single X server to use
more than one physical display.

If this is what you are trying to achieve, you need to start a single
X server with both -screen 0 and -screen 1.

If you really do want two displays, try dropping the -screen option (or
use -screen 0 for both), and use the :1.0 form for the second DISPLAY.

HTH

Phil
-- 

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**

--
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/



RE: logout from gnome-session over ssh

2005-07-11 Thread Phil Betts
On Friday, July 01, 2005 4:30 AM, Ariel Millennium Thornton wrote:

On Thu, 30 Jun 2005 14:35:33 -0400 Jerome Asselin wrote:

 From a cygwin bash shell, I run these commands:
 
 Xwin 
 export DISPLAY=:0
 ssh -Y remoteserver -l user gnome-session
 
 This works fine until I try to logout from gnome-session. Logging out
 doesn't kill nautilus nor ssh (nor firefox). I have to manually kill
 the ssh command to terminate the gnome-session.
 
 How can I make it so that I can cleanly logout from gnome-session?
 
 
 This seems like a bug with ssh.  I get the same thing ssh'ing from
Linux
 to Linux and from Windows to Linux.  The problem is that the ssh
session
 won't end until every process started by it ends.  If you're using ssh
 as the client command for starting the X server, one workaround is to
 log out normally, wait until only the persistent processes are
running,
 then hit Ctrl+Alt+Backspace to kill the server.
 
 If someone knows the real solution, I'd like to know it too.  What I
 present is only a workaround, not a solution.
 
 -ArielMT

IIRC, my old Mandrake installation used to have, somewhere in its
labyrinthine set of login scripts, a shopt huponexit on with a
comment to the effect that it fixed the ssh logout problem.

You could try putting something like the following in your
~/.bash_profile (assuming bash is your login shell in /etc/passwd)

  if [ -n $SSH_CONNECTION ];then
shopt huponexit on
  fi

I'm not sure how much you can rely on the SSH_CONNECTION variable
being set, YMMV.

Phil

-- 


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**


RE: Popups popping through windows using built-in rootless WM

2005-05-20 Thread Phil Betts
On Friday, May 20, 2005 10:51 AM, Alexander Gottwald wrote:

 Anyway, tooltips which appear on top of any other window are not a bug
in my
 opinion. They appear topmost in windowed mode too.

The problem is not that the popups appear on top.  It is that the
mouse position reports are passed to the obscured application window
(even if its minimised).

I *think* this is only a problem if there is another X window that is
higher in the stacking order than the focussed non-X window.  The
second X window doesn't have to overlap the non-X window.

I use the VirtuaWin virtual window manager which IIRC works by
minimising the windows that are on the hidden desktops.  This bug
means that windows on hidden desktops pop up tooltips - very
confusing!

I think the problem is that X gets confused about the stacking order
when X windows are mixed with non-X windows.  This might be a hangover
from the original rootless mode where all X windows were at the same
stacking level as far as Windows was concerned (i.e. a non-X window
could never sit between two X windows)

A closely related issue which may throw light on the problem is that
an X window on a hidden desktop displays in the client area of an X
window on the active desktop if their screen coordinates overlap, and
if the hidden window is logically higher in X's stacking order.

To reproduce this, you'll need VirtuaWin, available from
http://virtuawin.sourceforge.net

The steps are:
- Switch to Desk1
- Open an X application (call it X1)
- Open a non-X window (call it W1) to at least partially obsure X1
  (the key point is that X1 must not be on top)
- Switch to Desk2
- Open an X application (call it X2) and position it so that it would
  overlap X1 if they were on the same desktop.
- Open a non-X window (call it W2) to at least partially obsure X2
- Bring X2 to the front (thereby ensuring that it's above X1)
- Bring W2 to the front and keep the pointer in part of W2 that is
  outside of both X1 and X2.  (I think the main thing here is that
  neither X window should have, or get, the focus when the desktops
  are switched.  I use the X-mouse tweak so the window under the mouse
  would be focussed) 

The logical stacking order is now (bottom to top): X1, W1, X2, W2

- now switch back to Desk1

The client area (but not the frame) of X2 that would overlap X1 if
they were on the same desktop is displayed on top of X1.

Note that the displayed part of X2 is actively drawn over the top of
X1, as opposed to just being left behind.  Also, moving the mouse over
the widgets of X2 (e.g. the scrollbar) causes the cursor to change as
if X2 was genuinely on top.

Whilst the above seems an unlikely sequence of events, in practice
it's very easy to get this happening, but it's not easy to predict.

If you'd like me to test any fix before releasing it into the wild,
I'll be glad to help after the weekend.

Phil


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**


RE: rxvt in search of libX11.dll

2005-05-20 Thread Phil Betts
On Friday, May 20, 2005 3:25 PM, Didier BRETIN wrote,
 I launch a find / -name 'libX11.dll'  on my cygwin installation
 and this file is not existing.

 What is the package for this library I need to install ?

You need the XFree86-lib-compat package.

For future reference, you can find this sort of information using the
search page on the cygwin site:
  http://cygwin.com/packages/

Phil

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**


RE: Multiple XWin.exe programs loading and no xterm

2005-04-07 Thread Phil Betts
On Thursday, March 31, 2005 7:10 PM, Alexander Gottwald wrote:
On Thu, 31 Mar 2005, Armbrust, Daniel C. wrote:

 Because I execute the entire script twice, since the first
 execution doesn't bring up any xterms. 
 
 Still not sure what is causing it to take so long to launch the
 xwin.exe.
 
 Can I set the timeout values on the xterm's with a flag?

 no. Use sleep to delay starting the xterms

When I first started using Cygwin/X, I found that XWin.exe returns
before it is really ready for business.  This means that commands in
startxwin.bat/whatever, such as xhost or xmodmap, try to communicate
with the server while it is still initialising.

To get around this, I added the following kludge to my startxwin.bat.

It is essentially the same as the sleep solution, except that it only
sleeps for as long as is necessary.  If X is started by Windows
startup, all manner of delays may mean that the sleep time that works
90% of the time will be too short 10% of the time.  It works by
waiting for the line to appear in the log file that announces its
success.

This hack has to go *immediately* after XWin.exe is started.  You'll
probably find that the line to set LASTLINE has become wrapped.
Everything from SET to the second  is a single line.

People using startx will need a similar solution, but will be able to
use more elegant code instead of the unholy mess that CMD.EXE forced
me to write!

---8

set XWIN_LOG=%CYGWIN_TMP%\XWin.log
set LASTLINE=XOpenDisplay () returned and successfully opened the
display.
set /a COUNT=0

:WAITFORLOG

echo ...Waiting for X log file...
sleep 1
set /a COUNT+=1
if not exist %XWIN_LOG% goto WAITFORLOG
if %COUNT% GEQ 10 goto WARNFINISHOFF

set /a COUNT=0

:WAITFORIT

echo ...Waiting for X to complete initialisation...
sleep 1
set /a COUNT+=1
if %COUNT% GEQ 30 goto WARNFINISHOFF
%SYSTEMROOT%\system32\find.exe %LASTLINE%  %XWIN_LOG%  nul
if errorlevel 1 goto WAITFORIT
echo X started OK
goto FINISHOFF

:WARNFINISHOFF

echo WARNING: X doesn't appear to have started cleanly
sleep 5

:FINISHOFF

--8---

Not pretty, but it WFM.

Note1: %CYGWIN_TMP% is the location of cygwin's /tmp as returned by
the command cygpath -d /tmp.

Note2: The actual value used for LASTLINE should be taken from your
own XWin.log following a successful start.  As its name suggests, it's
the last line from the file.  (I.e. AFTER XWin.exe has really
finished, but BEFORE any clients have been started)

Note3: it uses windows' find.exe rather than cygwin's grep, because
grep isn't (or wasn't) part of a minimal installation.

Note4: if you hack startxwin.bat, save it under a different name
e.g. mystartx.bat otherwise, the next time you update X, you'll lose
your changes (you may detect the voice of bitter experience here ;-)

Note5: There are too many notes for such a short bit of code!

Of course, the *real* solution is for XWin to return only when it has
completed ALL of its initialisation.

My home PCs are now certified 100% Microsoft free :-), and there is
no chance of me getting time to look at this at work, so unless
someone else is prepared to do it, the above will have to suffice.

Anyway, the above WFM, it may help solve some of the other problems
people have been having with start-up.

HTH,
  Phil
-- 


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**


RE: Multiple XWin.exe programs loading and no xterm

2005-04-07 Thread Phil Betts
On Thursday, April 07, 2005 1:21 PM, Alexander Gottwald wrote:

On Thu, 7 Apr 2005, Phil Betts wrote:

 People using startx will need a similar solution, but will be able to
 use more elegant code instead of the unholy mess that CMD.EXE forced
 me to write!

 No. Startx uses xinit and xinit tries to connect to the xserver in the
way 
 a client would do and repeats it until the server is ready.

I'll bow to your superior knowledge, it's about 10 years since I last
used startx in anger, and that was on Linux, where the X servers only
exit on closedown.  However (I'm just speculating here) the problems I
was having with xhost/xmodmap were partly that the client programs
thought they had executed correctly (i.e. no errors were raised and
the return code was zero).  Is it possible that xinit similarly thinks
all is well?

 Of course, the *real* solution is for XWin to return only when it has
 completed ALL of its initialisation.

 XWin does not return or anything like that. It's the way the process
start 
 works. You can either start a program and wait until it finished or
continue
 right after the program started running. There are no simple
mechanisms to 
 send notice about finished startup.

Reading between your lines, I assume you're saying that XWin is a
regular Windows program, and it's all down to the way that WinMain is
called.

On Unixen, one would initialise first and then fork, to detach the
server (or, more likely, leave it to the shell to place the server in
the background), but I guess this is not practicable in a Windows
environment.

I'm happy with my hack for now, so I'm certainly not pushing for a
change.

Feel free to incorporate it into the distributed startxwin.bat if you
want, although if you do, you may need to change the server to output
a key phrase (e.g. XWin Initialisation Complete) that is always
output regardless of how it was started, instead of my more ad-hoc
approach.

Cheers,

Phil

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**


RE: bad installation ?

2005-03-09 Thread Phil Betts
On Wednesday, February 23, 2005 6:23 PM, Banibrata Dutta wrote:
 Could anybody explain the following behaviour or Cygwin and startx
 in Cygwin...
 
 capture
 
 Your group is currently mkpasswd. This indicates that
 the /etc/passwd (and possibly /etc/group) files should be rebuilt.
 See the man pages for mkpasswd and mkgroup then, for example, run
 mkpasswd -l [-d]  /etc/passwd
 mkgroup  -l [-d]  /etc/group
 Note that the -d switch is necessary for domain users.

 snip

 Could someone please help ?

Did you actually *read* what you posted?

It tells you all you need to know.

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**


RE: spelling correction

2004-10-06 Thread Phil Betts
Alexander Gottwald wrote:
On Thu, 30 Sep 2004, Thomas Munro wrote:

 Hi,
 
 On this page:
 
 http://x.cygwin.com/docs/faq/cygwin-x-faq.html
 
 there is a heading:
 
 11.4. Whom holds the copyright on the Cygwin/X source code?
 
 It should of course be Who.
 
 Sorry to send such trivial feedback to this list but your index
 page give this address for such problems!

http://www.cygwin.com/ml/cygwin-xfree/2002-01/msg00166.html

The links referred to in Harold's message only serve to prove him
wrong.  Yes, even the great can occasionally have an off day ;-)

I only mention this because the vehemence of Harold's rebuttal is
likely to persuade others that he is correct, and it wouldn't do to
perpetuate the confusion.

Simply follow the advice in the Guardian's entry:

  If in doubt, ask yourself how the clause beginning who/whom would
  read in the form of a sentence giving he, him, she, her, they or
  them instead: if the who/whom person turns into he/she/they, then
  who is right; if it becomes him/her/them, then it should be
  whom.

In other words, him holds the copyright is nonsense, so whom holds
the copyright is nonsense.  he holds the copyright is fine, so the
correct form is who holds the copyright.

Linguists generally call this sort of incorrect usage hypercorrect.
This may be the source of Harold's confusion.  The term simply means
wrong, but from the best intentions, and does not mean very
correct.  Compare this with over-correct: if the back end of your
car steps out and you over-correct the mistake, you *will* hit a tree,
just not the one you were originally avoiding!

Picks up soapbox and walks off into the sunset...

  Phil

-- 


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**



RE: Xwin shutdown command line option

2004-09-22 Thread Phil Betts
Alexander Gottwald wrote:
 On Wed, 22 Sep 2004, Vijay Kiran Kamuju wrote:

 Hi
 
 is there a way to shutdown the Xserver from command line

 No. 

This should work:
 
kill -9 `pidof /usr/X11R6/bin/XWin`

Note that case is important here.  It might be better to use a
different signal, SIGHUP seems like the most polite option, but I
don't know if XWin supports this.


Phil Betts


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**



Start script changes

2004-04-07 Thread Phil Betts
Harold,

Since /usr/X11R6 is apparently an abomination, you'll have no qualms
about moving run.exe into /usr/bin (alias /bin), right? ;-)

You can say yes now and skip to the last two paragraphs, it's mostly
justification for the change.  However, if you need more convincing...

I've got a startxwin.bat that makes the same assumption about the
location
of /bin as cygwin.bat i.e. it (more or less) tries to do the following:

  C:
  chdir \cygwin\bin
  set CYGWIN=tty
  bash -lc /usr/X11R6/bin/startxwin.sh

This works.  If I run this from a shortcut, I can make it start
minimised
so that the DOS box is hidden, but I'd prefer to get rid of it entirely
once X has started.

The problem is that, even though startxwin.sh runs xterm as a background
process and then bash exits, the DOS box doesn't close until the last
client (i.e. xterm) has died.

One solution is: insist that ALL background processes be started using
run.exe rather than just putting them in the background.  I've rejected
this because it is unreasonable to force shell script writers to be
aware
of the foibles of DOS - we want to leave behind all DOS baggage in the
.bat file :-)

Another solution: use run.exe to start bash.  I don't think we can
assume
ANY of the cygwin directories are in %PATH%, so the bash line becomes:

  C:\cygwin\usr\X11R6\bin\run.exe bash -lc /usr/X11R6/bin/startxwin.sh

This is useless for me, because /usr is on my D: drive and as one of the
prime motivations for making the change is to make the scripts more
universal, this too has to be rejected.

If instead, we chdir to the (DOS) location of /usr/X11R6/bin, e.g. in my
case D:\cygwin\usr\X11R6\bin, we can't guarantee that bash will start OK
(it won't find cygwin1.dll for starters).

Therefore, the cleanest solution would be to move run.exe to /usr/bin.
Then, the startxwin.bat can just:
  run bash -lc /usr/X11R6/bin/startxwin.sh

Any shortcut to run the .bat file just needs the target to be the batch
file itself, there's no need to be careful about setting its starting
directory.  It could hardly be simpler.

In case you're wondering, startxdmcp.bat is virtually the same except it
sets REMOTE_HOST then runs bash as:
  run bash -lc /usr/X11R6/bin/startxwin.sh -xdmcp %REMOTE_HOST%

The XDMCP specific bits in startxdmcp.bat have migrated into
startxwin.sh.

If you're OK with run.exe moving into /usr/bin, I should be able to get
a patch out tomorrow.

It might be worth pointing out that with run.exe in /bin, the batch
files
are pretty redundant.   I've got a shortcut with a target of:
  C:\cygwin\bin\run.exe bash -lc /usr/X11R6/bin/startxwin.sh
which runs fine so long as Start in: is C:\cygwin\bin.

Perhaps you could clarify: if run.exe moves to /usr/bin, should this be
referred to (in the xxx.in files) as /usr/bin, /bin or
@some_autoconf_macro@?  @prefix@ appears to be /usr/X11R6, and the
other autoconf directories seem to be derived from this e.g.
@exec_prefix@
and @bindir@, so none of them seem to be applicable.

Longer term, wouldn't it make more sense to persuade Charles Wilson (the
cygutils maintainer) to adopt run.exe as an addition to the cygutils
family?  There is nothing X about it after all, and it would also make
it
available to other folk that aren't interested in X (there must be some
out there ;-).   It may need a name change to cygrun, but that's not
going
to hurt.


Phil


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**



auto-hiding taskbar causes refresh problems

2004-04-07 Thread Phil Betts
Hi folks,

To recreate this small bug:
1) Disable taskbar auto-hiding
2) Start X in multiwindow mode
3) Enable taskbar auto-hiding

Now, nothing is rendered into the area where the taskbar used to be.
Previously rendered areas can be dragged into the taskbar zone without
being erased, but if they become obscured, they will not be refreshed on
exposure.

I can't imagine this affecting too many people, I only found it because
I
needed to temporarily disable auto-hiding while I was testing the
various
options for starting X, so there's no rush.

FYI, this is on NT4, server release: 4.3.0.65

Phil



**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**



RE: Various starting X problems

2004-04-02 Thread Phil Betts
Hi Harold,

 vanilla DOS/Windows shell.  My guess is that it's relying on some env
 var.

I'm aware of this.  I don't remember the exact details, but there is a 
sort of Catch-22 situation for setting the start in folder for the 
xterm shortcut; neither '/usr/bin' nor '/usr/X11R6/bin' work for 
different reasons.  Furthermore, I believe that the script that creates


I've just cracked this on my PC - it was a side effect of moving /usr
onto
my D: drive.  PATH under cmd.exe still had C:\cygwin\usr\X11R6\bin
which meant that xterm couldn't link with cygX11-6.dll.  This only
became
an issue once xterm moved to /usr/bin.

That point aside, is it not safer to work with /bin instead of /usr/bin
?
After all, that is where the files are really located:
  $ cygpath -w /usr/bin
  C:\cygwin\bin
On my PC, there is no bin in the usr directory so .bat files don't
stand a chance of finding anything in there!

I don't have time to fix this.  I would appreciate it if someone else 
would grab the -src package for X-start-menu-icons via setup.exe and 
work on fixing it; I don't want a half-assed untested patch either, I 
want one that has been thoroughly tested (you know, tough stuff like 
clicking at least one of the tree classes of shortcuts: /usr/bin X 
programs, /usr/X11R6/bin X programs, and /usr/X11R6/bin terminal 
programs) since the sort of changes required may break the other links 
that the scripts create (this is part of the Catch-22 I was talking
about).

If somebody does have time, I guess it's safest to assume (or insist)
that users have the result of cygpath -w /bin in their Windows PATH,
but
not necessarily /usr/X11R6/bin.  It would therefore work if the shortcut
starts in /usr/X11R6/bin.  This WFM:

  Target: D:\cygwin\usr\X11R6\bin\run.exe xterm -display 127.0.0.1:0.0
  Start in: D:\cygwin\usr\X11R6\bin

Obviously the D:\cygwin\usr\X11R6\bin part needs to be worked out
at installation time.

There does appear to be a problem with run.exe.  If the target program
can be found, but fails to link, the error is silently swept under the
carpet rather than passing on the message to the user.  To reproduce:
* start a CMD shell
* set PATH=everywhere except /usr/X11R6/bin
* cd to where your /bin lives
* type xterm
* you should get a dialog xterm.exe - Unable To Locate DLL with
  enough information to let you track down the problem
* now type full path to run.exe xterm
* result: no dialog, no error messages, no xterm.

haven't finished it yet.  The problems I ran into were that I could get

the paths I needed, but exposing them to the batch file as a variable
of 
some sort was darn near impossible.

Exactly!

Give it a try.  Download the X-startup-scripts -src package via 

I'll see what I can come up with.  I've got looming deadlines at work
and I've only got flavours of Linux at home so don't hold your breath...

I wouldn't go for the gold yet... just make a batch file that runs the 
shell script first so that people can still create Windows shortcuts to

the batch file, then we can go from there.

OK.  That's what I had in mind anyway.

 There was mention a while ago of making multiwindow a standalone
window
 manager.  Has anything been done in this direction?  snip
 
This isn't really a viable option at this time.  Splitting the window 

Pity, but not a problem.

What I would rather see is some very minor tweaks (I have been thinking

about doing these myself) that let the mutli-window window manager 
silently exit without causing a crash if another window manager is 
detected.  In fact, I would also like to create another dialog box that

lets you check boxes to enable and disable -multiwindow and -clipboard 
during the current session.  The first thing this will require a is a 
continuation of the cleanup that I have been doing to the shutdown 
process for the -clipboard code and a cleanup of the shutdown process 
for the -multiwindow code.

This sounds like a reasonable plan.  When I used to run fvwm at home,
the
system menu had entries for switching to twm, mwm etc.  This, I guess,
just forked a non-window-manager process to perform the switch then
exited
(if you tried to switch to a non-existant or broken WM, you ended up
with
no WM)

You'd need to be careful though.  Say the user starts X without
multiwindow, running an external WM at the end of their ~/.xinitrc.  You
wouldn't want to kill their WM process if the user tried to switch to
multiwindow or some other WM because that would end their X session.
In effect, what you need is a way to coerce the running WM to use one of
the execxx variants to start the new WM so that the WM PID never dies.
This is certainly not trivial!

An easier alternative would be to have a small wrapper program, say
runwm,
whose sole job would be to keep a WM going.  The ~/.xinitrc would then
end
with something like:

  exec runwm wmaker

Killing the wmaker process could either restart wmaker, or perhaps fall
back to multiwindow mode.  Further attempts to run runwm e.g. runwm

RE: Various starting X problems

2004-04-01 Thread Phil Betts
Hi Harold,

Firstly, it's generally bad form to quote verbatim email addresses -
although Luke did so in his original posting, so he can't complain
if a spam harvester latches onto him ;-).

Now...

Luke said:
 In my .xinitrc I *don't* have an explicit path for xterm.  However, I
 see xterm has moved from /usr/X11R6/bin to /usr/bin!  Did many other
X
 applications also move into there?My system does not have a
 problem finding xterm in /usr/bin because  /usr/bin should always be
 in your Cygwin shell path... something else is  wrong with your
Cygwin
 setup if that is not the case.

Slightly OT: I noticed that the start menu entry for xterm no longer
works.  Entering the command from the shortcut directly into the cmd.exe
shell returns without an error or any output (that I can find).  From
bash, the command works fine.  The other shortcuts that I've tried
(e.g.. xcalc) all worked, so there is presumably something unusual about
the way that xterm starts that causes a silent exit when started from a
vanilla DOS/Windows shell.  My guess is that it's relying on some env
var.

 I only noticed that xterm had moved because when I start X with
 -multiwindow (or with -clipboard), it complains like this and exits:
 
 $ PATH=$PATH:/usr/X11R6/bin startx -multiwindow -- :0

Surely this should be:

  $ PATH=$PATH:/usr/X11R6/bin startx -- -multiwindow

My understanding is that all args before the -- are client args and all
following it are server args.  If no client is specified, the default
client, which is hardcoded to be /usr/X11R6/bin/xterm is used and
-multiwindow is passed as an argument to it.

 So if I remove the exec wmaker from .xinitrc, X starts and stops
 instantly.  So I add an xterm at the end of .xinitrc (since X
doesn't
 realise the wmaker would have started lots of windows from its saved
 workspace state if it had been given a few seconds to run).

 Yeah, you have to have a magic client that is started with an exec
at 
 the end of your .xinitrc, otherwise the behavior that you described is

 exactly what is supposed to happen.

The point is that xinitrc is somewhat misnamed as it drives the entire x
session from conception to grave.  It's just a shell script and once the
last command exits and the script ends, the session is terminated.  Any
old command that won't return until you've finished with X will do.
From
the xinit(1) man page:

   An important point is that programs which are run by .xinitrc should
be
   run  in  the  background  if  they do not exit right away, so that
they
   don't prevent other programs from starting up.  However, the last
long-
   lived  program  started (usually a window manager or terminal
emulator)
   should be left in the foreground so that the script won't  exit
(which
   indicates that the user is done and that xinit should exit).

 I wonder how I can run multiwindow with wmaker as my window manager?

Why would you want to Luke?  multiwindow IS a window manager that just
wraps the X window's client area in MS Windows' frames and has an
invisible root window.

If your aim is to have wmaker style frames without an X root window, try
the -rootless option with wmaker.  I used to use X this way until
multiwindow got so good :-)


 Maybe keep the exec wmaker and set display to :1 ...  No, startx
 -multiwindow -- :1 triggers the no program named
 /usr/X11R6/bin/xterm in PATH crash.  So I don't quite see how to
 achieve that.  I tried xinit -multiwindow but that started up a full
 desktop.

Seriously, the easiet way is to use startxwin.bat and modify it 
according to the instructions in that file.  Or, if you really want to 
start from a Cygwin shell, use startxwin.sh and modify it accorinding
to 
its instructions.  There are pre-made lines that are just commented out

that start a window manager etc.

Lets have you try these things first and see where it goes.

Harold

Harold, I'm quickly coming to the opinion that .bat should really be
spelled .bad !!

My / is the recommended C:\cygwin, but /usr is mounted on D:\cygwin\usr.
This means that the all of the %CYGWIN_ROOT%\usr based paths in the
script
are all wrong.  There is no way (major kludges aside) to generate the
correct paths in a generic .bat file.  Consequently, every time I
install
a newer version, I need to hack the new .bat file (or patch my own
script
with any changes you've made).

If you'd be interested in a unified approach, where the .bat just runs
bash -c startxwin.sh (which will probably in turn be just a wrapper for
startx) I might be able to make time for this.

The ultimate goal being to make any configuration of startup
parameters external to the scripts and therefore remove ANY need for
users to hack the scripts themselves.

There was mention a while ago of making multiwindow a standalone window
manager.  Has anything been done in this direction?  It would certainly
ease making a one size fits all startup and remove much of the
confusion
this thread typifies - i.e. the rule would be:
  always 

RE: XWin 4.3.0-50 crashes with -multiwindow (ping Earle)

2004-03-25 Thread Phil Betts
Hi All,

It seems that this may have been resolved already, but FWIW...

Earle F. Philhower III wrote:
 To fix it we can reinstate the if()...
 if (pixmap-drawable.bitsPerPixel == 15)
   effXBPP = 16;
 else
   effXBPP = pixmap-drawable.bitsPerPixel;
 if (pixmap-drawable.depth == 15)
   effXDepth = 16;
 else
   effXDepth = pixmap-drawable.depth;
 Or get rid of the effX* variables completely, but modify (~line 218)
  if (effxdepth==16) into
 into
   if (xdepth==16 || xdepth==15)
 
 and modify all of the X image ptr walking
  ptr += posX * (effXBPP / 8);
 into
   ptr += (xbpp==15)?(posX * (16/8):(posX * (xbpp/ 8));

Why not just replace (bpp/8) with ((bpp+1)/8) ?

More generally you could use ((bpp+7)/8) which will round up any bit
depth to a whole number of bytes (always assuming that bpp is an
integral type).

This works for all of the multi-bit depths mentioned by Earle. (I
haven't got the source so I don't know if 1-bit images would be
affected)

Although it's probably not important in this context, the above
approach is generally preferable for performance since, as well as
being intrinsically quicker, it removes any conditional code which
plays havoc with CPU branch prediction.  I only mention this because I
imagine that this scenario is replayed a lot throughout the server and
there may be useful gains to be made.  (Also, you could try replacing
the '/8' with '3', but I'm pretty certain that gcc is smart enough to
do that anyway.)

Cheers,
   Phil


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**



Emacs clipboard now working

2004-03-22 Thread Phil Betts
On Fri 19/03/04 Harold L Hunt II wrote:

 Umm... the clipboard should work with emacs... if it does not, then
that 
 is a problem.

I've just tested Cygwin's emacs and that is fine now.  Unfortunately, I
have
no need for that because I run the Windows native port locally (for
speed
and stability) so I hadn't noticed that it was working.  The problem I
was
having was with a remotely started emacs - a crusty 19.30.2 GNU emacs.

Until very recently, the clipboard thread would crash if I tried to
paste an
emacs selection into a Windows app.  Recent changes to the clipboard
have meant that instead of crashing, the clipboard thread now outputs
the following to the log:

winClipboardFlushXEvents - SelectionNotify - XConvertSelection ()
failed, aborting: 1

This was the clue I needed.  Since the cygwin version is OK now, I
compared the select.el code for the latest emacs with the 19.30 version.
There were just two differences, so I tried the newer code with the old
emacs.  Bingo!  It now works like a charm!

For the archives, the problem was that the old version needed:
(COMPOUND_TEXT . xselect-convert-to-string)
to be added to selection-converter-alist.


Phil Betts



**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**



RE: X/Cygwin icon proposal

2004-03-19 Thread Phil Betts
Hi Harold,

First off, as this is my first submission to the list, I'd like to
extend my thanks
to you and all of the other contributors to Cygwin/X.  After trying a
very early
version (long before multiwindow appeared), I tried a lot of commercial
X servers
before returning to cygwin about the time that rootless appeared.  The
current
XWin is by far the best of the bunch (for my purposes at least).  It is
the only
server I've found that will work reliably with VirtuaWin's virtual
desktops.

Most of the traffic headed your way on the list is, by the nature of
these things,
negative so I thought I'd try to redress the balance ;-)  I'm sure I
speak for most 
of the subscribers in saying that your efforts are greatly appreciated.

But enough of this sycophancy...

 Harold L Hunt II wrote:
 1) A Japanese user has reported that the new icon was garbled on his 
 Windows NT (I believe) system.  This is an isolated case so far and I 
 think it is due to something with that particular system and is not 
 something that we should worry about unless it starts getting reported
more.

This is a pretty mature list, followed by the sort of people who can
resist the
urge to send in me too messages.  I suspect that there are others like
me who
saw the original fault report and thought OK, it's been logged already,
I'll await
the results.  Therefore, please don't discount solitary fault reports.

I am running NT4 and as you'll see from the attached shot, I too get a
mangled
icon.  (In case the maintainer of rxvt monitors this list, that
application also
suffers the same problem)

Of the different .ico files I have seen, all could be read and correctly
displayed
by IrfanView, but most were either mangled by Windows, or contain no
icons.

FWIW, here are my observations on the discussion so far:

a) It makes no sense to inflict a random splodge on users of older OSes,
just
because a newer OS is able to display a prettier version of the current
icon.

b) As a user of an older OS, I would gladly live with an amorphous
blotch if you
could get the clipboard to work with emacs!

c) I would guess that most XWin _users_ are actually professionals like
myself,
who need an X server to connect a cheap PC to more exotic hardware
running
various flavours of Unix.  We are busy and therefore don't have the time
to make
a lot of noise on lists such as this.

d) Most true geeks (a hat I wear myself when I'm at home) won't touch
Windows
of any flavour from choice and therefore won't be needing cygwin.

e) A disproportionate number of electrons has been devoted to the
transmission
of messages about 144 pixels.

Phil Betts

 X-icon-bustage.png 


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**

attachment: X-icon-bustage.png