我有这样的故障:从睡眠中醒来后,声音在电脑上消失(铬)。pulseaudio -k
在终端中输入命令即可解决。但为了不每次都输入,我做了一个脚本:
#!/bin/bash
pulseaudio -k
我做了这一切回答,但没有成功。我在日志中收到消息:
E: [pulseaudio] main.c: The daemon could not shut down: There is no such process
同时如果在控制台输入:pulseaudio -k
,命令执行不会出错,并且有声音出现。
我究竟做错了什么?
聚苯乙烯
用户服务:
[Unit]
Description=Run my_script_pulse
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
#After=sleep.target
[Service]
#Type=oneshot
#Type=forking
ExecStart=/usr/local/bin/st_pulse
#ExecStart=/home/paul/st_pulse.sh
#User=paul
#Environment=DISPLAY=:0
StandardOutput=file:/home/paul/log_file
[Install]
WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
#WantedBy=sleep.target