I have a situation where gnome console does not handle vt102 escape sequences properly and therefor need to employ xterm instead. When I run xterm from a gnome terminal window I am presented with an extremely small terminal window employing an almost unreadably small font. I have attempted to set the font size using xrdb and a custom .Xresources file. I can change the colour scheme. I can create a scrollbar. I can move the scrollbar to either the right or left window margin. What I cannot do is to change the font size. When I do xfontsel I get this error: Warning: Missing charsets in String to FontSet conversion and I see only four fonts listed in the application window, all of them small and none with a point size of greater than 12.0.! If I do fc-cache -f -v I see 14+ font directories containing more than 100 fonts # fc-cache -f -v /usr/share/fonts: caching, 0 fonts, 7 dirs /usr/share/fonts/bitmap-fonts: caching, 31 fonts, 0 dirs /usr/share/fonts/bitstream-vera: caching, 10 fonts, 0 dirs . . . fc-cache: succeeded but I also see lots of this: /var/cache/fontconfig: invalid cache file: f93b699072f38b46be29013fc93f1bbe-x86.cache-2 /var/cache/fontconfig: invalid cache file: 7ddba6133ef499da58de5e8c586d3b75-x86.cache-2 I really need some help sorting this out. If someone could explain to me what I am missing I would be most grateful. -- *** E-Mail is NOT a SECURE channel *** James B. Byrne mailto:ByrneJB at Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3
On Fri, Jan 07, 2011, James B. Byrne wrote:>I have a situation where gnome console does not handle vt102 escape >sequences properly and therefor need to employ xterm instead. When >I run xterm from a gnome terminal window I am presented with an >extremely small terminal window employing an almost unreadably small >font. > >I have attempted to set the font size using xrdb and a custom >.Xresources file. I can change the colour scheme. I can create a >scrollbar. I can move the scrollbar to either the right or left >window margin. What I cannot do is to change the font size.An easier way to handle this is to create a $HOME/XTerm file which will be used each time an xterm is started. I'm including mine which sets a large font and several other options I like. Bill -- INTERNET: bill at celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax: (206) 232-9186 Skype: jwccsllc (206) 855-5792 The tyrant who impoverishes the citizens is obliged to make war in order to keep his subjects occupied and impose on them the permanent need of a chief. -- Aristotle -------------- next part -------------- ! !! !! SAMPLE .Xdefaults / app-defaults RESOURCE SPECIFICATIONS FOR XTERM !! ! ! ! !! !! set default tty mode. !! ! !XTerm*ttyModes: intr ^? erase ^H kill ^U ! ! ! !! !! modify mouse functionality so that "Shift <Btn1Down>" has the same !! functionality as "<Btn2Down>". !! !! The Ctrl<Btn2Down> xterm window menu CANNOT be popped up using !! Shift Ctrl<Btn1Down> !! ! !*VT100*translations: #override\ ! Shift <Btn1Down>: insert-selection(PRIMARY, CUT_BUFFER0) \n\ ! Button1 <Btn3Down>: insert-selection(PRIMARY, CUT_BUFFER0) ! !*VT100*Scrollbar*translations: #override\ ! Shift <Btn1Down>: StartScroll(Continuous) MoveThumb() NotifyThumb() \n\ ! Shift <Btn1Motion>: MoveThumb() NotifyThumb() \n\ ! Button1 <Btn3Down>: StartScroll(Continuous) MoveThumb() NotifyThumb() \n\ ! Button1 <Btn3Motion>: MoveThumb() NotifyThumb() ! ! ! !! !! menu resources !! ! !*SimpleMenu*BackingStore: NotUseful !*SimpleMenu*menuLabel.font: -adobe-helvetica-bold-r-normal--*-120-*-*-*-*-iso*-* !*SimpleMenu*menuLabel.vertSpace: 100 !*SimpleMenu*HorizontalMargins: 16 !*SimpleMenu*Sme.height: 16 ! !*SimpleMenu*Cursor: left_ptr !*mainMenu.Label: Main Options !*mainMenu*securekbd*Label: Secure Keyboard !*mainMenu*allowsends*Label: Allow SendEvents !*mainMenu*logging*Label: Log to File !*mainMenu*redraw*Label: Redraw Window !*mainMenu*suspend*Label: Send STOP Signal !*mainMenu*continue*Label: Send CONT Signal !*mainMenu*interrupt*Label: Send INT Signal !*mainMenu*hangup*Label: Send HUP Signal !*mainMenu*terminate*Label: Send TERM Signal !*mainMenu*kill*Label: Send KILL Signal !*mainMenu*quit*Label: Quit ! !*vtMenu.Label: VT Options !*vtMenu*scrollbar*Label: Enable Scrollbar !*vtMenu*jumpscroll*Label: Enable Jump Scroll !*vtMenu*reversevideo*Label: Enable Reverse Video !*vtMenu*autowrap*Label: Enable Auto Wraparound !*vtMenu*reversewrap*Label: Enable Reverse Wraparound !*vtMenu*autolinefeed*Label: Enable Auto Linefeed !*vtMenu*appcursor*Label: Enable Application Cursor Keys !*vtMenu*appkeypad*Label: Enable Application Keypad !*vtMenu*scrollkey*Label: Scroll to Bottom on Key Press !*vtMenu*scrollttyoutput*Label: Scroll to Bottom on Tty Output !*vtMenu*allow132*Label: Allow 80/132 Column Switching !*vtMenu*cursesemul*Label: Enable Curses Emulation !*vtMenu*visualbell*Label: Enable Visual Bell !*vtMenu*marginbell*Label: Enable Margin Bell !*vtMenu*altscreen*Label: Show Alternate Screen !*vtMenu*softreset*Label: Do Soft Reset !*vtMenu*hardreset*Label: Do Full Reset !*vtMenu*tekshow*Label: Show Tek Window !*vtMenu*tekmode*Label: Switch to Tek Mode !*vtMenu*vthide*Label: Hide VT Window ! !*fontMenu.Label: VT Fonts !*fontMenu*fontdefault*Label: Default !*fontMenu*font1*Label: 6x10 !*VT100*font1: 6x10 !*fontMenu*font2*Label: 6x12 !*VT100*font2: 6x12 !*fontMenu*font3*Label: 9x15 !*VT100*font3: 9x15 !*fontMenu*font4*Label: 10x20 !*VT100*font4: 10x20 !*fontMenu*fontescape*Label: Escape Sequence !*fontMenu*fontsel*Label: Selection !!fontescape and fontsel overridden by application ! !*tekMenu.Label: Tek Options !*tekMenu*tektextlarge*Label: Large Characters !*tekMenu*tektext2*Label: #2 Size Characters !*tekMenu*tektext3*Label: #3 Size Characters !*tekMenu*tektextsmall*Label: Small Characters !*tekMenu*tekpage*Label: PAGE !*tekMenu*tekreset*Label: RESET !*tekMenu*tekcopy*Label: COPY !*tekMenu*vtshow*Label: Show VT Window !*tekMenu*vtmode*Label: Switch to VT Mode !*tekMenu*tekhide*Label: Hide Tek Window ! *tek4014*fontLarge: 10x20 *tek4014*font2: 9x15 *tek4014*font3: 6x13 *tek4014*fontSmall: 6x10 XTerm*font: 10x20 XTerm*pointerShape: arrow XTerm*termName: xterm XTerm*blink: true XTerm*loginShell: true XTerm*scrollBar: true ! XTerm*cursorColor: SlateBlue XTerm*cursorColor: red3 XTerm*backarrowKeyIsErase: false ! Xterm.*backarrowKey: true !XTerm*termName: xterm-color XTerm*background: Grey95 !XTerm*background: AntiqueWhite !XTerm*background: seashell2 !XTerm*background: ivory2 XTerm*charClass: 33:48,37:48,43:48,45-47:48,64:48,126:48,95:48 XTerm*ttyModes: intr ^C erase ^H kill ^U ! testing Mon Sep 6 12:16:46 PDT 2010 ! Red Hat Defaults: XTerm*VT100*eightBitInput: 0 XTerm*VT100*backarrowKey: 1 XTerm*VT100*scrollBar: 1 XTerm*VT100*utf8Title: 1
On Fri, 7 Jan 2011, James B. Byrne wrote:> To: centos at centos.org > From: James B. Byrne <byrnejb at harte-lyne.ca> > Subject: [CentOS] Set font and size in xterm > > I have a situation where gnome console does not handle vt102 escape > sequences properly and therefor need to employ xterm instead. When > I run xterm from a gnome terminal window I am presented with an > extremely small terminal window employing an almost unreadably small > font.Have you tried using konsole from KDE desktop packages? kdebase-3.5.4-21.el5.centos.1.i386 : K Desktop Environment - core files Repo : updates Matched from: Filename : /usr/bin/konsole That works well under most linux desktops. Keith ----------------------------------------------------------------- Websites: http://www.karsites.net http://www.php-debuggers.net http://www.raised-from-the-dead.org.uk All email addresses are challenge-response protected with TMDA [http://tmda.net] -----------------------------------------------------------------
According to James B. Byrne:> I have attempted to set the font size using xrdb and a custom > ..Xresources file. I can change the colour scheme. I can create a > scrollbar. I can move the scrollbar to either the right or left > window margin. What I cannot do is to change the font size.That sounds as if your machine does not have the bitmap fonts installed. You can either install them or use the TrueType fonts by using the -fa option from the command-line or setting the faceName resource in your resource-file. The "missing fonts" warning is for less-essential fonts, e.g., for the input-method, etc. -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net
On Mon, January 10, 2011 12:37, Bill Campbell wrote:> On Mon, Jan 10, 2011, James B. Byrne wrote: >> I copied your file into my home directory as ~/XTerm and took a >> look at its contents. As far as I can see you did not intend >> for me to make any alterations to it to begin with. > > James: > > I sent the entire file FYI, and it's yours to hack as you see > fit. Lines starting with "!" are comments and may be removed. >Thanks. I thought as much. It really does seem to come down to the fact that xfs is not finding the fonts and that therefore only the default fonts are left available to XTerm. I have tried configuring the FontPath argument in xorg.conf but all that manages to do is to stop the xserver from starting at all. I looked into the rc script and to me it is a nightmare. To begin with, instead of just configuring the font directories the startup script runs a font locater utility /usr/sbin/chkfontpath. When run from the command line this yields these results: /usr/share/X11/fonts/misc:unscaled /usr/share/X11/fonts/75dpi:unscaled /usr/share/X11/fonts/100dpi:unscaled /usr/share/X11/fonts/Type1 /usr/share/X11/fonts/TTF /usr/share/fonts/default/Type1 /usr/share/fonts/webcore But when I run xset q I do not see these listed: Font Path: built-ins Bug Mode: compatibility mode is disabled DPMS (Energy Star): Standby: 0 Suspend: 0 Off: 0 DPMS is Enabled Monitor is On Font cache: Server does not have the FontCache Extension File paths: Config file: /etc/X11/xorg.conf Modules path: /usr/lib64/xorg/modules Log file: /var/log/Xorg.0.log I would appreciate some guidance on how to proceed from this point. -- *** E-Mail is NOT a SECURE channel *** James B. Byrne mailto:ByrneJB at Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3
I now have fonts! I added the font directories found by /usr/sbin/chkfontpath to the Files Section of the /etc/X11/xorg.conf and following a restart things began to work. The system startup script for xfs makes reference to a /tmp/.font-unix directory. An error message appears on the boot details screen to the effect that lstat reports /tmp/.font-unix does not exist but I can find no reference to this error in any of the logs. After startup I can find that directory but it is empty. I have no idea how this is supposed to work but I suspect that the dynamic discovery and addition of the font directories is failing for some reason. -- *** E-Mail is NOT a SECURE channel *** James B. Byrne mailto:ByrneJB at Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3