[comp.windows.x] Problem with 'xterm -C'

foer@cip.e-technik.uni-erlangen.de (Hans Foertsch) (05/16/91)

Subject: Problem with 'xterm -C'

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 think, that the permissions of the file and direktories are false.
The program 'xterm' is owned by root and has permissions "-rxsr-xr-x".
The directory '/dev' is owned by root and has permission "drwxr-xr-x". I think
it should the permission "drwxr-sr-x" like other Systems (sun). 

Now the question: Have you an idea for solving the problem on the HP-UX System ? 
Hans Foertsch (foer@cip.e-technik.uni-erlangen.de)

epstein@trwacs.UUCP (Jeremy Epstein) (05/16/91)

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

adri@dutncp8.tudelft.nl (A.B. van Woerkom) (05/23/91)

foer@cip.e-technik.uni-erlangen.de (Hans Foertsch) writes:

>Subject: Problem with 'xterm -C'

>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 think, that the permissions of the file and direktories are false.
>The program 'xterm' is owned by root and has permissions "-rxsr-xr-x".
>The directory '/dev' is owned by root and has permission "drwxr-xr-x". I think
>it should the permission "drwxr-sr-x" like other Systems (sun). 

>Now the question: Have you an idea for solving the problem on the HP-UX System ? 
To pose the question proved to solve the question.  We too have had the same
problem on our HP 9000/360, and didn't manage to solve it, but ...
after setting the permissions of the /dev directory as suggested above
it works fine!  Many thanks to Hans.

Hpterm also has a -C option.  When I set the owner, group and
permissions the same as for xterm, it keeps giving the same error :-(
Any HP-gurus out there to solve this one.
BTW we have HP-UX dutncp6 6.5 A 9000/360.

Adri.
--
A.B. van Woerkom, adri@dutncp6.tudelft.nl
Delft University of Technology, Faculty of Applied Physics, Physics
Informatics Group, section Computational Physics, Lorentzweg 1,
2628 CJ  DELFT, The Netherlands
________________________________________________________________________
"Unfortunately, the current generation of mail programs do not have checkers
 to see if the sender knows what he is talking about" (A.S. Tanenbaum)