Re: [mu startx] only root can start x.

From: Stephen Kasirye (kassets@techmuk.ac.ug)
Date: Sat May 12 2001 - 15:10:21 CEST


On Thu, 10 May 2001, Stephen Isard nicely wrote:

> Anyway, you need to do three things:
>
> 1. Replace /usr/X11R6/bin/xterm by the following slightly edited version
>
> ---------------------------
> #!/bin/sh
> # xterm wrapper
> # (C) M. Andreoli for muLinux
> # edited by Stephen Isard to give a history mechanism in the xterm
> window
> # and permit starting when logged in as non-root user (but there must be
> a
> # better way)
>
> #Give things like this as arguments to this program. They will get
> passed on
> #to the real xterm program, aterm or rxvt, via "$@" in the "command"
> line
> #below.
> #"-bg black"
> #"-fg white"
> #"-geometry 80x21+20+68"
> #" -fn fixed"
>
> ile="/usr/bin/ile -/etc/ilerc"
>
> if [ "`which aterm`" ] ; then
> xterm="aterm"
> else
> xterm=rxvt
> fi
>
> command="exec $xterm "$@" -e su - $USER -c \"$ile\""
>
> #Next line depends on there being no root password. The reason I've done
> it
> #this way is that I can't figure out how else to get a pty allocated to
> an
> #ordinary user. Please fix if you know how.
> su - -c "$command"
> ----------------------

This xterm does not work at all! A variety of window managers can not
display xterms.(?) Are you aware?
 
> 2. In /usr/X11R6/bin/startx, replace occurrences of "MuLinux Console" by
> \"Mulinux Console\", i.e., put backslashes before the quotes.

Maybe; what was this meant to be?

> 3. Make the loadkeys program be suid root, i.e., as root do
> chmod +s `which loadkeys`
>
> There are still error messages involving /setup/cnf/store and
> /tmp/modules/preferred, but I don't think they matter. They seem to
> come from attempts in setup to create directories that already exist in
> this context.
>

What are we solving this time? I bet we are finding a solution to starting
X as user which we solved! Then our new (current) problem is running as
user but not as root. How can we start the X server as root and the
Window manager as user?

I have tried to incoporate the Security Policy of X but it is not yielding
much. In the error log file it complained
(/usr/X11R6/lib/X11/xserver/SecurityPolicy), about it thats why I
incoporated it. It's attached. Any idea?

Stephen.

-----------------------------------------------------------------------
Twice Ceaser offered the crown to Brutus and twice Brutus refused.
Was that ambition or not?


---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.dk
For additional commands, e-mail: mulinux-help@sunsite.dk




This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:18 CET