WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: RXVT terminal install in 3 steps  (Read 6107 times)

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
RXVT terminal install in 3 steps
« on: February 05, 2018, 01:36:55 AM »
I wanted to replace aterm with a terminal that supported TTF font scaling, even though I'm running the bare Xvesa / XFbdev and not a full xorg.

Since aterm does not support TTF fonts, don't bang your head against the wall.  RXVT, it's successor, does.  And, the Tinycore images already have the Luxi true-type font baked in.

Installation and configuration was super easy on TC 8.2.1

1) Install the rxvt.tcz from your favorite repo.

2) Edit your ~/.Xdefaults file with the following additions:

Code: [Select]
URxvt*font: xft:Luxi Mono: size 16
URxvt*foreground: white
URxvt*background: black

3) Take care with the font line, and change the size to whatever you need.

This is not a full treatise on every rxvt option, but should be enough to whet your appetite. :)

Interestingly enough, if you do
Code: [Select]
xset q
you'll see the font paths, but doesn't point to the TTF font directory.  The Luxi font is baked in (/usr/local/lib/X11/fonts/TTF/), and merely installing rxvt seems to pick up on the built-in Luxi fonts automatically.

On my low end box, the TTF fonts are obviously a GREAT improvement over the standard X11 fonts, but I'm not doing anything special like using xorg or going bananas with font hinting, lcd filtering etc.  Changing foreground and background colors to less contrasty combinations tends to hide small imperfections, such as a black foreground on a gray background.  Not pretty, but gets the job done!

« Last Edit: February 05, 2018, 01:44:00 AM by PDP-8 »
That's a UNIX book! - cool  -- Garth

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: RXVT terminal install in 3 steps
« Reply #1 on: February 05, 2018, 10:00:54 AM »
I tried a bunch of different fonts while I was building and testing rxvt. Did you try the Hack font yet? The differences between fonts aren't too significant at small sizes, but in the range you're using it really makes a difference.

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 662
Re: RXVT terminal install in 3 steps
« Reply #2 on: February 05, 2018, 11:19:21 AM »
When font speaking, i like the Terminus a lot.
Sorry for take this thread. And sorry it not the ttf one, it is fixed one.

http://terminus-font.sourceforge.net/

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: RXVT terminal install in 3 steps
« Reply #3 on: February 05, 2018, 12:47:56 PM »
UGH!  Remember how I said to take it easy with the font line?  Heh, if you leave out the "=" sign when choosing a size, you won't get any errors, but you'll just get the default size.

Let's try this again, but this time with the = sign:
Code: [Select]
URxvt*font: xft:Luxi Mono: size=16
want it bold?
Code: [Select]
URxvt*font: xft:Luxi Mono:style=Bold:size=16
The point of this for me was to be minimal, and use the fonts already shipped in the image.  Sure I could add more to my liking assuming online connectivity.  Since Luxi TTF already comes with the TC image, I'd like to make the request to change the default from Aterm to Rxvt to make use of it "out of the box" without assuming online capabilities. Not so with Picore.

It's been a fun learning experience knowing when to use xset +fp, mkfontdir, mkfontscale and when it's not needed with built-ins.  And when to use Terminus even IF you have ttf fonts available.

The differences between Tc and Picore in regards to fonts is not insurmountable.  It's been fun whipping them both into shape. :)


That's a UNIX book! - cool  -- Garth

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: RXVT terminal install in 3 steps
« Reply #4 on: February 05, 2018, 12:59:20 PM »
Kind of related:

While doing a lot of vi-foo with my .Xdefaults file changing and testing things, an invisible character crept in.  Rxvt suddenly couldn't resolve the color "black" and changed it to pink!!

What?  The .Xdefaults file *looks* perfect.  What's going on?

Learned this back in my Slackware days - go back through each line, and edit with a true carriage return on each one.

Bingo - now I have black fonts again, even though the heavily edited .Xdefaults file looked perfect to my eyes.  Something crept in or got left out invisibly.
That's a UNIX book! - cool  -- Garth

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: RXVT terminal install in 3 steps
« Reply #5 on: February 05, 2018, 01:30:06 PM »
Special characters should show up with a caret and a letter and blue if you're using vim. And if you're using vim getting rid of the DOSish carriage returns is easy. If you use the broken excuse for a vi clone from busybox you're in for some extra challenges.

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: RXVT terminal install in 3 steps
« Reply #6 on: February 06, 2018, 03:53:41 PM »
Fortunately my vi use is pretty simple, but I dig vim on other boxes.  I actually think I started with elvis on slackware back in the day.

I know nano will show some characters, but I tended to rely on the following over the years:

Code: [Select]
sed -n 'l' foofile.txt
Thing is, that doesn't work in busybox's sed, so I had to download gnused.  I purposely introduced a bunch of invisible characters, and bummer - busybox sed doesn't pick those up.

Heh, I think I'm having my first nerd meltdown.  Luckily busybox's cat doesn't incorporate -v, -T, -A, -E options (that's not really cat's job! - see my sig), but I'm kind of bummed that the code above doesn't work with busybox sed.  ..off to research..

Still, in both nano and busybox vi, I *can* see characters like ^l , ^h, ^@, and ^K.  Maybe that's enough for me...

For me I've bought into the whole busybox scenario, so I'm trying hard not to just do wholesale replacements with the core-utils.  ...keeping it fun ....I think... :)

« Last Edit: February 06, 2018, 04:14:21 PM by PDP-8 »
That's a UNIX book! - cool  -- Garth

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: RXVT terminal install in 3 steps
« Reply #7 on: February 06, 2018, 04:58:32 PM »
It good to be aware of busybox quirks, so when you get on another box that uses it like VMware's ESX you already know not to use the "s" command in vi and use sed instead. I'm not enough of a vi power user to know the differences between vim and elvis without looking them up, but I can conjure up some mean regex when I need to.

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: RXVT terminal install in 3 steps
« Reply #8 on: February 09, 2018, 12:54:30 AM »
That's kind of the mindset I'm in - if something isn't built in, or is unnecessary, then perhaps back to the toolkit basics.  Makes it fun.  Elvis went beyond vi and turned into an html display, but I already had lynx for that....

Almost forgot - the most important URxvt setting is to get that NeXt scrollbar style.  If it was good enough for Sir Tim Berners Lee, it's good enough for me... :)  (I like it)

Code: [Select]
URxvt*scrollstyle: next

Makin' aterm jealous...
That's a UNIX book! - cool  -- Garth