Solved How to do matrix effect on console after booting?

Good day!

There is a port which provides matrix effect misc/termatrix. If it running by hand on a logged console all works, but I want to get it working right after booting.
I try to do that by creating /etc/rc.local
Bash:
#!/bin/sh

su username -c /usr/local/bin/termatrix &
After booting it starts to a moment and goes to background with login dialog on a static "matrixed" screen.
When I login, I see that termatrix works on background but has no screen output.
 
Yes, maybe that way, but I don't know how to convert it to be a screen saver :)

I trying various variants
  • change getty to termatrix in /etc/ttys for ttyv0 - not working
  • start throught /etc/rc.local but with sleep (for login load) - not helps
    Code:
    sleep 15 ; su username -c /usr/local/bin/termatrix &
UNIX'es have so flexibility so I hope there is any hack to do that.
 
Also, I notice that when I start termatrix throught /etc/rc.local it's output go into /var/log/messages

Folks, please your ideas!
 
Untill now I couldn't figure out either how to set up from a rc(8) script.

Another option could be to auto-login from ttyv0 into a user account, start from there termatrix.

For auto-login create a /etc/gettytab getty entry, set in /etc/ttys ttyv0 getty name, and from users .profile ( using here sh as shell ) execute termatrix. If you are interested I can provide a working example.
 
You could auto login as an unprivileged user, and then start it from ~/.login.
If you start it before the login prompt, how do you intend to log in? I don't get that part. ;D

In X, xscreensaver has a matrix theme, but it's not as pretty.
 
T-Daemon, Elazar thanks for your propositions!

I think about autologin, but if it possible to not leaving console auto-logined it will be preferred solution.
 
Finally I do as you suggested, it is awesome effect :) Either if I ran any command on that auto-logined console, output hides in matrix quickly.

Thanks!
 
If the case is having termatrix running on ttyv0 without the need of logging in ( What purpose does it serve having on ttyv0 termatrix running and logging in on another ttyv. ) , then the following solution can be used:

/usr/local/etc/rc.d/termatrix
Code:
#!/bin/sh

# PROVIDE: termatrix

. /etc/rc.subr

name=“termatrix”
start_cmd=“termatrix_start”

termatrix_start()
{
          sh -c ‘exec /usr/local/bin/termatrix <> /dev/ttyv0 >&0 2>&1’
}

load_rc_config $name
run_rc_command “$1”

chmod 555 /usr/local/etc/rc.d/termatrix

The system won’t boot to the login prompt until the termatrix script is terminated ( Ctrl + C ).
 
Back
Top