Am Mit, 2003-07-23 um 10.24 schrieb John Sutton:
> Hi there
>
> Here is what I've got:
>
> I am starting up artsd on each machine from /etc/inittab. Since you
> need
> to munge the environment to do this, inittab calls a script called
> artsd-init:
>
> -----------------------
> #!/bin/bash
>
> # See how we were called.
> case "$1" in
> start)
> LOGNAME=`id -un` \
> DISPLAY=:0 \
> HOME=/etc \
> exec /usr/bin/artswrapper -F 10 -S 4096 -n
> ;;
> stop)
> /usr/bin/artsd-kill
> ;;
> *)
> echo "Usage: $0 {start|stop}"
> exit 1
> esac
> -----------------------
>
Looks good (I'm currently testing with "-u"-option as I don't have
home/nfs at client).
> Notice that I've set HOME to ensure that .mcoprc gets picked up from
> /etc.
> This ensures that if root logs in on this machine, they cannot
> (inadvertently) mess things up for all users by setting/unsetting any
> of
> the sound options in kcontrol. The upshot however is that you need to
> setup .mcoprc (once only) thus:
>
> echo GlobalComm=Arts::X11GlobalComm > /etc/.mcoprc
>
> Then we can startup artsd along with xdm and X itself from inittab:
>
> ---------------------
> x:5:respawn:/etc/X11/prefdm -nodaemon
> xs:5:respawn:/usr/X11R6/bin/X -indirect diva
> xa:5:respawn:/usr/bin/artsd-init start
> ---------------------
>
> Every user then has to set up their kcontrol appropriately. This
> means
> that of the 4 options in Sound/Sound Server/General, they MUST check
> "Exchange security and reference info..." and they MUST UNcheck "Start
> aRts soundserver...". The other 2 settings don't matter.
Why don't you copy a template of the artsd-config
(.kde/share/config/kcmartsrc file into the home-directories when setting
up an user?
>
> Now the problem is that whenever the X server resets (and it does this
> quite a lot when being driven by xdm), artsd looses its
> connection/goes to
> sleep/refuses to reauthenticate/whatever - I don't know. Point is,
> the
> only way I could find to get it to play ball was to kill it! Then
> init
> restarts it and it works OK. But this is where the kludges start.
> Problem is, artsd is running as root and I'm logging in as non-root
> (or
> root) AND it is not necessarily running on the same machine as the one
> I'm
> logging into! To solve this problem, I inserted these 4 lines
> somewhere
> near to the top of xdm/Xsession on every host:
>
> ------------------------------
> ARTSDSERVER=$(echo $DISPLAY | sed 's/:.*//')
> [ -n "$ARTSDSERVER" ] && ARTSDSERVER="rsh $ARTSDSERVER"
> $ARTSDSERVER artsd-init stop
> unset ARTSDSERVER
> -------------------------------
I'm using "export ARTS_SERVER=$(echo ${DISPLAY%%:*}:53276)" (53276 is
port) in /etc/profile. This way the ARTS_SERVER variable is set
correctly for each user, independent from which machine he logs in.
It works perfectly with using "-u"-option on client.
On the client I run "artswrapper -n -p53276 -u -N -w16 -atoss
-D/dev/dsp". This works fine, but anyone can send sound to the terminal
(and maybe using this to become root on the terminal, but it's no
problem if the terminal file-system is read-only).
I haven't played with authentification, yet, but as I understood you
have to set the ARTS_SERVER-variable, export the home-directories to the
client (for having the KDE authentification-stuff available on the
terminal) and run as the appropriate user on the terminal (means you
need NIS).
Then you can start ARTS with the rights of that user.
P.S.: The ML is quite dead ... And I think I've read authentification
has been introduce with KDE 3.x ...
> --
> Rene Bartsch
> Faculties MNI
> Computer Science 8th Semester
> FH Giessen/Friedberg, Germany
>
> Facsimile/Phone: +49 7 00/72 27 87 24
> Mail: [EMAIL PROTECTED]