Chinaunix首页 | 论坛 | 博客
  • 博客访问: 203512
  • 博文数量: 48
  • 博客积分: 856
  • 博客等级: 军士长
  • 技术积分: 520
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-29 23:18
文章分类

全部博文(48)

文章存档

2011年(18)

2010年(30)

分类: LINUX

2010-11-17 13:08:35

Normally, I start/stop daemons via their init script in /etc/init.d/service by running:

sudo /etc/init.d/service [start | stop]

but the pulseaudio script does nothing...

I noticed the following lines that probably make the script exit before any of the start/stop sections can be executed:

Code:
PULSEAUDIO_SYSTEM_START=0
DISALLOW_MODULE_LOADING=1
test -f /etc/default/pulseaudio && . /etc/default/pulseaudio
test "$PULSEAUDIO_SYSTEM_START" != "1" && exit 0
in particular, the PULSEAUDIO_SYSTEM_START variable is set to 0, and later in /etc/default/pulseaudio that variable is set again.

Here's the section of /etc/default/pulseaudio related to PULSEAUDIO_SYSTEM_START:
Code:# Start the PulseAudio sound server in system mode.
# (enables the pulseaudio init script)
# System mode is not the recommended way to run PulseAudio as it has some
# limitations (such as no shared memory access) and could potentially allow
# users to disconnect or redirect each others audio streams.
# 0 = don't start, 1 = start
PULSEAUDIO_SYSTEM_START=0
Is the "init script" referred in /etc/default/pulseaudio the same as /etc/init.d/pulseaudio?  The wording seems to advocate "don't start".  I changed this value to 1 and I started getting status messages about the server starting/stopping... even though it didn't show up in ps.

The only way to get /etc/init.d/pulseaudio to run is to set PULSEAUDIO_SYSTEM_START=1 otherwise 
Code:test "$PULSEAUDIO_SYSTEM_START" != "1" && exit 0
will exit the script.

The other part of the /etc/default/pulseaudio file is equally vague:
Code:# Prevent users from dynamically loading modules into the PulseAudio sound
# server. Dynamic module loading enhances the flexibilty of the PulseAudio
# system, but may pose a security risk.
# 0 = no, 1 = yes
DISALLOW_MODULE_LOADING=1
Does this refer to the modules that I set up in the /etc/pulse/default.pa file? or some other modules?
阅读(1104) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~