Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!wuarchive!uunet!snorkelwacker.mit.edu!bloom-beacon!LIGHTNING.MCRCIM.MCGILL.EDU!mouse From: mouse@LIGHTNING.MCRCIM.MCGILL.EDU Newsgroups: comp.windows.x Subject: Re: a question on XAPPLRESDIR and xset +fp path. Message-ID: <9012161126.AA20449@lightning.McRCIM.McGill.EDU> Date: 16 Dec 90 11:26:18 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 61 > I tried to set the shell variable XAPPLRESDIR to the pwd, and in my > working directory, I have a file XHello which contains some resources > for the application xhello.c [...]. When I run the program, > expecting it to take the resources from the said file, it simply > refuses to do so. > <52 sapphire:~/project_X >set XAPPLRESDIR = `pwd`/ > <53 sapphire:~/project_X >echo $XAPPLRESDIR > /usr/ua/ua/veerabad/project_X/ > <54 sapphire:~/project_X >xhello > and xhello did not read the XHello file. You appear to be using the C-shell. If this is the case, you have two different sorts of variable available: shell variables and environment variables. There are several differences, but the relevant one here is that shell variables are not passed to commands, whereas environment variables are. As you may guess at this point, you are setting a shell variable called XAPPLRESDIR; you want to set an environment variable. (Both sorts of variable are understood by the $ expansion mechanism in the shell.) Try instead setenv XAPPLRESDIR `pwd` (using $cwd instead of `pwd` would probably be faster.) Note the lack of an = sign; the syntax is somewhat inconsistent. Bourne shells (and derivatives) have the same basic problem, but the terminology is different: all variables are considered to be the same sort of thing, but some are exported and some aren't. But that's irrelevant in your case; that set command would not have worked in sh. > Another question is, I tried to change the font path fp using xset > +fp as below and I got the error messagees shown: > <57 sapphire:~/project_X >xset +fp /usr/ua/ua/veerabad/project_X/ > X Error of failed request: BadValue (integer parameter out of range for operation) > Major opcode of failed request: 51 (X_SetFontPath) [...] > Could someone tell me what it is, that I am doing wrong? This one can't really be answered with surety without more information. I have two guesses, though. One is that your X server is running on an X terminal, another workstation, or some other machine which can't access the path you gave. (Your *clients* may be able to access the font directory, but that has nothing to do with it. The *server* has to be able to get at it in order for it to work in the font path.) The other is that you didn't run mkfontdir (or your server's analog) to create the fonts.dir (or analog) in that directory. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu