The terminals listed hints that the behavior is seen with Linux: The clues are in the manual page for wall
(Solaris for instance is different):
wall
displays a message, or the contents of a file, or otherwise its
standard input, on the terminals of all currently logged in users.
Some sessions, such as wdm
, that have in the beginning of utmp(5)
ut_type
data a ':' character will not get the message from wall
.
This is done to avoid write errors.
That is, wall
uses the utmp data, looks for terminals in use (i.e., logged-in users), and writes to the associated device. Each line in the output of w
shows a (possible) terminal, recorded by the terminal in the utmp file. For instance, I am ssh'd into a server and running screen while at the same time I logged into a console. Just for completeness, I ran xterm using the -ls
(login-shell) option. Here is the output of w
:
$ w
19:53:15 up 4:08, 5 users, load average: 0.00, 0.01, 0.05
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
tom tty2 19:48 5:11 0.04s 0.02s -tcsh
tom pts/0 michener:S.0 15:51 13:18 0.35s 0.24s ssh -X thomas@b
tom pts/2 michener:S.1 16:34 2.00s 0.14s 0.00s sh -c w
tom pts/4 michener:S.3 15:52 3:59m 0.12s 0.00s /bin/sh /users/
tom pts/3 localhost:10.0 19:53 7.00s 0.03s 0.03s -tcsh
and running wall
writes to each of those TTY
devices.
However, if the terminal does not write to the utmp file, it will not be listed — and wall
will ignore it.
Now, some programs may have the feature compiled-in, but lack privileges to change it. That is why some programs are run with setgid
to the "utmp" group. Other programs (such as xterm — or gnome-terminal) may use an external program that updates utmp on their behalf.
With gnome-terminal, the feature has been deprecated due to the mindset of the gnome developers that (a) users run on a local machine, where gdm
handles login, and (b) consequently there's no distinction worth bothering about between login shells and non-login shells. That makes for some interesting bug reports:
They are kernel virtual terminal devices, multiplexed onto the physical framebuffer and human-input devices by a terminal emulator program that is built into the kernel itself. To applications programs running on top of the kernel, they look like any other terminal devices, such as a serial terminal device. (They have a line discipline, but no modem control.)
The system implements terminal login by dint of running a getty
program (or equivalent) and a login
program that accept user credentials and invoke login sessions.
The X server program also needs to use the physical framebuffer and human-input devices. It needs to negotiate sharing them with the kernel terminal emulator. It does so by allocating one virtual terminal and telling the kernel to disconnect that from the kernel terminal emulator.
Hence why it appears that the X server "runs" on a particular terminal. When the kernel terminal emulator sees the hotkey chord for switching to the allocated virtual terminal, it cedes control of the framebuffer and human-input devices to to the X server. When the X server sees the hotkey chord for switching to another virtual terminal, the X server cedes control back.
These hotkey chords are not necessarily symmetrical. On one of my systems the hotkey chord implemented by the kernel terminal emulation program for switching to virtual terminal #2 is Alt+F2 whereas the hotkey chord implemented by the X server for the same action is Ctrl+Alt+F2.
When it comes to graphical login, a display manager handles starting up X servers with greeter programs. You're just starting an X server directly and not using a display manager, of course. Once the user credentials have been authenticated, a desktop manager displays a desktop environment, which comprises a set of X client applications of varying degrees of complexity. For complex desktop environments, there is a whole bunch of server programs interconnected via a desktop bus. (On one of my systems, the so-called "small and lightweight" GNOME Editor requires a D-BUS broker and nine other server programs to be running.)
Some of those X client programs can be other terminal emulators, userspace ones, such as LXTerminal, Unicode RXVT, GNOME Terminal, Terminate, roxterm, evilvte, xterm, and so forth. These do not directly use physical framebuffer and human-input devices, and they make use of pseudo-terminal devices.
Further reading
Best Answer
You can download videos and/or just the audio and then watch/listen to them using
youtube-dl
. The script is written in Python and makes use offfmpeg
I believe.To download videos you simply give it the URL from the page you want the video on and the script does the rest:
You can then use
vlc
ormplayer
to watch these locally:OK but I want to watch these videos as they're streamed & in ASCII
I found this blog article titled: On ascii, youtube and letting go that demonstrates the method that I discussed in the chatroom, mainly using
youtube-dl
as the "backend" which could do the downloading of the YouTube stream and then redirecting it to some other app.This article shows it being done with
mplayer
:The video being downloaded by
youtube-dl
is redirected via STDOUT above,-o -
. There's a demo of the effect here.         Â
With the installation of additional libraries the ASCII video can be enhanced further.
              Â
OK but I want the video in my actual terminal?
I found this trick which allows video to be played in an
xterm
in the O'Reilly articled titled: Watch Videos in ASCII Art.The above results in a
xterm
window being opened where the video plays.  Â
So I thought, why not put the peanut butter and the chocolate together like this:
This almost works! I'm not sure why the video cannot play in the window, but it would seem like it should be able to. The window comes up and starts to play but then closes. I see video for a brief few seconds and then nothing.
Perhaps the above will get you closer to your ultimate solution, or perhaps it just needs to be tweaked a bit on the options.
Additional libraries
If you have
libcaca
installed (the colorized version ofaalib
) and you reduce the font size in yourgnome-terminal
to something really small, like say 3, the following command will display a much better looking ASCII video directly within the terminal:Â Â Â
Terminals
It would seem that the choice of terminal can make a big deal as to whether
mplayer
can play directly inside the terminal or whether it opens a separate window. Caching too onmplayer
made a dramatic difference in being able to play directly in ones terminals.Using this command I was able to play in
terminator
, at least for the first 1/4 of the video before it cut out:The colored version used this command:
These same commands could play in
gnome-terminal
&xterm
too.   Â
    NOTE: That's (from Left to Right)
xterm
,terminator
,gnome-terminal
, andterminology
.