Finally, I get the lpadmin
configuration working with my automated script. 
Now, I do the following: configure lpadmin
in the < printer-appVM >
qvm-run --no-gui --pass-io --quiet --user user <printer-appVM> \
"sudo lpadmin -p ${PRINTER_NAME} -E -v ipp://${PRINTER_IP}/ipp/print -m everywhere"
and afterwards (I would like to automated this):
# create /rw/config/qubes-bind-dirs.d/ directory
qvm-run --pass-io --user user <printer-appVM> \
"sudo mkdir --parents /rw/config/qubes-bind-dirs.d"
# make /rw/bind-dirs/ sub-directory for /etc/cups/ directory
qvm-run --pass-io --user user <printer-appVM> \
"sudo mkdir --parents /rw/bind-dirs/etc/cups/"
# copy entire contents of /etc/cups/ directory into the corresponding /rw/bind-dirs/etc/cups/ directory:
qvm-run --pass-io --user user <printer-appVM> \
"sudo cp --recursive /etc/cups/* /rw/bind-dirs/etc/cups/"
# create 50_user.conf file in /rw/config/qubes-bind-dirs.d/ directory and add the appropriate information for /etc/cups/ directory:
qvm-run --pass-io --user root <printer-appVM> \
"sudo echo binds+=\( \'/etc/cups/\' \) > /rw/config/qubes-bind-dirs.d/50_user.conf"
Unfortunately, this does not work in the automated script. I need to open a user and a root Terminal and copy & paste the command lines manually:
as < printer-appVM > user:
sudo mkdir --parents /rw/config/qubes-bind-dirs.d
sudo mkdir --parents /rw/bind-dirs/etc/cups/
sudo cp --recursive /etc/cups/* /rw/bind-dirs/etc/cups/
as < printer-appVM > root:
echo binds+=\( \'/etc/cups/\' \) > /rw/config/qubes-bind-dirs.d/50_user.conf
So, my current implementation is to make a break in my script which allows me to do the above copy & paste operation manually and continue the automated script afterwards. I am wondering what is the difference between qvm-run --pass-io … and pass the command line vs. execute the command line directly in the terminal window. Is there an initialization of user files when opening the terminal the first time which does not happen with the qvm-run --pass-io
command?