FAQ
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

Search Discussions

  • Bill Campbell at Jan 7, 2011 at 3:00 pm

    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
  • James B. Byrne at Jan 10, 2011 at 12:14 pm

    On Fri, January 7, 2011 15:00, Bill Campbell wrote:
    On Fri, Jan 07, 2011, James B. Byrne wrote:
    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.
    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.

    With this file in place and ~/.Xresources renamed to
    ~/Xresources.test I started xterm from a gnome terminal. There were
    several changes in behaviour, so I infer that the file is recognized
    and loaded by xterm. However, the font size remains unchanged. I
    suspect that there is something wrong with the xfont configuation on
    this system since xfontsel can only see four fonts and there are
    literally dozens available. Since xterm apparently only knows about
    four fonts then it cannot be altered to use any other.

    How do I get xterm to recognize the availability of these additional
    fonts?


    --
    *** 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
  • James B. Byrne at Jan 10, 2011 at 2:43 pm

    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
  • James B. Byrne at Jan 10, 2011 at 3:14 pm
    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
  • Keith Roberts at Jan 7, 2011 at 4:23 pm

    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]
    -----------------------------------------------------------------
  • Robert Heller at Jan 7, 2011 at 4:39 pm
    At Fri, 7 Jan 2011 21:23:40 +0000 (GMT) CentOS mailing list wrote:
    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
    Or, you put the desired options for your XTerm in the X11 options
    database using xrdb.

    Create a .Xdefaults and arrange to load it during X session
    startup (I have no clue if the GNome desktop system even looks for this
    file). If GNome does not do this on itself, include a line like

    xrdb .Xdefaults

    in a script run at X session start up.

    Into this file you will want something like:

    XTerm*background: green
    XTerm*foreground: black
    XTerm*cursorColor: red
    Xterm*VT100*geometry: 80x38
    XTerm*scrollBar: true
    XTerm*font: -misc-fixed-medium-r-normal-*-15-*-*-*-*-*-*-1

    This is *my* setup: my xterms have a green background, with black text,
    a red cursor, an VT100 geometry of 80x38 (characters), with a scrollbar,
    and using the font specified by
    '-misc-fixed-medium-r-normal-*-15-*-*-*-*-*-*-1'.

    More information:

    man xrdb
    man xterm
    -----------------------------------------------------------------
    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]
    -----------------------------------------------------------------
    _______________________________________________
    CentOS mailing list
    CentOS at centos.org
    http://lists.centos.org/mailman/listinfo/centos
    --
    Robert Heller -- 978-544-6933 / heller at deepsoft.com
    Deepwoods Software -- http://www.deepsoft.com/
    () ascii ribbon campaign -- against html e-mail
    /\ www.asciiribbon.org -- against proprietary attachments
  • Mark Roth at Jan 7, 2011 at 4:42 pm
    Robert Heller wrote:
    <snip>
    This is *my* setup: my xterms have a green background, with black text,
    a red cursor, an VT100 geometry of 80x38 (characters), with a scrollbar,
    and using the font specified by
    '-misc-fixed-medium-r-normal-*-15-*-*-*-*-*-*-1'.
    <snip>
    Here's a related question: I've played around in the past, but have never
    gotten it to work: I want to arrange *where* firefox and thunderbird come
    up on my screen. They don't *seem* to recognize -geometry.... Any idea?

    mark
  • Robert Heller at Jan 7, 2011 at 5:23 pm

    At Fri, 7 Jan 2011 16:42:56 -0500 CentOS mailing list wrote:
    Robert Heller wrote:
    <snip>
    This is *my* setup: my xterms have a green background, with black text,
    a red cursor, an VT100 geometry of 80x38 (characters), with a scrollbar,
    and using the font specified by
    '-misc-fixed-medium-r-normal-*-15-*-*-*-*-*-*-1'.
    <snip>
    Here's a related question: I've played around in the past, but have never
    gotten it to work: I want to arrange *where* firefox and thunderbird come
    up on my screen. They don't *seem* to recognize -geometry.... Any idea?
    You are basically out of luck, unless there is something in the depths
    of .gtk<mumble> or .gconf<mumble> that handles this.

    GNome / GTK applications don't look at the X11 database and don't take
    any of the traditional X11 application command like arguments (even when
    they are listed in the man pages for said applications!).
    mark

    _______________________________________________
    CentOS mailing list
    CentOS at centos.org
    http://lists.centos.org/mailman/listinfo/centos
    --
    Robert Heller -- 978-544-6933 / heller at deepsoft.com
    Deepwoods Software -- http://www.deepsoft.com/
    () ascii ribbon campaign -- against html e-mail
    /\ www.asciiribbon.org -- against proprietary attachments
  • Thomas Dickey at Jan 8, 2011 at 10:04 am

    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcentos @
categoriescentos
postedJan 7, '11 at 2:33p
activeJan 10, '11 at 3:14p
posts10
users6
websitecentos.org
irc#centos

People

Translate

site design / logo © 2022 Grokbase