October 21st, 2005, 13:04
This problem is probably easily answered but a google search has failed me http://screamingelectron.org/forum/images/smilies/frown.gif

I am running OpenBSD3.7 with the fluxbox window manager.
I play chess on the ICS. From a terminal the following command works fine:

xboard -ics -internetChessServerLogonScript .icsrc

The file .icsrc just contains one word: guest
This just logs me into the ICS as a guest player.

My problem is that when I put this into a fluxbox menu and then try to run the command from the menu, xboard starts but a dialog appears stating "Got end of file from keyboard". Xboard then closes. The line in my fluxbox menu is:

[exec] (Xboard) {xboard -ics -internetChessServerLogonScript .icsrc}

I did a cat -v on .icsrc and there are no non-printing characters. I can only assume the problem is within the menu command but don't know what to do next? This seems to be a general unix type problem so I have posted here.

Any suggestions please? http://screamingelectron.org/forum/images/smilies/redface.gif

October 21st, 2005, 20:30
buster, this is an interesting problem. I bet that (a) when the fluxbox wm execs the chess app it tries immediately to read from stdin but the window doesn't have the keyboard focus yet, or (b) xboard is trying to read from a /dev/tty device directly.

To debug this, I'd first try starting xboard from the shell with stdin redirected from /dev/null, and see if you get the same error dialog. Ie: do this

xboard -ics -internetChessServerLogonScript .icsrc < /dev/null

See if fluxbox can be told to immediately give the focus to an app launched from the menu. See if xboard has any options to make it better behaved under a window manager.

Try this menu def'n:

[exec] (Xboard) {xboard -ics -internetChessServerLogonScript .icsrc </dev/stdin}

(I have no idea if that can or should work -- just a shot in the dark. Further disclaimer: I don't have fluxbox or xboard installed at the moment.)

October 21st, 2005, 23:10
I like bmw's thinking on this. There's a few options in fluxbox for focus of new apps and desktop changes. I prefer the mouse focus options but I still make sure new apps still get focus. It can quickly change focus if you are moving the mouse as the app opens so I could see that as a possiblity for what you are seeing.

I tend to put some scripts in ~/scripts to fire up several aterm/eterm/etc. all lined up on the desktop. I'll just throw it in my ~/xinitrc and my menu for when I want a few more terms. You might try putting the command in a script and then calling the script. If it is a focus issue then this should work better.

I'm running fluxbox on my FreeBSD desktop and loaded xboard but don't see the same behavior here. I played with a few focus settings but it always loaded xboard fine. I'd love to hear what is causing this. :icon_smil

October 22nd, 2005, 06:18
Thanks for the replies.

I tried bmw's suggestion and as suggested the same outcome was observed following execution of:

xboard -ics -internetChessServerLogonScript .icsrc < /dev/null

$ xboard -ics -internetChessServerLogonScript .icsrc < /dev/null
xboard: Got end of file from keyboard

The suggested menu definition didn't work unfortunately.

I probably should have mentioned that when using xboard there are two windows open. One window has a graphical representation of the chess board and the other is a terminal which displays messages, invites etc from the ICS.

Activating from the menu I only saw the graphical window, no terminal. I had a look at man page for xterm and used the -e option. I guess this effectively opens the terminal and then runs all the xboard stuff from this terminal:

[exec] (Xboard) {/usr/X11R6/bin/xterm -e /usr/local/bin/xboard -size 54x54 -whitePieceColor gray100 -blackPieceColor gray0 -lightSquareColor gray80 -darkSquareColor gray60 -highlightSquareColor gray100 -premoveHighlightColor gray70 -ringBellAfterMoves false -showCoords true -highlightLastMove true -colorize -ics -internetChessServerInputBox true -internetChessServerLogonScript .icsrc}

This works! http://screamingelectron.org/forum/images/smilies/icon_smile.gif

I also modified .icsrc so that after logining in it automatically looks for a new game:


Now I can play chess! http://screamingelectron.org/forum/images/smilies/icon_razz.gif
Thanks to bmw and strog for your suggestions. http://screamingelectron.org/forum/images/smilies/icon_smile.gif