On Fri, 04 Jan 2008 19:54:43 -0800
ody <[EMAIL PROTECTED]> wrote:

> I have one last email about sound...this time about sound on Ubuntu 
> Linux 7.10 with SRSS.  I stumbled upon the guide for srss on debian
> that was posted to this list and many other tutorials back in
> September and have been working on getting every aspect of it working
> for several weeks.  We have had a single SRSS Ubuntu server running
> in pre-production for admins for a couple months and it runs quite
> happily. Fully functional sound is my last step and it does work more
> or less except for one thing.  I am hoping there is someone a little
> more knowledgeable about the SunRay session start up procedure that
> can shed some light on what is being skipped.
> 
> To get the SRSS audio modules to function I have followed the 
> instructions found at 
> http://wiki.sun-rays.org/index.php/Installing_Sun_Ray_Server_on_Debian 
> and the latter part of 
> https://help.ubuntu.com/community/UbuntuOnSunRay#head-68a0f5f73813b4b9e669d19b97769d830c378d0f
>  
> 
> 
> The steps I have taken out of the second link are...
> 
> ---
> [EMAIL PROTECTED]:~/SunRay$ sudo apt-get install libesd0
> [EMAIL PROTECTED]:~/SunRay$ sudo ln -s /usr/lib/libesd.so.0 
> /usr/lib/libesd.so.1
> 
> ---
> Add the following under this line in /etc/init.d/zsunray-init:
> 
> [ ! -f /bin/basename ] && ln -s /usr/bin/basename /bin/basename
> 
> [EMAIL PROTECTED]:~/SunRay$ sudo vi /etc/init.d/zsunray-init
> 
> # create the .esd directory to hold the socket files
> if [ ! -d /tmp/.esd ]; then
>    mkdir /tmp/.esd
> fi
> # set the sticky bit on the .esd directory
> chmod 1777 /tmp/.esd
> # allow all users to read the dsp and mixer devices
> chmod 666 /dev/dsp /dev/mixer
> 
> ---
> Perform the following to establish the gnome-session-sunray wrapper
> script:
> 
> [EMAIL PROTECTED]:~/SunRay$ sudo rm /etc/alternatives/x-session-manager
> [EMAIL PROTECTED]:~/SunRay$ sudo ln -s /usr/bin/gnome-session-sunray 
> /etc/alternatives/x-session-manager
> [EMAIL PROTECTED]:~/SunRay$ sudo vi /usr/bin/gnome-session-sunray
> 
>    #!/bin/bash
>    #
>    ########################################
>    #
>    # gnome-session-sunray - establishes
>    #                        GNOME user
>    #                        environment for
>    #                        SunRay users
>    #
>    # Written: Naaman Campbell
>    #          28 October 2005
>    #
>    ########################################
> 
>    # setup sound daemon for current user
>    if [ "$SUN_SUNRAY_TOKEN" ]; then
>      pkill -U $USER esd
>      /usr/bin/esd -d $AUDIODEV -nobeeps -terminate &
>    fi
> 
>    exec /usr/bin/gnome-session "$@"
> 
> [EMAIL PROTECTED]:~/SunRay$ sudo chmod
> 755 /usr/bin/gnome-session-sunray
> 
> ---
> gconftool-2 --direct --config-source 
> xml:readwrite:/etc/gconf/gconf.xml.mandatory --type bool --set 
> /desktop/gnome/sound/enable_esd true
> 
> ---
> I have taken another step that was not in the guide.  I ran the
> command `update-altneratives --install
> x-session-manager /etc/alternatives /usr/bin/gnome-session-sunray 1`
> and then a `update-alternatives 
> --config x-session-manager` and
> selected /usr/bin/gnome-session-sunray from the list it then provides.
> 
> ---
> Ok so what happens when I start a new session is, $AUDIODEV and 
> $UTAUDIODEV gets set and devices are created
> in /tmp/SUNWut/dev/utaudio but the script from the second link above
> never runs so the esd daemon is never killed and reloaded with the -d
> option to include $UTAUDIODEV. The script is completely skipped,
> never even looked at...gnome still starts though, leading me to
> believe that x-session-manager is never called during session
> creation.  I can kill esd myself after the session begins and then
> restart it with -d option and esd loads and functions great.  Can
> load up XMMS and easily play music.
> 
> Any know why the script is being skipped over?
> 

Disclaimer: I don't use Ubuntu, only Debian. 

/usr/bin/x-session-manager is only executed if the user never
explicitely selected a session type. Such a selection is stored in
$HOME/.dmrc and if a user selects "Gnome", then /usr/bin/gnome-session
gets executed.  So I would suggest wrapping /usr/bin/gnome-session into
a script instead of changing  x-session-manager:

1)  dpkg-divert --rename /usr/bin/gnome-session

This command renames /usr/bin/gnome-session
to /usr/bin/gnome-session.distrib and, most importantly, if you ever
update or reinstall the package which provides /usr/bin/gnome-session,
this file will always be installed under the 
name /usr/bin/gnome-session.distrib and your version of gnome-session
will not be touched. (IMHO, this feature is one of the little gems of
the Debian/Ubuntu package management system.)
2) Then provide a script /usr/bin/gnome-session which ends with 
   exec /usr/bin/gnome-session.distrib "$@"
 
If it works, change the Ubuntu wiki page accordingly -:)
(The instruction on this page to make manual changes to the
/etc/alternatives symlink hell is very dangerous. These symlinks 
should only be managed with the update-alternatives command. If not,
package updates can have strange side effects.)

Meik

-- 
Meik Hellmund
Mathematisches Institut, Uni Leipzig
e-mail: [EMAIL PROTECTED]
http://www.math.uni-leipzig.de/~hellmund
_______________________________________________
SunRay-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sunray-users

Reply via email to