Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!trwacs!epstein From: epstein@trwacs.UUCP (Jeremy Epstein) Newsgroups: comp.windows.x Subject: Re: Problem with 'xterm -C' Summary: On some systems root *can't* redirect /dev/console Message-ID: <293@trwacs.UUCP> Date: 16 May 91 13:24:40 GMT References: <9105151823.AA29377@cip.e-technik.uni-erlangen.de> Organization: TRW Systems Division, Fairfax VA Lines: 22 In article <9105151823.AA29377@cip.e-technik.uni-erlangen.de>, foer@cip.e-technik.uni-erlangen.de (Hans Foertsch) writes: > > On our System ( HP-UX l 7.05 B 9000/330) the Option '-C' by calling the xterm, > it answer 'xterm: display :0.0 is not authorizied to take control of > /dev/console' . I don't know about HP-UX, but on at least one system I'm acquainted with (Mach) you can only redirect /dev/console if you are the owner of it, and being root doesn't override that restriction. Unfortunately this interferes with xterm wanting to run as root to update /etc/utmp. What I did was have xterm fork a child process which resets its user ID to the real UID, redirects the console, and quits. The parent process (which is running as root) gets the redirection. As a first approximation, you can make xterm *not* setuid-root, and see if "xterm -C" then works (of course without updating /etc/utmp). If it does, then make the change outlined above. -- Jeremy Epstein UUCP: uunet!trwacs!epstein Trusted X Research Group Internet: epstein@trwacs.fp.trw.com TRW Systems Division Voice: +1 703/876-8776 Fairfax Virginia