home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!sdd.hp.com!think.com!barmar
- From: barmar@think.com (Barry Margolin)
- Newsgroups: comp.unix.questions
- Subject: Re: Questions from a Novice
- Date: 8 Sep 1992 03:51:09 GMT
- Organization: Thinking Machines Corporation, Cambridge MA, USA
- Lines: 26
- Message-ID: <18h7vdINNkm8@early-bird.think.com>
- References: <1992Sep6.125339.21915@doug.cae.wisc.edu> <xxpnjvj.mzimmers@netcom.com>
- NNTP-Posting-Host: gandalf.think.com
-
- In article <xxpnjvj.mzimmers@netcom.com> mzimmers@netcom.com (Michael Zimmers) writes:
- >1. Why is it that if I log in as one user, su to another, and then
- >run openwin, it won't log to the console window? The specific error
- >message I get is
- > "System warning: Object 0x165d0, Permission denied,
- > ioctl TIOCCONS returned -1, attempt to make tty the console failed
- > (Tty package)"
-
- When you login, the system sets the ownership of the terminal device
- (/dev/console, in this case) to you, so that you can perform operations
- that are restricted to the terminal's user (e.g. changing permissions, as
- is done by the mesg(1) command).
-
- On the other hand, su(1) doesn't change ownership of the terminal. The
- operation that redirects console I/O to a window (TIOCCONS) is another of
- the operations that's restricted to the owner (to prevent someone else from
- stealing your output). So, when openwin tries to redirect console output,
- it gets a "Permission denied" error because you're not running as the
- console owner.
-
-
- --
- Barry Margolin
- System Manager, Thinking Machines Corp.
-
- barmar@think.com {uunet,harvard}!think!barmar
-