Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Xterm and .Xresources



On Thu, 2 Sep 1999, John Chambers,,,781-647-1813 wrote:


> One question:  While the file is called "XTerm", the  app  is  called
> "xterm".   How do you know to change the capitalization like that?  I
> checked with the "man xterm" page, and there is no occurrence of  the
> strings  "XAPPLRESDIR" or "XTerm" anywhere, so there's no obvious way
> a user could ever learn this sort of thing.
> > 

> I notice that in this case the file and the program seem to have  the
> same name. What's the rule here? Is it documented anywhere? How can a
> user get a handle on this?
> 
> 
> And on a related topic, is there some what to discover what an  app's
> resources are called? 

I can tell it has been too long since I have messed with X and resources.
I used to know a lot of this off the top of my head, and now I've got to
really think about it.

There is an application called editres, which allows you to manipulate X
resources.  If you use it on a particular X client (at least, one with
athena widgets, if I recall -- I don't think it works for Motif or GTK
applications) you can see what "CLASS" a program is.  The XTerm is the
application class of the application. Or something like that.

Sometimes the manpages tell you what the application class is too. But
there's no guarantee. 


On this machine, and on many other linuxes that
> I've used in the past few years, whenever I run  gv  it  gives  me  a
> popup complaining about about a number of missing colors:
> 
> 	Warning: Cannot allocate colormap entry for "AntiqueWhite2"
> 	Warning: Cannot allocate colormap entry for "AntiqueWhite4"
> 	Warning: Cannot allocate colormap entry for "gray90"
> 	Warning: Cannot allocate colormap entry for "#D3B5B5"
> 
> It also has a number of widgets  that  are  white-on-white  and  thus
> utterly  unreadable.   I'd  guess  that  the  solution is to set some
> resource with "Color" in its name, but aside from that, I don't  have
> a clue as to what these four resource names might be.  The docs don't
> seem to mention it at all.  Is there  some  what  that  this  can  be
> learned  from  an  app?   I can run strings on the binaries, and sure
> enough, I can see the above strings there, but they don't seem to  be
> next  to anything that looks like a resource name with "Color" on its
> end.  I suppose I could  spend  months  single-stepping  through  the
> program  with  a  debugger,  but so far it's been easier to just live
> with it and grump about the opaqueness of it all.

The problem, probably the most common one with X, is that your out of
color table entries.  You almost undoubtedly are running an 8-bit (256
color) display.  You can set all the resources you like, and you'll still
have the same problem.  To fix it, you need to figure out if you can run
your video card at a higher color depth (probably you can), and then use
some method to start X at the higher depth.  

Most likely, you start X using the startx command, in which case you would
use the command, for example:

  startx -- -bpp 16

which will give you a 16 bit color display.  If you use [xg]dm, you will
need to use one of several other methods to make sure you have a 16 bit
display.  You can also have a 24-bit or 32-bit display, but often with the
sacrifice of running at a lower resolution, at least on older cards.  In
any case, 16 bit is a vast improvement over 8-bit and probably all you
need.

If you are not using XFree86 and instead you are on, say, a Sun system, I
have never figured out how to run the display at greater than 8-bit color.
If someone knows, I would be MOST grateful if you would tell me.  I
usually just try to get a PC running linux instead of getting my
workstation to work...  :)



-- 
Derek D. Martin   |  UNIX System Administrator
derek at netria.com  |  dmartin at lancity.com

-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org