sundar@HERMES.AI.MIT.EDU (Sundar Narasimhan) (04/18/87)
Hi: I would like to be able to customize my programs differently while running on different machines. (for example, I may like my default xterm font to be 'x when I login from a lisp machine, but 'y when I login from some other machine -- in both cases, the program xterm may be running on the same machine, so there would have to be a way of differentiating at the server level). I am told there is no way to do this in V10. Can anyone working on the Xlib or Toolkit for v11 tell me if this would be possible under V11 and if so, how? Thanks, -Sundar
haynes@DECWRL.DEC.COM.UUCP (04/18/87)
I think the answer is "yes", but I'm not sure exactly what you want. In particular you say you want to differentiate between "logging in" from a lisp machine and other machines, but that the Xterm may be running on the same machine in either case. I'm confused. I assume that in all cases you are talking to only one server. Now either you are running Xterm on a lisp machine and a different Xterm on a different machine. In which case the answer is trivial and you can even do it under X10. You simply have a different .Xdefaults file on each of the machines that you run Xterm on. On the lisp machine your .Xdefaults has one font specified, and on the other machine it has some other font specified. (of course if you .Xdefaults is NFS mounted or some such so that it is the same on both machines, you may have a problem.) If, on the other hand, the xterms are both running on the same machine, it is either a lisp machine or it isn't so I'm confused. If you have two xterms running on (say) a Lisp Machine, and you want each of them to have different fonts, depending on what kind of machine the shell inside the xterm is rlogged in to, you have a REAL problem, since Xterm doesn't (really) support changing fonts on the fly. You'd have to re-code Xterm. If, on the other other hand, you mean something else, then I don't understand the question, but if you'd clarify I'd be happy to take a crack at answering. -- Charles
asente@figaro.STANFORD.EDU (Paul Asente) (04/18/87)
With regard to different instances of xterm using different defaults: Xterm, like most X programs, looks for entries in the .Xdefaults file for a program named argv[0], not for one named "xterm". By making links to xterm with different names you can have different sets of defaults for different instances of xterm; e.g. xterm.bodyfont:kiltercrn for most xterms bigxterm.bodyfont:vtsingle for xterms named "bigxterm" etc. Does this solve your problem? -paul
dms@HERMES.AI.MIT.EDU.UUCP (04/18/87)
A releated problem that I run into is the differences in bitmap size between sun 3/180's and 3/280's. Since they are all in the same cluster we do NFS mount the same .Xdefaults file. Given this, windows and fonts on the high resolution 3/280 screen all come out to small. Perhaps the syntaxs of the .Xdefaults file needs to be changed to allow conditional specifications, depending on the characteristics of the screen that the window is being created for. -Dave
ken@hpcvlo.HP.COM (Ken Bronstein) (04/21/87)
Whoa...The definition of X is perfectly designed to handle different display sizes. The problem is that most people(companies) have not invested the time to create fonts to properly handle their displays. One of the neat things about X is that when you call XGetFont() the server gets the font on the machine doing the display work. This means that if I ask for times roman 12 point font that my server, regardless of the pixel size on my machine, can get me a real 12 point font. Now we only need to get a set of fonts that are customized for our respective displays. It is too bad it takes so long for the X world to get its respective font file scene together. However the design of X will prove correct as we all grow into it. -Ken ("We need a good font editor") Br(dp(dp(e
H_Eidnes%vax.runit.unit.uninett@TOR.NTA.NO (H}vard Eidnes) (04/22/87)
Xterm, like most X programs, looks for entries in the .Xdefaults file for a program named argv[0], not for one named "xterm". Ummm, welll... That turns out to not be the case. There are quite a few "xterms" floating around that actually look for "xterm" in .Xdefaults regardless of arg[0]. The main reason for that is to avoid having duplication of .Xdefaults entries for all of the xterm defaults that are the *same*, and the rationale is that they have more in common than they are different. Proposed solution (whenever the uniform approach mentioned does not work or is not applicable): look at argv[0] first, then at the "generic" tool name. This should at least solve the problem of having multiple occurrances of the same default value in the xterm case. ------- E-Mail: <h_eidnes%vax.runit.unit.uninett@nta-vax.arpa> H}vard Eidnes (or TeXish: H\aa vard Eidnes) Division of Computer Science, Norwegian Institute of Technology