首页 > 其他分享 >麒麟KYLINOS命令行设置系统静音

麒麟KYLINOS命令行设置系统静音

时间:2023-11-06 18:01:53浏览次数:40  
标签:load 麒麟 module KYLINOS so sink 静音 ### ifexists

原文链接:麒麟KYLINOS命令行设置系统静音

hello,大家好啊,今天给大家带来一篇在麒麟KYLINOS上使用命令行调节系统静音的方法,有时候需要制作模板,便可以采用此方法,话不多说,一起来看看吧。

1、查看系统信息

test@pdsyw-pc:~$ cat /etc/.kyinfo 
[dist]
name=Kylin
milestone=Desktop-V10-SP1-General-Release-2303
arch=arm64
beta=False
time=2023-04-27 15:46:53
dist_id=Kylin-Desktop-V10-SP1-General-Release-2303-arm64-2023-04-27 15:46:53

[servicekey]
key=0516013

[os]
to=
term=2024-08-01

test@pdsyw-pc:~$ uname -a
Linux pdsyw-pc 5.4.18-85-generic #74-KYLINOS SMP Fri Mar 24 11:20:19 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
test@pdsyw-pc:~$

麒麟KYLINOS命令行设置系统静音_linux

2、查看当前的系统声音

麒麟KYLINOS命令行设置系统静音_linux_02

3、编辑default.pa文件

test@pdsyw-pc:~$ sudo -i
输入密码
root@pdsyw-pc:~# vi /etc/pulse/default.pa 
root@pdsyw-pc:~# cat /etc/pulse/default.pa

麒麟KYLINOS命令行设置系统静音_uos_03

4、添加内容set-sink-mute @DEFAULT_SINK@ 1

麒麟KYLINOS命令行设置系统静音_Public_04

5、编辑前

root@pdsyw-pc:~# cat /etc/pulse/default.pa 
#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)

.fail

### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore

### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore

### Should be after module-*-restore but before module-*-detect
load-module module-switch-on-port-available

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

### 加载module-echo-cancel模块以降低录音时的噪音
### 注:录音时应选择带有echo cancel的输入设备录音
#load-module module-echo-cancel use_master_format=1 aec_method=webrtc aec_args="analog_gain_control=0 digital_gain_control=1"

### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties

### Use hot-plugged devices like Bluetooth or USB automatically (LP: #1702794)
.ifexists module-switch-on-connect.so
load-module module-switch-on-connect
.endif

### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif

.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix

### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp
#load-module module-zeroconf-publish

### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv

### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor

### Load additional modules from GSettings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gsettings.so
.nofail
load-module module-gsettings
.fail
.endif


### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink

### Honour intended role device property
load-module module-intended-roles

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif

### Enable positioned event sounds
load-module module-position-event-sounds

### Cork music/video streams when a phone stream is active
load-module module-role-cork

### Block audio recording for snap confined packages unless they have
### the "pulseaudio" or "audio-record" interfaces plugged.
.ifexists module-snap-policy.so
load-module module-snap-policy
.endif

### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply

### Make some devices default
#set-default-sink output
#set-default-source input

6、编辑后

root@pdsyw-pc:~# cat /etc/pulse/default.pa 
#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)

.fail

### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore

### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore

### Should be after module-*-restore but before module-*-detect
load-module module-switch-on-port-available

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

### 加载module-echo-cancel模块以降低录音时的噪音
### 注:录音时应选择带有echo cancel的输入设备录音
#load-module module-echo-cancel use_master_format=1 aec_method=webrtc aec_args="analog_gain_control=0 digital_gain_control=1"

### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties

### Use hot-plugged devices like Bluetooth or USB automatically (LP: #1702794)
.ifexists module-switch-on-connect.so
load-module module-switch-on-connect
.endif

### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif

.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix

### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp
#load-module module-zeroconf-publish

### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv

### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor

### Load additional modules from GSettings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gsettings.so
.nofail
load-module module-gsettings
.fail
.endif


### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink

### Honour intended role device property
load-module module-intended-roles

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif

### Enable positioned event sounds
load-module module-position-event-sounds

### Cork music/video streams when a phone stream is active
load-module module-role-cork

### Block audio recording for snap confined packages unless they have
### the "pulseaudio" or "audio-record" interfaces plugged.
.ifexists module-snap-policy.so
load-module module-snap-policy
.endif

### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply

### Make some devices default
#set-default-sink output
#set-default-source input
set-sink-mute @DEFAULT_SINK@ 1


7、重启系统

root@pdsyw-pc:~# reboot

麒麟KYLINOS命令行设置系统静音_linux_05

10、重启后系统静音

麒麟KYLINOS命令行设置系统静音_Public_06

标签:load,麒麟,module,KYLINOS,so,sink,静音,###,ifexists
From: https://blog.51cto.com/pengds/8215373

相关文章

  • 魔导手册 Stable Diffusion 画龙 画坤坤(鲲) 画麒麟
    一、选择模型1、点击Checkpoints 2、拉到最后选择sd-xl-base_1.0 二、开启创作之旅1、点击Generation点击Refiner 2、选择sdxl/sd_xl_refiner_1.0.safetensors(PS下拉框拉到最后就行啦)  3、输入咒语(正向提示词和反向提示词)点击生成 坤坤就出来了 三、......
  • 麒麟KYLINIOS软件仓库搭建03-软件仓库添加新版本的软件包
    原文链接:麒麟KYLINIOS软件仓库搭建03-软件仓库添加新版本的软件包hello,大家好啊,今天给大家带来麒麟桌面操作系统软件仓库搭建的文章03-软件仓库添加新版本的软件包,本篇文章主要给大家介绍了如何在麒麟桌面操作系统2203-x86版本上,为搭建好内网软件仓库源中添加新版本的软件包,本系列......
  • 麒麟KYLINIOS软件仓库搭建02-软件仓库添加新的软件包
    原文链接:麒麟KYLINIOS软件仓库搭建02-软件仓库添加新的软件包hello,大家好啊,今天给大家带来麒麟桌面操作系统软件仓库搭建的文章02-软件仓库添加新的软件包,本篇文章主要给大家介绍了如何在麒麟桌面操作系统2203-x86版本上,为搭建好内网软件仓库源中添加新的类型软件包,本系列共有三个......
  • VMWare虚拟机-修改界面大小(麒麟系统)
    一、下载linux.iso1.下载地址:http://softwareupdate.vmware.com/cds/vmw-desktop/ws/15.5.1/15018445/windows/packages/2.解压后,VMWare添加镜像iso,然后重启虚拟机 3.找到VMwareTools-10.3.10-13959562.tar.gz压缩包并解压         4.执行文件lssudo......
  • VMWARE-虚拟机通外网(麒麟v10系统)
    一、修改网卡1.进入目录下,编辑网卡:cd/etc/sysconfig/network-scriptssudovimifcfg-ens332.配置静态IP、子网掩码、网关、DNS、设备名称:3.重启网卡ifdowneth33--关闭网卡eth33ifupeth33--打开网卡eth33systemctlretsartnetwork二、编辑虚拟网络编辑器1.......
  • Kylin 麒麟v10 sp1 服务器版 离线安装docker的方法
    tar-zxvfdocker-20.10.16.tgzmvdocker/*/usr/bin/vi/usr/lib/systemd/system/docker.service1、编辑docker的系统服务文件vi/usr/lib/systemd/system/docker.service2、将下面的内容复制到刚创建的docker.service文件中[Unit]Description=DockerApplicationContainerEngi......
  • 麒麟KYLINIOS软件仓库搭建01-新创建软件仓库服务器
    原文链接:麒麟KYLINIOS软件仓库搭建01-新创建软件仓库服务器hello,大家好啊,今天给大家带来麒麟桌面操作系统软件仓库搭建的文章01-新创建软件仓库服务器,本篇文章主要给大家介绍了如何在麒麟桌面操作系统2203-x86版本上搭建内网软件仓库源,本系列共有三个内容,欢迎大家浏览分享转发。关......
  • 银河麒麟在线升级新版本docker
    银河麒麟在线升级新版本docker卸载学习来自:https://cloud.tencent.com/developer/article/1491742yumremovedocker\docker-ce\docker-client\docker-client-latest\docker-common\......
  • 麒麟KYLINOS2303版本上使用KDE桌面共享软件
    往期文章:龙芯3A5000上安装软件hello,大家好啊,今天给大家推荐一个在麒麟KYLINOS桌面操作系统2303版本上使用KDE桌面共享软件的文章,通过安装KDE桌面共享软件,可以让远程vnc客户端连接访问本机桌面,进行一系列的远程操作,欢迎大家分享转发。关注我吧!1、查看系统信息pdsyw@pdsyw-pc:~/桌面$......
  • 【模拟题】麒麟操作系统运维高级工程师KYCP(运维)
    【模拟题】麒麟操作系统运维高级工程师KYCP(运维)答题卡[单选题]1.(1分)team链路聚合最多支持几块网卡82.(1分)在安装nginx时,下列软件包不是必须安装的是?httpd3.(1分)使用哪个命令可以查看时间同步的源?chronyc4.(1分)在时间服务器中,下列哪个字段定义允......