SPICE script

Afox

Renowned Member
Dec 18, 2014
257
14
83
Hello,

I want to use this script to call SPICE sessions. I don´t have any experience with such scripts and need to ask a newbie question: where do I put my user-data in this script?

Is it possible to run this script as a regular "user" or do I need sudo/root privileges?

Thanks for any helpful answer.

Regards,

Afox
 
There is no userdata to put into this script. All required info is read from the command line.
The script is installed on the clients but it will only work on *nix clients and requires and installed spiceviewer.
 
is it possible to predefine all the data and just open virt-viewer by running this script without any further commandline-interaction (one example would help me a lot)? can a regular user run this script on a unix-machine without entering root password?
 
Create a proxmox user in the gui which is permitted to open a spice console to a VM and instruct the user to use this username/password. Hardcoding credentials into scripts is a dangerous thing.
 
After this line in the script add:
shift $((OPTIND-1))
PASSWORD=${PASSWORD:-YOUR_HARDCODED_PASSWORD}
USERNAME=${USERNAME:-YOUR_HARDCODED_USERNAME}