How to set Vncserver in bash script (redhat6)

橙三吉。 提交于 2019-12-12 03:36:51

问题


I am using a script to automatically set up a computer. I need to assign a password to the vnc server for the user, which is normally done using the vncserver command. However, it prompts for the user to enter and re-enter their password, neither of which the script is capable of doing.

So, how can I set up the VNC password without an interactive prompt?


回答1:


Please try following bash script sample:

#!/bin/sh

vncpasswd << EOF
123456
123456
EOF


来源:https://stackoverflow.com/questions/31851343/how-to-set-vncserver-in-bash-script-redhat6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!