Hi, I have 20 computer clients to connect 10 shared USB devices. Each USB device allow only 1 connection at any time. And we don't want any computer connecting to more than 1 shared USB device. So ideally 10 computers can use these 10 shared USB devices simultaneously. If the USB device is not in use, it should be put back to available pool for next user. As we also have other computers in same LAN, we need to prevent shared USB devices from being connected by other computers as well.
Do we have to use different configuration file in each computer client?
I have read the configurations of virtualhere but still not sure about something (especially how to limit the number USB devices used by each client). Would you please advise?
Thanks.
.
Actually this is quite easy to do, follow this https://www.virtualhere.com/authorization
You can pass an argument called
$NUM_BINDINGS$
. So you just need to have a very simple script that just returns not authorized if num_bindings = 1 e.gIn the server config.ini file
---------------------------------
...
clientAuthorization=/root/auth.sh "$NUM_BINDINGS$"
...
In the auth.sh file
----------------------
Thank you Michael. Would you
Thank you Michael. Would you please advise what script shall I use in Windows batch?
I have tried this in server config.ini
--------------------------------------
clientAuthorization=.\auth.bat %NUM_BINDINGS%
in the auth.bat file
-------------------------
@echo off
IF %1 == 1 (EXIT 0) ELSE (EXIT 1)
also tried in the auto.bat file
---------------------
@echo off
IF %1 == 1 (ECHO 0) ELSE (ECHO 1)
Still couldn't get it work. it didn't allow anyone to connect when using ECHO. and allow unlimited connection when using EXIT.
.
OK if its windows you do it like this:
config.ini line
auth.bat
It works! thanks~
It works!
thanks~