启动 cmus 时出错“无法访问主目录:权限被拒绝”

启动 cmus 时出错“无法访问主目录:权限被拒绝”

我最近按照 cmus 上的说明进行了安装 https://www.tecmint.com/install-cmus-music-player-in-linux/ 它指定使用它来启动sudo cmus我收到的输出:

rene@rene:~$ sudo cmus
Invalid MIT-MAGIC-COOKIE-1 keyxcb_connection_has_error() returned true
Home directory not accessible: Permission denied

我尝试在没有 sudo 的情况下运行它,似乎实际上可能需要它

cmus: error: opening `/home/rene/.config/cmus': Permission denied

经过一番搜索,我认为这个问题可能与 pulseaudio 10.0 有关。我查看了解决方案pulseaudio 不工作:“主目录无法访问:权限被拒绝”但这些解决方案对我来说似乎不起作用。

这是我的输出pulseaudio --dump-conf

### Read from configuration file: /etc/pulse/daemon.conf ###
daemonize = no
fail = yes
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 5
allow-module-loading = yes
allow-exit = yes
use-pid-file = yes
system-instance = no
local-server-type = user
cpu-limit = no
enable-shm = yes
flat-volumes = no
lock-memory = no
exit-idle-time = 20
scache-idle-time = 20
dl-search-path = /usr/lib/pulse-10.0/modules
default-script-file = /etc/pulse/default.pa
load-default-script-file = yes
log-target = 
log-level = notice
resample-method = auto
enable-remixing = yes
enable-lfe-remixing = no
lfe-crossover-freq = 0
default-sample-format = s16le
default-sample-rate = 44100
alternate-sample-rate = 48000
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 4
default-fragment-size-msec = 25
enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 1
deferred-volume-extra-delay-usec = 0
shm-size-bytes = 0
log-meta = no
log-time = no
log-backtrace = 0
rlimit-fsize = -1
rlimit-data = -1
rlimit-stack = -1
rlimit-core = -1
rlimit-rss = -1
rlimit-as = -1
rlimit-nproc = -1
rlimit-nofile = 256
rlimit-memlock = -1
rlimit-locks = -1
rlimit-sigpending = -1
rlimit-msgqueue = -1
rlimit-nice = 31
rlimit-rtprio = 9
rlimit-rttime = 200000

答案1

该说明用于sudo apt..安装 cmus,但我认为使用文档sudo(提升权限)来运行它存在错误。

只需cmus使用 cmus 即可。

答案2

首先卸载 cmus which cmus rm -rf /location/of/cmus 或 sudo apt remove cmus 或 brew remove cmus 然后 sudo su sudo apt install cmus sudo su "your user" cmus

相关内容