From owner-freebsd-questions Wed May 17 15:15:35 2000 Delivered-To: freebsd-questions@freebsd.org Received: from bobino.chemcomp.com (bobino.sefmedia.com [207.164.6.2]) by hub.freebsd.org (Postfix) with ESMTP id 727CB37C2A0 for ; Wed, 17 May 2000 15:15:04 -0700 (PDT) (envelope-from abeaupre@chemcomp.com) Received: from ip92.montreal21.dialup.canada.psi.net (ip92.montreal21.dialup.canada.psi.net [154.5.100.92]) by bobino.sefmedia.com (NTMail 5.05.0002/NT6102.00.ff403942) with ESMTP id meqgaaaa for freebsd-questions@freebsd.org; Wed, 17 May 2000 18:15:29 -0400 Received: from chemcomp.com [192.1.1.19] by chemcomp.com (FTGate 2, 2, 0, 1); Wed, 17 May 00 18:05:53 -0400 Message-ID: <39231725.81D4FA31@chemcomp.com> Date: Wed, 17 May 2000 18:03:17 -0400 From: Sys Admin X-Mailer: Mozilla 4.04 [en] (WinNT; I) MIME-Version: 1.0 To: Ben Smithurst Cc: freebsd-questions@freebsd.org, beaupran@iro.umontreal.ca Subject: Re: Display the time on ttyv7 References: <3922C8EA.11CBC702@chemcomp.com> <20000517194534.D21557@strontium.scientia.demon.co.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ben Smithurst wrote: > > Sys Admin wrote: > > > In a rather naive attempt, I tried to make a handy clock always > > available on ttyv7. I've put the following line in /etc/ttys: > > > > ttyv7 "/usr/gamges/grdc" cons25 on secure > ^^^^^^ > > > It did not work. The tty was simply not accessible, giving me a nice > > -beep!- when I tried Alt-F8. > > If that typo was present in /etc/ttys I'm not surprised. :-) He... It was not. :) > OTOH, I've just tried it myself and it looks as if the terminal isn't > being opened > on FDs 0, 1 and 2. I think getty does that itself. (You did send > SIGHUP to init, didn't you? I don't think it would work anyway.) Yep. Not working. It's really the getty job to do this, as I understand this... > If you can't get it to work, try the attached program, which can > run a specified program on a specified tty (e.g. 'runontty ttyv7 > /usr/games/grdc' could go in /etc/rc.local). This has the > disadvantage that the clock won't get restarted if it dies, as it > would with > /etc/ttys, but you can't have everything. You could always run a > cronjob to restart it if it dies, but I don't see why it would die > anyway. Another method would be to write a wrapper around grdc which > opened the TTY appropriately. Thanks! But, on the first look, it's not working very well ("iotctl(TIOSCTTY): Operation not permitted"), but this is probably do to the fact that I run this thing in securelevel 3. (!) Anyways, thanks for the advice. Right now, I'm logging in a terminal and exec the prog at boot time. CU A. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message