03-14-2023 04:15 PM
Having some fun trying to run a shell script to auto-start some things via init.d. Understand that getting these wrong can have major implications.They're also a bit of a mystic art to get right IMO. Hoping someone can offer some assistance on what might be wrong, and potential ways to troubleshoot issues like this that happen without loud errors. The script worked to launch/modify what I had wanted to do, but had symptoms within the LabVIEW toolchain such as no more discovery with Max or not being able to deploy to target. Could still ping, ssh, sftp, add to project, discover cards, but if you enabled script on boot, certain things wouldn't work, disable script on boot, back to working.
Command Line arguments as well as script file content are below.
Command Line commands:
GoTo /etc/init.d and execute the following commands (likely as admin).
Based on this link https://unix.stackexchange.com/questions/20357/how-can-i-make-a-script-in-etc-init-d-start-at-boot
chmod +x x11vnc_starter
chkconfig --add x11vnc_starter
chkconfig --level 2345 x11vnc_starter on
Verify the script is added and enabled appropriately
chkconfig --list | grep x11vnc_starter
Contents of x11vnc-starter file:
### BEGIN INIT INFO
# Provides: x11vnc
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: x11vnc starter
# Description: starts the x11vnc server with specified options at set resolution
### END INIT INFO
xrandr --display :0 --fb 1920x1080
x11vnc -display :0 -forever -shared -passwdfile /home/admin/.vnc/passwdfile
Thanks in advance,