|
> I found out what is happening. Gnome forces all applications that have > the standard X foreground and background resources to be like this (at > least on my slackware): > > *background: #e2e2de > *foreground: #000000 Yes, that appears to be the case. When I run it under twm, I do not have these resources set, but under Gnome, I do. (I'm running 2.6) > This I found out by running 'xrdb -query'. Most likely this is a result > of Gnome putting a theme on everything. So chances are that x5250 will > have the same foreground and background settings as your xterm unless you > have xterm-specific settings in your .Xdefaults. I didn't discover this > until now since I don't use Gnome. No, my xterm doesn't have these settings... Just x5250... I don't know if that really matters though... > So now I'm left in a quandry. If I follow the traditional X conventions > then Gnome users will be unhappy about the colors. Really, the if the > foreground resource is set, it should control green, red, yellow, blue, > turquoise, and white - i.e. make them all them same color. That is how a > traditional X app would work. I made it so that setting the colors > explicitly would trump the foreground and background resources, which > isn't the way things would normally work. But I think for a 5250 application, it's the right choice. I think that users would be unhappy otherwise. > If I ignore the foreground and background resources it ceases to follow > traditional X methods. Personally, I would prefer that Gnome didn't set > a global foreground and background setting, but that ain't gonna fix > nothin' :) Shrug... I'd prefer that RedHat/Fedora didn't break just about everything with every release. I'd prefer that autoconf/automake/libtool releases were backward compatible so that I don't have to maintain 3 different ones on my system in order to build things. What we prefer is largely irrelevant. :) > So I can either remove the foreground and background resources (I don't > like this option very much) or I can ship some reasonable resource files > with x5250 (I like this better but proper installation may be problematic > for some users). Similar to the way that tn5250 install an XTerm resource > file, x5250 probably needs an X5250 resource file in > /usr/X11/app-defaults. I agree that this is a good solution. We'll have to make autoconf install it in the right place, though... On my system, I have an /etc/X11/app-defaults directory, but it does not work. If I put the X5250 resource file in that directory, the settings are ignored. On my system, there's a /usr/X11R6/lib/X11/app-defaults directory. If I put the settings there, they're also ignored -- though this appears to be where all of the other programs have their defaults set. The reason for this appears to be that you have /usr/lib/X11/app-defaults HARD-CODED into resources.c. If I change that code to point to /usr/X11R6/lib/X11/app-defaults, the X5250 file DOES work. So, if we can get autoconf to find the correct directory, we need to make sure that it also sets it in resources.c The following code for configure.ac appears in the Xscreensaver package. Seems inordinately complicated, but I guess we could do the same thing. Unless someone knows of a better way?? (Carey?) # Try and find the app-defaults directory. # It sucks that autoconf doesn't do this already... # AC_DEFUN(AC_PATH_X_APP_DEFAULTS_XMKMF,[ rm -fr conftestdir if mkdir conftestdir; then cd conftestdir 2>/dev/null # Make sure to not put "make" in the Imakefile rules, since we grep it out. cat > Imakefile <<'EOF' acfindx: @echo 'ac_x_app_defaults="${XAPPLOADDIR}"' EOF if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which'd confuse us. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` fi cd .. 2>/dev/null rm -fr conftestdir fi]) AC_DEFUN(AC_PATH_X_APP_DEFAULTS_DIRECT,[ # Look for the directory under a standard set of common directories. # Check X11 before X11Rn because it's often a symlink to the current release. for ac_dir in \ /usr/X11/lib/app-defaults \ /usr/X11R6/lib/app-defaults \ /usr/X11R6/lib/X11/app-defaults \ /usr/X11R5/lib/app-defaults \ /usr/X11R5/lib/X11/app-defaults \ /usr/X11R4/lib/app-defaults \ /usr/X11R4/lib/X11/app-defaults \ \ /usr/lib/X11/app-defaults \ /usr/lib/X11R6/app-defaults \ /usr/lib/X11R5/app-defaults \ /usr/lib/X11R4/app-defaults \ \ /usr/local/X11/lib/app-defaults \ /usr/local/X11R6/lib/app-defaults \ /usr/local/X11R5/lib/app-defaults \ /usr/local/X11R4/lib/app-defaults \ \ /usr/local/lib/X11/app-defaults \ /usr/local/lib/X11R6/app-defaults \ /usr/local/lib/X11R6/X11/app-defaults \ /usr/local/lib/X11R5/app-defaults \ /usr/local/lib/X11R5/X11/app-defaults \ /usr/local/lib/X11R4/app-defaults \ /usr/local/lib/X11R4/X11/app-defaults \ \ /usr/X386/lib/X11/app-defaults \ /usr/x386/lib/X11/app-defaults \ /usr/XFree86/lib/X11/app-defaults \ \ /usr/lib/X11/app-defaults \ /usr/local/lib/X11/app-defaults \ /usr/unsupported/lib/X11/app-defaults \ /usr/athena/lib/X11/app-defaults \ /usr/local/x11r5/lib/X11/app-defaults \ /usr/lpp/Xamples/lib/X11/app-defaults \ /lib/usr/lib/X11/app-defaults \ \ /usr/openwin/lib/app-defaults \ /usr/openwin/lib/X11/app-defaults \ /usr/openwin/share/lib/app-defaults \ /usr/openwin/share/lib/X11/app-defaults \ \ /X11R6/lib/app-defaults \ /X11R5/lib/app-defaults \ /X11R4/lib/app-defaults \ ; \ do if test -d "$ac_dir"; then ac_x_app_defaults=$ac_dir break fi done ]) AC_DEFUN(AC_PATH_X_APP_DEFAULTS, [AC_REQUIRE_CPP() AC_CACHE_CHECK([for X app-defaults directory], ac_cv_x_app_defaults, [AC_PATH_X_APP_DEFAULTS_XMKMF if test x"$ac_x_app_defaults" = x; then AC_PATH_X_APP_DEFAULTS_DIRECT fi if test x"$ac_x_app_defaults" = x; then ac_cv_x_app_defaults="/usr/lib/X11/app-defaults" else # Record where we found app-defaults for the cache. ac_cv_x_app_defaults="$ac_x_app_defaults" fi]) eval ac_x_app_defaults="$ac_cv_x_app_defaults"])
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.