![]() |
Problems with TWM + UTF-8
I know UTF-8 isn't fully supported, but I found a work-around (on a NetBSD mailing list) for the bug where TWM would instantly crash when you attempt to start it after enabling UTF-8 (saying "unable to open fontset").
Starting X without TWM does not cause a crash, by the way. It only happens with TWM. The rest of the system -- and X -- work fine with UTF-8. The work-around LC_CTYPE should be a non-UTF-8 locale. Code:
$ cat .xinitrcEnabling UTF-8 in a non-UTF-8 TWM From X, after starting it that way: Code:
LC_CTYPE='' xtermSetting LC_CTYPE only for TWM I tried this: Code:
$ cat .profile
If I start X with those modifications to .profile and .bashrc, then TWM starts, and LC_CTYPE is empty when you open an XTerm normally, but those XTerms do not use UTF-8. Any UTF-8-files opened in vim contain funky symbols and you can't even enter Å Ä Ö. Everything (keyboard and encoding) works fine if you start an XTerm with LC_CTYPE='' xterm, but not otherwise, even though the LC_CTYPE variable is empty in both cases! Why does it behave like this? I just want LC_CTYPE to be "en_US" for TWM, but not for any other program. That would fix the whole thing. Thanks in advance. By the way, the original NetBSD post -- which must be the same bug -- is here: http://gnats.netbsd.org/41129 |
1 Attachment(s)
I tested in generic (no extra packagaes) full install of 14.0 in VirtualBox and twm works nicely. I even remember running it under en_US.UTF-8 under 13.37 without a hitch.
What version of Slack? |
I've set de_DE.utf8 and twm runs without problems here. Slackware64-14.0.
Are you sure that the errormessage "unable to open fontset" does explicitely depend on using utf8? couldn't it help just to configure for another fontset? Markus |
I use version 14.0 x86.
I've even tried "-*-*-*-*-*--*-*-*-*-*-*-*-*". I didn't do a full install, so there must be some package missing. I didn't install:
I figured I can't possibly have to install KDE to run TWM, I was going to get texlive, there were no fonts in XAP, and it can't depend on emacs. But since I'm the only one having problems, that must be it. I see now that teTeX indeed has the Computer Modern fonts, so I'll try that one. It seems odd since everything else works though. What fonts do you use in your .twmrcs, by the way? I appreciate the help. |
Quote:
Markus |
Quote:
teTeX didn't solve it either. |
Well, what I would do then is rebuild twm from source, the source is in the source-tree from Slackware in x/X11, use the SlackBuild.script.
BTW: I don't believe that the missing series you've mentioned above can be responsible for your issue with twm. If there where packages from l or x missing, I would recommend to install the complete l and x series. Markus |
Quote:
Niether is the problem with .twmrc. I don't remember any options to set fonts in twmrc. But you might check the contents of your .Xresources. If you use the default xinitrc for twm, it starts three xterms. It quits when you exit one of the them. It might be the problem with xterm, not twm directly. Ie: if xterm exits, twm will too. Also, have you installed all the fonts from /x disk set? |
Getting rid of the .xinitrc worked! This turned out to be the criminal:
Code:
xrandr -s 800x600 --rate 60Code:
/usr/bin/twm &The fonts are a bit big now actually, so I guess they are configured for 1600x1200. But I'll sort that out. Thanks a lot for the help. |
I have to apologies to op. I checked my config several days after responding to this thread and I made two wrong statements.
1. I did use something like this in my xinirc.twm in 13.37: Code:
LC_CTYPE=en_US /usr/bin/twmQuote:
2. There is a section on fonts in twmrc: Code:
# Fontshttp://pastebin.com/2UkvNRVK http://pastebin.com/Di783JB4 And sorry for misleading you with the wrong answer. :( Memory is a bitch. :) |
No worries. Thanks for posting your configs. I tried them and they work.
But when I inserted "xrandr -s 800x600" before starting twm in your .xinitrc, it says it can't find the fontset. Code:
xrandr -s 800x600 # Doesn't workCode:
/usr/bin/twm & |
Start it in the background (put an ampersand after the command). For example:
Code:
xrandr -s 800x600 &Code:
# Title bar buttonsCode:
"Play " f.exec "mocp -l /home/bocke/Music/* &"---------- Post added 11-19-12 at 06:53 PM ---------- Anyway, what's the exact error message? Do you have Dejavu Sans installed on your Debian box? |
Does it work for you to start it in the background? I tried and I get the same error.
The error message says: Code:
twm: unable to open fontset xI tested a few other things, and got some interesting results. This is done from X, after starting it without invoking Xrandr from .xinitrc (thus starting in 1600x1200). Code:
# 1: Quit TWM, so that no window manager is runningCode:
# 1: Quit TWMI don't know if I have Dejavu Sans on the Debian partition, but I've tried dozens of fonts and they all give the same error, even though they are in xfontsel. By the way, xfontsel also says: "Warning: Unable to load any usable fontset"; all fonts show up in xfontsel though. I appreciate you trying to help me with this, but I think it's hopeless. It must be a bug somewhere, probably in TWM. I see that they have messed with the font setting code recently. |
| All times are GMT -5. The time now is 09:59 AM. |