Discussion:
Zutty fonts - zutty always uses the same font and fontsize
(too old to reply)
Richmond
2024-05-01 12:10:01 UTC
Permalink
I am puzzled by the zutty terminal emulator. I have tried:

1186 zutty -fontpath /usr/share/fonts/X11/ -fontsize 20
1187 zutty -fontpath /usr/share/fonts/X11/ -font adobe
1190 zutty -fontpath /usr/share/fonts/X11/misc/ -fontsize 20
1191 zutty -fontpath /usr/share/fonts/X11/misc/ -fontsize 24
1192 zutty -fontpath /usr/share/fonts/X11/misc/ -fontsize 12
1193 zutty -font 9x20
1198 zutty -fontsize 10x20
1199 zutty -fontpath /usr/share/fonts/X11/misc/ -fontsize 10x20
1200 zutty -font 10x20

I clearly have fonts:

find /usr/share/fonts -print|grep "x20"
/usr/share/fonts/X11/misc/10x20-ISO8859-9.pcf.gz
/usr/share/fonts/X11/misc/10x20-ISO8859-3.pcf.gz
/usr/share/fonts/X11/misc/10x20-ISO8859-11.pcf.gz
...


Nothing I have tried works, zutty always uses the same rather small
font.

https://tomscii.sig7.se/zutty/doc/USAGE.html#Font%20selection

Has this package been implemented correctly?

aptitude show zutty
Package: zutty
Version: 0.14.0.20230218+dfsg1-1

cat /etc/issue
Debian GNU/Linux 12 \n \l
Sirius
2024-05-01 12:40:01 UTC
Permalink
Post by Richmond
1186 zutty -fontpath /usr/share/fonts/X11/ -fontsize 20
1187 zutty -fontpath /usr/share/fonts/X11/ -font adobe
1190 zutty -fontpath /usr/share/fonts/X11/misc/ -fontsize 20
1191 zutty -fontpath /usr/share/fonts/X11/misc/ -fontsize 24
1192 zutty -fontpath /usr/share/fonts/X11/misc/ -fontsize 12
1193 zutty -font 9x20
1198 zutty -fontsize 10x20
1199 zutty -fontpath /usr/share/fonts/X11/misc/ -fontsize 10x20
1200 zutty -font 10x20
find /usr/share/fonts -print|grep "x20"
/usr/share/fonts/X11/misc/10x20-ISO8859-9.pcf.gz
/usr/share/fonts/X11/misc/10x20-ISO8859-3.pcf.gz
/usr/share/fonts/X11/misc/10x20-ISO8859-11.pcf.gz
Use 'xlsfonts' to see what fonts are available and use those names.
I can get it working with "zutty -font 12x24" and other numerically named
fonts. Trying with something like 'lucidasans-24' will make it dump core
however.

Maybe it respects what you tell it via .Xresources or what the file used
to be called, when you had to configure fonts by sitting with xfontsel and
try and work out what would look decent. The manual pages for xterm should
have enough clues for how to configure that - I have already forgotten all
that stuff as it no longer is required with the more modern terminal
emulators.
Post by Richmond
Nothing I have tried works, zutty always uses the same rather small
font.
https://tomscii.sig7.se/zutty/doc/USAGE.html#Font%20selection
Has this package been implemented correctly?
aptitude show zutty
Package: zutty
Version: 0.14.0.20230218+dfsg1-1
cat /etc/issue
Debian GNU/Linux 12 \n \l
zutty is kind of only necessary when you want something *really*
lightweight and you do not need to worry about UTF-8. Just writing this
means a trip down memory lane and back to configuring CTWM on old Sun 5
workstations back in the 90's. If Debian still packages it, look for rxvt
instead, or use xterm. Both are well tried and well tested for when you
want something .. dated. ;)
--
Kind regards,

/S
Greg Wooledge
2024-05-01 13:20:01 UTC
Permalink
Post by Sirius
zutty is kind of only necessary when you want something *really*
lightweight and you do not need to worry about UTF-8. Just writing this
means a trip down memory lane and back to configuring CTWM on old Sun 5
workstations back in the 90's. If Debian still packages it, look for rxvt
instead, or use xterm. Both are well tried and well tested for when you
want something .. dated. ;)
The original rxvt is no longer packaged in Debian, as far as I can see.
There's rxvt-unicode, which is what I use, which has most of the same
look and feel as rxvt, but is substantially larger.

Between xterm and rxvt-unicode you should have most of your "basic
no-frills terminal" needs met by one or the other.
Sirius
2024-05-01 15:00:01 UTC
Permalink
Post by Greg Wooledge
Post by Sirius
zutty is kind of only necessary when you want something *really*
lightweight and you do not need to worry about UTF-8. Just writing this
means a trip down memory lane and back to configuring CTWM on old Sun 5
workstations back in the 90's. If Debian still packages it, look for rxvt
instead, or use xterm. Both are well tried and well tested for when you
want something .. dated. ;)
The original rxvt is no longer packaged in Debian, as far as I can see.
There's rxvt-unicode, which is what I use, which has most of the same
look and feel as rxvt, but is substantially larger.
I pulled down rxvt-unicode and started looking at how to configure it up
so that it works more or less like kitty (which is what I normally use).
Post by Greg Wooledge
Between xterm and rxvt-unicode you should have most of your "basic
no-frills terminal" needs met by one or the other.
I was right about .Xresources that it is one of the files used for loading
settings into the X server, but urxvt looks at .Xdefaults instead. If one
puts something like the below into .Xdefaults in $HOME, it works with
Powerline and it does not look too terrible.

Rxvt.depth: 24
Rxvt.jumpScroll: on
Rxvt.fading: 20
Rxvt.background: #101010
Rxvt.foreground: #efefef
Rxvt.cursorColor: #dd8888
Rxvt.font: xft:Hack:pixelsize=16,xft:Powerline:pixelsize=16
Rxvt.boldFont: xft:Hack Bold:pixelsize=16,xft:Powerline:pixelsize=16
Rxvt.italicFont: xft:Hack Italic:pixelsize=16,xft:Powerline:pixelsize=16
Rxvt.boldItalicFont: xft:Hack BoldItalic:pixelsize=16,xft:Powerline:pixelsize=16
Rxvt.loginShell: on
Rxvt.visualBell: on
Rxvt.scrollBar_right: on
Rxvt.scrollBar_floating: on
Rxvt.saveLines: 5000
Rxvt.termName: xterm-256color
Rxvt.disablePasteBrackets: off

As per usual, getting the fonts right was the hardest part. As for memory
use..

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
sirius 56392 0.1 0.1 48136 28160 ? S 16:48 0:00 /usr/bin/urxvt
sirius 56393 0.0 0.0 21928 816 ? S 16:48 0:00 /usr/bin/urxvt
sirius 56465 0.1 0.1 43192 23232 ? S 16:52 0:00 /usr/bin/urxvt
sirius 56466 0.0 0.0 21928 820 ? S 16:52 0:00 /usr/bin/urxvt
sirius 56532 2.5 1.0 745480 150828 ? Sl 16:54 0:02 /usr/bin/kitty
sirius 56533 1.5 0.2 61388 35692 ? Ss 16:54 0:01 /usr/bin/kitty
sirius 56595 0.0 0.0 9212 2096 pts/2 S+ 16:55 0:00 grep kitty\|rxvt\|USER

Good old urxvt is quite lightweight compared to kitty.
--
Kind regards,

/S
Max Nikulin
2024-05-02 02:40:01 UTC
Permalink
Post by Sirius
I was right about .Xresources that it is one of the files used for loading
settings into the X server, but urxvt looks at .Xdefaults instead.
It is a bit strange. Applications should not read these files directly.
Content should be loaded during X session startup, see
/etc/X11/Xsession.d/30x11-common_xresources

After modification of .Xresources it is necessary to invoke xrdb(1).

Per-application files are in /etc/X11/app-defaults/
Post by Sirius
Good old urxvt is quite lightweight compared to kitty.
I am unsure concerning real degree of danger, just a warning:

https://dgl.cx/2023/09/ansi-terminal-security
Post by Sirius
Additionally some terminals support C1 controls in UTF-8 encoded text,
which per this 2015 posting to oss-security is problematic. Some
terminals have the ability to turn this off, if they do not such as
Kitty I cannot recommend their use.
Greg Wooledge
2024-05-02 03:20:01 UTC
Permalink
Post by Max Nikulin
Post by Sirius
I was right about .Xresources that it is one of the files used for loading
settings into the X server, but urxvt looks at .Xdefaults instead.
It is a bit strange. Applications should not read these files directly.
Content should be loaded during X session startup, see
/etc/X11/Xsession.d/30x11-common_xresources
After modification of .Xresources it is necessary to invoke xrdb(1).
I'm not sure about rxvt-unicode, but the original rxvt definitely
worked that way. This was part of the lightweight design of rxvt.
The author didn't want the bloat involved in reading the X resource
database, so he chose to read the source files directly.

According to <https://linux.die.net/man/1/rxvt>:

RESOURCES (available also as long-options)

Note: 'rxvt --help' gives a list of all resources (long options)
compiled into your version. If compiled with internal Xresources
support (i.e. rxvt -h lists .Xdefaults) then rxvt accepts application
defaults set in XAPPLOADDIR/Rxvt (compile-time defined: usually
/usr/lib/X11/app-defaults/Rxvt) and resources set in ~/.Xdefaults,
or ~/.Xresources if ~/.Xdefaults does not exist.


The corresponding section of the rxvt-unicode man page (in Debian 12)
is a bit confusing to me:

You can set and change the resources using X11 tools like xrdb. Many
distribution do also load settings from the ~/.Xresources file when X
starts. urxvt will consult the following files/resources in order, with
later settings overwriting earlier ones:

1. app-defaults file in $XAPPLRESDIR
2. $HOME/.Xdefaults
3. RESOURCE_MANAGER property on root-window of screen 0
4. SCREEN_RESOURCES property on root-window of the current screen
5. $XENVIRONMENT file OR $HOME/.Xdefaults-<nodename>
6. resources specified via -xrm on the commandline

It says you can use xrdb, but then lists the places it looks, and that
list does not include xrdb(?). I don't understand what this means.
Max Nikulin
2024-05-02 03:50:01 UTC
Permalink
Post by Greg Wooledge
Post by Max Nikulin
Post by Sirius
I was right about .Xresources that it is one of the files used for loading
settings into the X server, but urxvt looks at .Xdefaults instead.
It is a bit strange. Applications should not read these files directly.
Content should be loaded during X session startup, see
/etc/X11/Xsession.d/30x11-common_xresources
After modification of .Xresources it is necessary to invoke xrdb(1).
I'm not sure about rxvt-unicode, but the original rxvt definitely
worked that way.
Almost certainly I was wrong. .Xresources should be read by xrdb, while
.Xdefaults (older method) is read by applications.
https://superuser.com/questions/243914/what-is-the-difference-between-xresources-and-xdefaults
Post by Greg Wooledge
1. app-defaults file in $XAPPLRESDIR
2. $HOME/.Xdefaults
3. RESOURCE_MANAGER property on root-window of screen 0
4. SCREEN_RESOURCES property on root-window of the current screen
5. $XENVIRONMENT file OR $HOME/.Xdefaults-<nodename>
6. resources specified via -xrm on the commandline
It says you can use xrdb, but then lists the places it looks, and that
list does not include xrdb(?). I don't understand what this means.
Items 3 and 4 in this list are places where xrdb stores properties.
Richmond
2024-05-02 08:30:01 UTC
Permalink
Post by Sirius
Good old urxvt is quite lightweight compared to kitty.
It understands the font names from xfontsel which is a major improvement
on zutty.

urxvt -bg black -fn -*-courier-*-r-*-*-24-*-*-*-*-*-*-*

8)
Max Nikulin
2024-05-04 14:40:02 UTC
Permalink
Post by Richmond
It understands the font names from xfontsel which is a major improvement
on zutty.
I have nothing against raster fonts for terminal applications, but I am
surprised that support of X Logical Font Description may be considered
as an improvement in comparison with an application relying on fontconfig.

I have never tried zutty, but I would expect something like (assuming
fonts-liberation2 installed)

zutty -font LiberationMono -fontsize 24

However applications are usually more liberal concerning specifying
vector fonts and use various fallbacks and substitutions.

Richmond
2024-05-01 17:00:02 UTC
Permalink
Post by Sirius
I can get it working with "zutty -font 12x24" and other numerically
named fonts.
Wow that one actually worked. That's the first time I've seen a
different font in zutty!
Post by Sirius
Trying with something like 'lucidasans-24' will make it dump core
however.
I got this error:

zutty -font lucidasans-24 E [fontpack.cc:218] Error: No Regular variant
of the requested font 'lucidasans-24' could be identified. terminate
called after throwing an instance of 'std::runtime_error' what(): No
suitable files for 'lucidasans-24' found!
Karl Vogel
2024-05-02 03:40:01 UTC
Permalink
If Debian still packages it, look for rxvt instead, or use xterm. Both
are well tried and well tested for when you want something.. dated. ;)
I resemble that remark. Xterm v390 was released on 19 Feb 2024, and
building it from source is easy.

https://invisible-island.net/archives/xterm/xterm-390.tgz{,.asc}
--
Karl Vogel I don't speak for anyone but myself

My mind is like my browser: 19 open tabs, three of them are frozen, and
I have no clue where the music is coming from.
Sirius
2024-05-02 05:10:01 UTC
Permalink
Post by Karl Vogel
If Debian still packages it, look for rxvt instead, or use xterm. Both
are well tried and well tested for when you want something.. dated. ;)
I resemble that remark. Xterm v390 was released on 19 Feb 2024, and
building it from source is easy.
https://invisible-island.net/archives/xterm/xterm-390.tgz{,.asc}
It was meant tongue-in-cheek. OP's post prompted me to start digging into
urxvt and it is now my default terminal. :)

Modern terminals like Gnome-terminal, Konsole, alacritty, kitty and others
are essentially slapping a spruced-up UI on top of something that is 40+
years old. Tab-handling is one of the things that kitty does well that I
really like. But when it takes over ten times the memory for a single
instance compared to urxvt - I can forego the tab-handling and have
multiple windows instead. (Not looked yet if there is urxvt patches for
kitty style tab handling - which would be awesome if it exists.)

And as someone pointed out about the control character handling, there is
a security aspect to pay attention to as well. Xterm and Rxvt have both
been down this road for so long that they have that side of things
relatively well handled.

I've seen zutty because it was installed by default, but I have no idea
why it is installed by default. It does not strike me as the best choice
when both xterm and rxvt are available.
Post by Karl Vogel
My mind is like my browser: 19 open tabs, three of them are frozen, and
I have no clue where the music is coming from.
Oh, I soooo identify with this one.
--
Kind regards,

/S
Sirius
2024-05-02 05:40:01 UTC
Permalink
Post by Sirius
Tab-handling is one of the things that kitty does well that I
really like. But when it takes over ten times the memory for a single
instance compared to urxvt - I can forego the tab-handling and have
multiple windows instead. (Not looked yet if there is urxvt patches for
kitty style tab handling - which would be awesome if it exists.)
To follow up on this:
https://github.com/gryf/tabbedalt

$ mkdir -p ~/.urxvt/ext/
$ wget -O ~/.urxvt/ext/tabbedalt https://raw.githubusercontent.com/gryf/tabbedalt/master/tabbedalt
$ echo "URxvt.perl-ext: tabbedalt" >> .Xdefaults

Now you have tabs in urxvt.
--
Kind regards,

/S
Loading...