Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

help with "xterm", changing font size? [solved]

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
swooshOnLn
l33t
l33t
User avatar
Posts: 741
Joined: Tue Feb 28, 2006 1:04 am
Location: Charlotte, North Carolina
Contact:
Contact swooshOnLn
Website

help with "xterm", changing font size? [solved]

  • Quote

Post by swooshOnLn » Thu Apr 27, 2006 6:37 pm

Hey, I have been trying to follow the output of "xterm --help" to figure otu how to chang the font, font size, and even bg colors and such, but for the life of me cannot figure it out. I have searched wiki, and I didnt find anything. Anybody have a guid or somethign that I could read?
Last edited by swooshOnLn on Fri Apr 28, 2006 12:09 am, edited 1 time in total.
"WARNING: you may LOL"

This is my font size, color, and signature. It will change to whatever I pick. How cool is that?
Top
jure1873
Apprentice
Apprentice
Posts: 183
Joined: Thu Feb 09, 2006 11:43 pm

  • Quote

Post by jure1873 » Thu Apr 27, 2006 6:58 pm

Code: Select all

xterm -font "*bitstream vera sans mono*medium-r*"
Top
nephros
Advocate
Advocate
User avatar
Posts: 2139
Joined: Fri Feb 07, 2003 2:46 am
Location: Graz, Austria (Europe - no kangaroos.)
Contact:
Contact nephros
Website

  • Quote

Post by nephros » Thu Apr 27, 2006 7:00 pm

If it's a tue xterm hold Control and right-click into xterm to change the font size on-the-fly.

From the command line, use -fn and a X font specification string to set the font.
A font specification looks like:
-lfp-bright-*-*-*-*-*-*-*-*-*-*-iso8859-15

The different fields between the hyphens set specific properties like family, name, point size, slant, pixel size, encoding etc.
The canonical tool to chose fonts is xfontsel, which will let you construct such a string.

As for colours, -fg is for foreground and -bg is for background, and those options will take parameters from the output of the "showrgb" tool. Its probalby easier to chose from a palette on the web.

If we put it all together, we get something like this:

Code: Select all

xterm -bg black -fg LavenderBlush4 -fn '-lfp-bright-*-*-*-*-*-*-*-*-*-*-iso8859-15'
You can also use the ~/.Xdefaults file to set these permanently, but there you have to use "X Resource Strings"; the relevant ones for your questions read like this:

Code: Select all

XTerm*font:          -lfp-bright-*-*-*-*-*-*-*-*-*-*-iso8859-15
XTerm*background:    black
XTerm*foreground:    white
BTW, the xterm man page should be a bit easier to grasp than the --help output.

HTH, feel free to follow-up with any questions you have on this.
Please put [SOLVED] in your topic if you are a moron.
Top
swooshOnLn
l33t
l33t
User avatar
Posts: 741
Joined: Tue Feb 28, 2006 1:04 am
Location: Charlotte, North Carolina
Contact:
Contact swooshOnLn
Website

  • Quote

Post by swooshOnLn » Thu Apr 27, 2006 8:55 pm

Code: Select all

xterm -font "*bitstream vera sans mono*medium-r*"
does not seem to work for me, the text is still small, even if i change medium to "large" or such.

the seccond example works. The text is still small however, what would you add to that command line to make the text larger?
"WARNING: you may LOL"

This is my font size, color, and signature. It will change to whatever I pick. How cool is that?
Top
nephros
Advocate
Advocate
User avatar
Posts: 2139
Joined: Fri Feb 07, 2003 2:46 am
Location: Graz, Austria (Europe - no kangaroos.)
Contact:
Contact nephros
Website

  • Quote

Post by nephros » Thu Apr 27, 2006 10:18 pm

As said, you have to encode it in the font string.
for example for Helvetica 14:
-adobe-helvetica-*-r-*-*-14-*-*-*-*-*-iso8859-1

Note that you can't just use any size, the font size must be present on your system. That's why I recommended using xfontsel.
Please put [SOLVED] in your topic if you are a moron.
Top
BitJam
Advocate
Advocate
Posts: 2513
Joined: Tue Aug 12, 2003 4:15 pm
Location: Silver City, NM

  • Quote

Post by BitJam » Thu Apr 27, 2006 10:52 pm

You might want to emerge xtermcontrol which is a small program that lets you modify the xterm settings from within the xterm itself. This makes adjusting things much easier and it has a more limited set of options which makes things easier too. You can adjust more than one thing at a time which makes adjusting the colors doable.

Next, in a separate window, try doing:

Code: Select all

$ cat $(locate fonts.alias) | less
This will give you a list of font aliases that will be easier to type in. If you want just the aliases and not the fonts they correspond to, use:

Code: Select all

$ cat $(locate fonts.alias) | cut -d " " -f 1 | less
It's not perfect but it gives you a good place to start from. As others have said xlsfonts gives a complete listing of all fonts available but this can sometimes feel overwhelming.
Top
swooshOnLn
l33t
l33t
User avatar
Posts: 741
Joined: Tue Feb 28, 2006 1:04 am
Location: Charlotte, North Carolina
Contact:
Contact swooshOnLn
Website

  • Quote

Post by swooshOnLn » Fri Apr 28, 2006 12:08 am

ok thanks guys.
"WARNING: you may LOL"

This is my font size, color, and signature. It will change to whatever I pick. How cool is that?
Top
swooshOnLn
l33t
l33t
User avatar
Posts: 741
Joined: Tue Feb 28, 2006 1:04 am
Location: Charlotte, North Carolina
Contact:
Contact swooshOnLn
Website

  • Quote

Post by swooshOnLn » Fri Apr 28, 2006 12:11 am

BitJam wrote:You might want to emerge xtermcontrol which is a small program that lets you modify the xterm settings from within the xterm itself. This makes adjusting things much easier and it has a more limited set of options which makes things easier too. You can adjust more than one thing at a time which makes adjusting the colors doable.

Next, in a separate window, try doing:

Code: Select all

$ cat $(locate fonts.alias) | less
This will give you a list of font aliases that will be easier to type in. If you want just the aliases and not the fonts they correspond to, use:

Code: Select all

$ cat $(locate fonts.alias) | cut -d " " -f 1 | less
It's not perfect but it gives you a good place to start from. As others have said xlsfonts gives a complete listing of all fonts available but this can sometimes feel overwhelming.

Code: Select all

bash: locate: comand not found
"WARNING: you may LOL"

This is my font size, color, and signature. It will change to whatever I pick. How cool is that?
Top
BitJam
Advocate
Advocate
Posts: 2513
Joined: Tue Aug 12, 2003 4:15 pm
Location: Silver City, NM

  • Quote

Post by BitJam » Fri Apr 28, 2006 1:53 am

swooshOnLn wrote:

Code: Select all

bash: locate: comand not found

Code: Select all

# emerge slocate
# nano /etc/updatedb.conf
# updatedb
You just gotta have locate if you are gonna use Linux. It maintains a database of (almost) all files on your machine so you can quickly find the full path of a file given only the filename.

Anyway, here is a quick alternative for now:

Code: Select all

# cat $(find /usr/share/fonts -name fonts.alias) | less 
Top
Post Reply

9 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic