On Tue, Oct 27, 2009 at 11:26:29AM -0500, Isaac Atilano wrote: > 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. The other shell (connected to the other terminal) is getting its input from the kernel, so conceivably one could rig the input system into pushing whatever into the input buffer of an arbitrary terminal. Not trivial, not POSIX standard (the details for the solution for Solaris would be different), but not impossible, either. Cheers, florin -- Bruce Schneier expects the Spanish Inquisition. http://geekz.co.uk/schneierfacts/fact/163 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20091027/b7a72ab3/attachment.pgp