Repository navigation
Closed
Labels
Description
think you guys are missing an extra dash for the passwd flag
$ man cmus
--passwd PASSWD
Set the password for TCP/IP connections. Must be set if you are listening from host[:port]. Used in conjunction with --listen.
NOT WORKING
$ cmus --listen localhost:3050 --passwd abc123
cmus: unrecognized option `--passwd'
WORKING
$ cmus --listen localhost:3050 -passwd abc123
uname -a:
Linux heOyeA-ant 5.5.6-arch1-1 #1 SMP PREEMPT Mon, 24 Feb 2020 12:20:16 +0000 x86_64 GNU/Linux
cmus --version:
cmus v2.8.0
Copyright 2004-2006 Timo Hirvonen
Copyright 2008-2016 Various Authors
cmus --plugins:
Input Plugins: /usr/lib/cmus/ip
mad:
Priority: 55
File Types: mp3 mp2
MIME Types: audio/mpeg audio/x-mp3 audio/x-mpeg
wavpack:
Priority: 50
File Types: wv
MIME Types: audio/x-wavpack
mp4:
Priority: 50
File Types: mp4 m4a m4b
MIME Types:
vorbis:
Priority: 50
File Types: ogg oga ogx
MIME Types: application/ogg audio/x-ogg
cue:
Priority: 50
File Types:
MIME Types: application/x-cue
wav:
Priority: 50
File Types: wav
MIME Types:
cdio:
Priority: 50
File Types:
MIME Types: x-content/audio-cdda
opus:
Priority: 50
File Types: opus
MIME Types:
aac:
Priority: 50
File Types: aac
MIME Types: audio/aac audio/aacp
mpc:
Priority: 50
File Types: mpc mpp mp+
MIME Types: audio/x-musepack
flac:
Priority: 50
File Types: flac fla
MIME Types:
modplug:
Priority: 50
File Types: mod s3m xm it 669 amf ams dbm dmf dsm far mdl med mtm okt ptm stm ult umx mt2 psm
MIME Types:
ffmpeg:
Priority: 30
File Types: aa aac ac3 aif aifc aiff ape au fla flac m4a m4b mka mkv mp+ mp2 mp3 mp4 mpc mpp ogg shn tak tta wav webm wma wv
MIME Types:
Output Plugins: /usr/lib/cmus/op
pulse
alsa
oss
jack
ao
Activity
dirdi commentedon May 23, 2020
I can confirm this bug. The
passwdoption is missing in this struct:cmus/ui_curses.c
Line 2472 in d1290d5
Therefore the
long_optionfunction will raise the observed error:cmus/prog.c
Line 91 in 17bf542
eshrh commentedon Jun 3, 2020
Strange how this hasn't been caught earlier...
mokulus commentedon Jun 10, 2020
passwd is only implemented in
main.c, which iscmus-remote.cmusdoesn't have this flag. Checkcmus --helpandcmus-remote --helpmokulus commentedon Jun 10, 2020
@gotbletu I don't think using one dash makes it work. It just ignores the flag.
cmus/prog.c
Lines 126 to 134 in 17bf542
It will return -1 if opt is like
-[not dash][not null], and will be silently ignored.dirdi commentedon Jun 10, 2020
@mokulus AFAIK both cmus and cmus-remote (should) have a --passwd option. According to cmus' man page its --passwd option is there to set the password to control cmus via TCP/IP socket, whereas cmus-remote's --passwd option is there to provide this password in order to connect to cmus' socket.
cmus' --passwd option has not been documented at its usage message, though. I would recommend to open up another bug report regarding this.
mokulus commentedon Jun 10, 2020
@dirdi AFAIK there are two main functions:
For cmus-remote:
cmus/main.c
Line 271 in 17bf542
For cmus:
cmus/ui_curses.c
Line 2472 in 17bf542
And if you look at the code in
ui_curses.cthere is no passwd here, and it's not checked for in the arguments.pgaskin commentedon Jun 4, 2021
The server password should be set in the options rather than the CLI options. I'll update the documentation.
Fix documentation for passwd config option (fixes cmus#971)