FS#49606 - [cmatrix] -l or -x switch for 'linux mode' not working

Attached to Project: Community Packages
Opened by Chris (TobalJackson) - Tuesday, 07 June 2016, 15:24 GMT
Last edited by Jelle van der Waa (jelly) - Sunday, 03 September 2023, 09:44 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description: When running `cmatrix -l` or `cmatrix -x` the program shows only a blank terminal. Highlighting the terminal contents shows the program is running with 'invisible' font/characters. Investigating revealed the mtx.pcf file not being registered properly which *may* have something to do with the issue.



Additional info:
* package version(s): 1.2a-11
* running in Terminator under XFCE4 with following env:
LANG=en_US.UTF-8
SHELL=/usr/bin/zsh
TERM=xterm-256color

Steps to reproduce:

cmatrix -l
or
cmatrix -x
This task depends upon

Closed by  Jelle van der Waa (jelly)
Sunday, 03 September 2023, 09:44 GMT
Reason for closing:  Won't implement
Comment by Doug Newgard (Scimmia) - Wednesday, 08 June 2016, 14:10 GMT
define "not being registered properly"
Comment by Chris (TobalJackson) - Wednesday, 08 June 2016, 15:27 GMT
Looking at the wiki https://wiki.archlinux.org/index.php/Fonts#Manual_installation, it basically describes how XServer has to have registered a font for it to be usable by xwindows programs (does this include terminal emulators?). It demonstrates the usage of `xlsfonts` to show which fonts have been registered, like this forum post where someone is trying to accomplish something similar: https://bbs.archlinux.org/viewtopic.php?id=88382.

When running `xlsfonts | grep mtx` or `xlsfonts | grep matrix` after installing cmatrix, neither command lists the font as having been 'registered' for use by XServer. That being said, I'm not sure how necessary this is for a terminal-based program, however the documentation seems to imply that there is a mode specifically intended to support X-windows:

`$ man cmatrix`
...
-x X window mode, use if your xterm is using mtx.pcf
...

So I went ahead and registered the mtx.pcf font (found under /usr/share/fonts/misc/mtx.pcf) by running the commands:
`$ cp /usr/share/fonts/misc/mtx.pcf ~/.local/share/fonts/`
`$ xset -fp ~/.local/share/fonts/`
`$ xset -fp rehash`

and then `xlsfonts | grep mtx` indeed shows an entry for mtx. At this point, I've been referring to this article on how to manage fonts: http://gobase.org/dict/JIS/helponXfonts.html, and it lists the final command `xfd -fn <fontname>` in order to display the character set of a registered font, which I ran:
`$ xfd -fn mtx` which produces the following: https://i.imgur.com/TUmLJZy.png

This indicates that the font file is intact and functional, however running `cmatrix -l` or `cmatrix -x` at this point still results in a blank window for me under terminator, xterm, xfce terminal, gnome terminal, etc... all running under an X-windows session (XFCE4 Desktop Manager).
Comment by Doug Newgard (Scimmia) - Thursday, 09 June 2016, 03:02 GMT
Ah, you're talking about the X font lists. I doubt that's the issue here, as only pure X programs use that anymore; I don't believe any major toolkit uses it.

If you want to be sure, just run `mkfontscale usr/share/fonts/misc` and `mkfontdir usr/share/fonts/misc` as root. The install script should actually be doing that, but it will be done by hooks in the near future anyway.
Comment by Kyle Keen (keenerd) - Thursday, 09 June 2016, 04:49 GMT
Not a bug and working as intended.

The special modes require special terminals. "-l" only works on a tty and and "-x" only works in a handful of graphical terms. (Xterm and aterm for now. It doesn't work with vte-terms such as xfce-terminal.) The "cmatrix-tty" script tries to cover all of these cases.
Comment by Chris (TobalJackson) - Thursday, 09 June 2016, 13:28 GMT
So Kyle,

What you're saying is is that there is no way to get the "matrix" font to show in a normal terminal emulator like terminator running under xfce4 and zsh (like I am)? I've also tried running the program in xterm using `cmatrix -x` and still get a blank screen. I've also tried switching to tty1 and running `cmatrix -l` and also get a blank screen.

Comment by Kyle Keen (keenerd) - Thursday, 09 June 2016, 16:23 GMT
I won't say there is absolutely no way. But I've never figured out how to make VTE use that custom font. If you figure it out then we can add it to the cmatrix-tty launcher.

However something is not quite right with tty or xterm. They run for me but the only visible character is the pipe character. Not sure when or why that broke.
Comment by Chris (TobalJackson) - Thursday, 09 June 2016, 17:04 GMT
So at the very least, that is a bug XD. Would you say at this point that this at least is confirmed? If I could get the mtx.pcf font to display any way/how I'd use that method.
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.

Loading...