Qirky / Troop

Real-time Live Coding collaboration app
311 stars 37 forks source link

add client options --name, --password #50

Closed jwaldmann closed 4 years ago

jwaldmann commented 4 years ago

For the client GUI, I'd like to avoid the "splash screen" that asks for settings. I see that --cli is there to "use the command line" but actually it is using standard input.

I was hoping for --name, --password command line arguments. These shouldn't be hard to add? I'll try to do it.

Yes I know it's a risk to put a password on the command line (since other processes on the computer then might see it) but this happens for run-server already.

Qirky commented 4 years ago

I don't mind the --name flag but I don't really want to add a visible password option for the client as that is rarely going to be spawned as a process that will require that input. Can I ask why doing this through the standard input is unsatisfactory?

jwaldmann commented 4 years ago

I am running the client on the server that renders audio (#49) and the easiest way to start it would be to put everything on the command line.

troop-server already has no GUI; and everything (including password) as cmd line arguments.

jwaldmann commented 4 years ago

I was trying to write a shell script to the tune of

python run-client.py -H  xx.xx.xx.xx -P xxx -m tidalcycles -i <<EOF
xx
xxxxxxxx
EOF

but the client seems stuck waiting for the password. Is it not reading stdin as a stream here? - no it's not, it seems that's a feature of that library.

Qirky commented 4 years ago

I've added a 'name' startup flag but I'm not planning on adding a password one. The server application requires no interaction and processes running it can be spawned automatically but the client application should always require human input so I'm leaving the password as a required input. Troop isn't really designed to have sound generated on the remote server - it requires client-side audio generation - so this may not be the best suited program for your application