xinit + wine = no sound

Hi,

I’m using OpenSuSE 11.2 and using wine for playing a few games I didn’t have the heart
to part with. I’m using xinit to start a new x server because my dekstop is consuming quite a
bit of resources, but unfortunately whenever I do so I part with sound.

Finding guides for using xinit was easy, but I have not been succesful in finding a solution
to my “no sound problem” using google so far, yet I’ve seen others having the same complaint.

For an example let’s take my beloved game StarCraft and the errors I get:

I start my game the following way



sh bwx:
 
#!/bin/bash
xinit /home/kronisk/Desktop/bwloader -geometry =640x480 -bpp 8 -- :1
]

bwloader:

#!/bin/sh 
WINEDEBUG=-all wine ~/.wine/drive_c/games/bw/Launcher/Launcher.exe
]


Where the Launcher is the iCCup-Launcher, nevermind that, StarCraft is the game, but I
get the following error message from ALSA:




kronisk@linux-n11e:~/Desktop> sh bwx

X.Org X Server 1.6.5
Release Date: 2009-10-11
X Protocol Version 11, Revision 0
Build Operating System: openSUSE SUSE LINUX
Current Operating System: Linux linux-n11e 2.6.31.12-0.1-default #1 SMP 2010-01-27 08:20:11 +0100 i686
Build Date: 02 November 2009  12:05:39PM

        Before reporting problems, check [X.Org Wiki - Home](http://wiki.x.org)
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.1.log", Time: Sat Feb 27 09:12:48 2010
(==) Using config file: "/etc/X11/xorg.conf"

ALSA lib seq_hw.c:457:(snd_seq_hw_open) open /dev/snd/seq failed: Permission denied
ALSA lib seq_hw.c:457:(snd_seq_hw_open) open /dev/snd/seq failed: Permission denied
]


Regarding the no sound I am of course referring to the lines containing ALSA and permission
denied.

If you see any errors in my script(s) not related to the sound error, please let me know.
As you can see, the new x server I’m starting is supposed to have less colordepth
(preferably 8-bit) to improve the performance of StarCraft as my main x server has 24-bit
depth.

Thank you for reading, and hopefully somebody will be able to help me.

xoxoxoxo (:

I found that if I make a new xserver with configfile advantageous for the purpose (i.e. gaming starcraft, instead of the usual xorg.conf configured for optimized desktop looks) and then apply the ck-launch-session then sound is provided for the new xserver.



xinit -- :1 -config starcraft.conf


and in the console window of the new x server i write



ck-launch-session

sh bwloader


Where bwloader is an arbitrary shell script for game execution.

Thus I solved my own problem and maybe the solution will be of help to others.

xoxoxoxo :wink: