This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: XWinrc configurable server (menus/icons)


Howdy Christopher, Igor, and Harold...

...
Two small notes here:
1) You can actually call setenv("DISPLAY", value) inside the XWin process,
which will be inherited by XWin's children.
...
On Wed, Aug 06, 2003 at 01:06:55PM -0400, Harold L Hunt II wrote:
>The for loop that you have is the way I have seen it done before.
Me too.  However, if you can find an API specification for something
which does something similar in the Single Unix Specification, I'd be
...>>  getrlimit(RLIMIT_NOFILE, &rl);
>>  for (i = STDERR_FILENO+1; i < rl.rlim_max; i++)
>>       (void) close(i);
>>but that seems wasteful to iterate over rlim_max...
(make that rlim_cur, closing 4 billion descriptors takes too long...)

I'm attaching another diff (against test95 plain), be sure to so a
"make Makefiles" and "make depend" before "make XWin.exe".

It does all the prior stuff and
a) Closes all fds on the fork()'d process
b) Sets environment variable DISPLAY=xxx:yy
c) Replaces %display% with 127.0.0.1:<display>.0 in commands
d) Better syntax error display, gives lineno and expected token in XWin.log
e) Error messages in log when it can't load an icon/etc.
f) Checks WM_NAME property for a match for icons, not just class name
^^ Pretty neat in use, I have my fast Linux machine xterms with
titlebars like "Linux:machinename:$cwd" and Hobbes (Calvin&Hobbes) icon,
and my slow Sun machine xterms with a CharlieBrown icon!



-Earle F. Philhower, III earle@ziplabel.com cdrlabel - ZipLabel - FlpLabel http://www.cdrlabel.com

Attachment: xwinrc.diffs.2.bz2
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]