LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 07-17-2007, 12:10 PM   #1
matthew1181
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Rep: Reputation: 0
Changing fonts in rxvt and mc


Hello, I'm trying to change the fonts in my terminal (rxvt) and file manager (Midnight Commander). I may just want to change the font size. I'm using fluxbox, but I don't think it's a setting that fluxbox controls. Is it something I change in .Xdefaults (under user directory)? I tried someone else's .Xdefaults file, which had listed

rxvt*font: ter-128b

but that is too small.

Thanks.

Last edited by matthew1181; 07-17-2007 at 12:24 PM.
 
Old 07-17-2007, 08:09 PM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
mc doesn't have fonts; that's dependent on the terminal emulator. And some have their own config files but xterm (and rxvt, I believe), do indeed use .Xdefaults or .Xresources or whatever script you have xrdb read. That looks like an alias for a terminus font but I'm not sure/can't remember what the 128 is. In a full XLFD, you'd have:

-xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso8859-1
-xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso8859-1

and you'd want to change the pixel size/point size (20-200/24-240). So if it's too small, just try one bigger, run 'xrdb -merge FILE', and launch rxvt again. You can use 'xlsfonts' (or xfontsel) to see what options you have for font choices.
 
Old 07-17-2007, 08:10 PM   #3
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Just noticed this was your first post - welcome to LQ.
 
Old 07-18-2007, 09:04 AM   #4
matthew1181
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Yes, it's an alias for Terminus.

I did not have them installed correctly -- well, I may not still. I got them from here:

http://www.is-vn.bg/hamster/jimmy-en.html

It has a section that says:

Quote:
Slackware package:

source: terminus-font.SlackBuild, slack-desc

To build and install a Slackware package: download terminus-font.SlackBuild, slack-desc, terminus-font-4.20.tar.gz and any character variants you'd like, then as root execute "sh ./terminus-font.SlackBuild" and "installpkg /tmp/terminus-font-4.20-noarch-4dtz.tgz".
I did this and they're showing up in xlsfonts and xfontsel now. However I still don't know how to get rxvt and mc displaying them. I edit a .Xdefaults file in my /home/<usr> directory? or is it the .Xdefaults in /home/?

Trying to change

Quote:
rxvt*font: ter-128b
in the .Xdefaults did not seem to work -- I think it registers that as a non-font and supplies something else.

- Matthew

p.s. Yes, second post here. Thanks for the help!
 
Old 07-18-2007, 09:13 AM   #5
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,183

Rep: Reputation: 284Reputation: 284Reputation: 284
You need to start rxvt with the font in the command line:

xrvt -fn xxxx

xfontsel will allow you to pick a font.

xrvt -h for other settings.
 
Old 07-18-2007, 09:25 AM   #6
matthew1181
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Original Poster
Rep: Reputation: 0
"rxvt -fn <XLFD>" works, but I'm looking for permanent settings. (It returns to the old font after closing the window).
 
Old 07-18-2007, 09:37 AM   #7
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
You can do as dive says to see if you can get it working at all and, if it does, even make an alias to make the font flag automatic, but xrdb is the usual course.

Quote:
Originally Posted by matthew1181
I edit a .Xdefaults file in my /home/<usr> directory? or is it the .Xdefaults in /home/?
It would probably be /home/$USER, yes, though it can be any file. I don't use a display manager, so start X with 'startx', which means my ~/.xinitrc gets read and, in that file, I have
Code:
xrdb -merge ~/.xresources
So that's the file it is for me (the uppercase bugged me). I think the default is to read a system-wide file and then ~/.Xdefaults or ~/.Xresources

Quote:
Originally Posted by matthew1181
Trying to change

rxvt*font: ter-128b

in the .Xdefaults did not seem to work -- I think it registers that as a non-font and supplies something else.
Change to what? What was the result? Specifying things like this will help you get help. Depending on what your fonts.alias in your terminus directory says, you may need to specify different things but, as long as X is aware of the fonts the XLFD (the full weird string) should always work. If it said something like 'unable to find font foo, defaulting to "fixed"', then, yeah, it's not finding the font, but if you feed in what xlsfonts spits out, that shouldn't happen.

As I say, you will need to run 'xrdb -merge ~/.Xdefaults' to get the config changes to rxvt to take effect. You didn't specify whether you did that.

Quote:
Originally Posted by matthew1181
p.s. Yes, second post here. Thanks for the help!
Welcome.
 
Old 07-18-2007, 09:40 AM   #8
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Dunno how I missed your last post. So that's good. It's not a font issue but purely an .Xdefaults or xrdb issue. One other thing to try is 'xprop WM_CLASS' on an rxvt window to make sure its class is 'rxvt', but it certainly is. So doing something like

Code:
XTerm*font: -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso8859-1
(only with 'rxvt' or 'Rxvt' or whatever, and your preferred font) should work.
 
Old 07-18-2007, 09:41 AM   #9
matthew1181
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Ah ha! I solved it.

Okay this is what you do.

You must include the full XLFD in the .Xdefaults of your user directory. Or, if you include an alias, I must be typing it wrong, so I have used the XLFD instead.

I used -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso8859-1.

So in /home/<user>/.Xdefaults I have:

Quote:
rxvt*font: -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso8859-1
and now Midnight Commander looks like this on 1280x960 resolution in Fluxbox:

http://img400.imageshack.us/img400/9...erminusbn1.png


Thanks for the help everyone!
 
Old 07-18-2007, 09:44 AM   #10
matthew1181
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Sorry digiot -- I must have been in the midst of posting that while you were responding. By the way, it seems to have worked without using 'xrdb -merge ~/.Xdefaults'.

Last edited by matthew1181; 07-18-2007 at 09:46 AM.
 
Old 07-18-2007, 03:10 PM   #11
MannyNix
Member
 
Registered: Dec 2005
Location: ~
Distribution: Slackware -current, OpenBSD
Posts: 449

Rep: Reputation: 41
If you're in a hurry or just lazy, just press
Code:
shift + <--(keypad)
or - to increase/decrease font size
 
Old 07-19-2007, 07:37 AM   #12
pdw_hu
Member
 
Registered: Nov 2005
Location: Budapest, Hungary
Distribution: Slackware, Gentoo
Posts: 346

Rep: Reputation: Disabled
You can also try running xlsfonts to see how your font would look like.
 
Old 03-11-2010, 07:00 PM   #13
mdooligan
Member
 
Registered: Feb 2009
Location: Vancouver BC
Distribution: Mandrake 10
Posts: 43

Rep: Reputation: 8
rxvt fonts

Been playing with this for a while and this one worked beautifully for me:

rxvt -fn -misc-fixed-medium-r-normal-*-15-*-*-*-*-*-*-*

Nice and readable. Has all the line drawing chars for mc also.
 
  


Reply

Tags
commander, font, midnight, rxvt


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Fonts In Fluxbox Colonel-1990 Linux - Software 3 01-22-2006 06:26 AM
Changing Fonts in Fedora Cabeza de Huevo Linux - General 2 10-12-2005 11:31 PM
changing xchat fonts Maintech Linux - Software 0 05-27-2005 12:25 AM
fonts in rxvt tincat2 Linux - General 0 01-28-2004 04:35 AM
localized fonts in rxvt & midnight commander / mandrake 9.1 2dope Linux - Newbie 0 07-25-2003 09:38 PM


All times are GMT -5. The time now is 07:43 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration