View previous topic :: View next topic |
Author |
Message |
benny1967 Apprentice

Joined: 25 Apr 2004 Posts: 224
|
Posted: Tue Jan 09, 2007 5:52 pm Post subject: TWM window manager: everything way too big |
|
|
OK, I know this will cause some laughter, but I actually got into the habit of using twm as a window manager every now and then; especially when i plan to use only one X-application while another task is eating up most of my precious RAM. (256MB isn't very much)
Here's the problem:
Recently I found that everything that contains text (=twm menu itself and the title bar of every window) doubled its height. Not the text itself, it's as small as usual, but the container space used for it. This gets me trapped in a situation where I can't quit twm through the menu, because "exit" is the last menu entry and the menu grew so tall that it is off the screen.
I re-arranged the menu meanwhile, and I have to admit this is not the most urgent problem I will spent my time on in 2007, but still it bugs me because I want to understand what happened. You get a lot of people who'll help you with NVidia magic and Gnome and 3d-desktops etc, but who knows TWM nowadays?
Part of the problem is that I use twm so rarely that I cannot say what I did before this started. The only thing I found out after a while was that twm no longer honored the configuration file /etc/X11/twm/system.twmrc I had discovered ages ago (and which used to work); the changes I'd made there are no longer reflected in the actual menu. I had to copy it to ~/.twmrc to make it work again. But this doesn't explain anything - it could only be another part in the puzzle. |
|
Back to top |
|
 |
dleverton Guru

Joined: 28 Aug 2006 Posts: 517
|
Posted: Tue Jan 09, 2007 5:57 pm Post subject: |
|
|
Try starting TWM with LC_ALL=C in the environment. This will probably make it not work so well if you need it do display non-ASCII characters - if that's a problem, you might be able to find another locale that contains the characters you need but doesn't make things get too big. |
|
Back to top |
|
 |
benny1967 Apprentice

Joined: 25 Apr 2004 Posts: 224
|
Posted: Tue Jan 09, 2007 9:34 pm Post subject: |
|
|
dleverton, you're my hero of the month. It worked. Both C and de_AT made twm "pretty" again. (Well... kind of ...)
But: What is going on here? Is it UTF-8 (my setting is de_AT.utf8 normally)? I googled for twm and utf-8 and got the impression twm should handle UTF-8 well for years now.
Are there any details you know about this effect, why it happens etc.? |
|
Back to top |
|
 |
dleverton Guru

Joined: 28 Aug 2006 Posts: 517
|
Posted: Tue Jan 09, 2007 9:54 pm Post subject: |
|
|
I'm not sure of the details, but I think it tries to find fonts for all the characters in the selected locale, then allocates enough space on the screen for the largest. Some of the Asian fonts included in Xorg are only available in large sizes, so in a locale that includes them (including any that uses UTF-8) twm makes everything bigger so that they fit, even if you're not actually using them. |
|
Back to top |
|
 |
benny1967 Apprentice

Joined: 25 Apr 2004 Posts: 224
|
Posted: Wed Jan 10, 2007 9:53 am Post subject: |
|
|
Mm... On the other hand, I do specify a certain font+size for the menu and the window titles in twmrc. Why would twm look for another one? I'm at the office right now, but I'll try to further restrict the respective font settings to iso-8859-1/15 (I think th encoding isn't specified now). Maybe this does something.
BTW: How come you twm so well? And: Can you direct me to a mailing list/forum/group place where twm is the main topic? |
|
Back to top |
|
 |
dleverton Guru

Joined: 28 Aug 2006 Posts: 517
|
Posted: Wed Jan 10, 2007 12:20 pm Post subject: |
|
|
benny1967 wrote: | Mm... On the other hand, I do specify a certain font+size for the menu and the window titles in twmrc. |
Speculation: it's drawing the text itself in the size you specify, but it's leaving extra space in case you ever use a character that's only available in a larger size.
Quote: | Why would twm look for another one? |
I assume it considers "being able to display every possible character" more important than "precisely respect the user's font size", and isn't smart enough to know that in most cases (those where you're not using any fancy characters) it can do both at the same time.
Quote: | I'm at the office right now, but I'll try to further restrict the respective font settings to iso-8859-1/15 (I think th encoding isn't specified now). Maybe this does something. |
Worth a try.
Quote: | BTW: How come you twm so well? And: Can you direct me to a mailing list/forum/group place where twm is the main topic? |
Heh, I hardly know it at all really, I only use it occasionally for troubleshooting, when I'm going to be logging in and out of X frequently and I don't want to wait for KDE to start each time. (Sometimes I don't even bother with a window manager at all in those cases, but twm is the choice for when I do.) I tracked down this problem by reading the source, because it was annoying me too. Sorry, I don't know about any forums/etc. |
|
Back to top |
|
 |
benny1967 Apprentice

Joined: 25 Apr 2004 Posts: 224
|
Posted: Wed Jan 10, 2007 8:21 pm Post subject: |
|
|
dleverton wrote: | benny1967 wrote: |
I'm at the office right now, but I'll try to further restrict the respective font settings to iso-8859-1/15 (I think th encoding isn't specified now). Maybe this does something. |
Worth a try.
|
It might have been worth a try, but didn't help
dleverton wrote: | I tracked down this problem by reading the source, because it was annoying me too. |
I should really start to learn some C (I guess that's what it is) ...  |
|
Back to top |
|
 |
|