I was wondering if there was any way to, via SSH, have the terminal "copied" to my HDMI output. Or at least be able to redirect the output of specific terminal-only programs to HDMI.
This is a very rough workaround, but it might actually work :D (I don't have an RPi to test with, at the moment...)
Basically, what it does (should do) is copy the output from an ssh-Terminal to a local file and follow that file (tail -f) on the HDMI-tty-Terminal.
1) Log onto your RPi either using ssh or a Keyboard and a Screen. 2) Install tmux: (maybe the other option stated here will work, too)
sudo apt-get install tmux
3) open crontab (sudo crontab -e) and add this line:
@reboot tmux new-session -s GREETINGS
(or use any other way to execute that line on startup, GREETINGS can be anything, as long as it's the same in step 6) )
4) reboot your RPi.
5) Connect using ssh and type
bash | tee /home/pi/term.log
Which will copy output from your shell into the term.log file.
6) Tell the tmux Terminal on the Machine to write everything it sees in the file:
tmux send-keys -t GREETINGS "tail -f /home/pi/term.log$'\n'
7) You should be good to go.
(when you exit ssh with the exit command, you will have to type it twice because you actually opened a bash shell within your ssh session. Also, you might want to delete the logfile at reglular interval (write a cronjob!), since it will hold the output of every command you ever typed.)
You can do replications of terminals the via program
screen (likely need to install it with a
sudo apt-get install screen)
On the SSH, run the program
screen with no args, it will display a big copywrite message and ask you to press space, it will look like all it did was clear your screen, but this is actually a new virtual screen running over the top of what you had before
Now on the HDMI, login and/or open a shell of the same user and run
screen -x. Instead of opening a new virtual screen, it will attempt to connect to a virtual screen thats already running, leaving you with one virtual shell running between to different interfaces (SSH and HDMI).
If you kill the virtual shell then both windows will quit and go back to normal.
I learned about this use-case via Using screen for remote interactions though that blog entry is trying to do something more complex then what you implied via your question.
P.S. if either of the interfaces is via an xterm (or something with its own scrollback), don't try and use the scroll-bar, it doesn't work the way you expect. There is a way to scrollback in a screen, see the manpage for details.