On Mon, Oct 26, 2009 at 3:34 PM, Isaac Atilano
<aristophrenic at warpmail.net>wrote:
> From a remote ssh session, I want to run a command (startx) on virtual
> console 1 (/dev/tty1) of the ssh server so that the output of startx and
> X gets written to virtual console 1 and I can then exit out of the shell
> that issued the command.

After reading up some more on this, it seems that what I want to do
isn't possible because you need to set up some sort of IPC mechanism
between the two processes that would allow you to do this. Additionally,
the processes must then be designed to use this ICP.

The tty device files do not work for this because tty is designed so
that what is read on the tty device's STDIN is routed to STDOUT. It is
not routed to the STDIN of the shell or getty process accessing that
terminal.

The question I then asked was "Can I send data directly to the shell's
STDIN?"
The answer, I found was that through the shell, you cannot send data to
an arbitrary process's STDIN. The IPC would have to be defined (through
pipes, redirects, etc.) prior to process spawning.