- This topic has 2 replies, 2 voices, and was last updated 5 years, 11 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
Home › Forums › Help and Support › Invalid parameter -b when calling dispcal
Hi
I’m using a HUG2 with a fresh install of Ubuntu.
The device is correctly detected the first time that dispcal is executed, but it failed on the second time it looks like it’s the USB problem describe in another post. Therefore I create a script in order to automatically reset the device before dispcal is called.
It looks like it works fine, but during the execution , the following paramater are passed to dispcal: /home/philippe/bin/dispcal
-v2
-d1
-c1
-yl
-P0.595582635187,0.509274873524,1.60158311346
-ql
-t
-g2.2
-f1.0
-k0
-A4.0
-b
‘DELL U2415 2018-05-28 2.2 F-S XYZLUT+MTX_droite’
According to the man of dispcal -b parameter expect a numerical value.
What is wrong in my configuration ?
Do you think my script can confuse displaycal?
The script I use:
#!/bin/bash set -x vendor_id="273f" product_id="1004" usb_idVendor_file=$(grep -l $vendor_id /sys/bus/usb/devices/*/idVendor) usb_bus=$(dirname $usb_idVendor_file) echo 0 > $usb_bus/authorized echo 1 > $usb_bus/authorized binarie=$(basename $0) parameters=$(printf "%q " "$@" | sed "s/\\\,/,/g") echo "$binarie $parameters" >>/tmp/logdisplaycal /usr/bin/$binarie $parameters
Regards
Philippe
Hi,
According to the man of dispcal -b parameter expect a numerical value.
You’re probably using an older version of ArgyllCMS. Check that you are using at least version 1.7 (recommended is the current latest release, 2.0).
Edit: parameters=$(printf "%q " "$@" | sed "s/\\\,/,/g")
This backslash escapes spaces, which is unnecessary and turns -b into -b\ (with a literal backslash at the end) which is an invalid argument.
Hi
Thanks for your answer.
The installed version of ArgyllCMS is 2.0, but it looks like the man page is obsolete 🙁
As far as I can see, printf “%q ” “$@” escape space only inside parameters (in this case the name of the file) but it also escape comma that is not compatible with the -P parameter. The sed command suppress \ for the coma.
I will use another solution.
Thanks for you help
Philippe