aideb
asked on
Scripted configuration of TightVNC with Start on boot
Hi,
I'm trying to develop a script that I can work into an unattended build that will configure TightVNC on Kali linux (based on Debian) and then ensure that it runs on boot
Here is what I have currently in my bash script (deploy.sh)
This is setting the password and starting the VNC server however when the machine is restarted, the service does not start back up
Can someone help me with this please
I'm trying to develop a script that I can work into an unattended build that will configure TightVNC on Kali linux (based on Debian) and then ensure that it runs on boot
Here is what I have currently in my bash script (deploy.sh)
# Configure VNC Password
umask 0077 # use safe default permissions
mkdir -p "$HOME/.vnc" # create config directory
chmod go-rwx "$HOME/.vnc" # enforce safe permissions
vncpasswd -f <<<"remotecl" >"$HOME/.vnc/passwd" # generate and write a password
# Start VNC
/usr/bin/tightvncserver -geometry 1500x700 -depth 16
This is setting the password and starting the VNC server however when the machine is restarted, the service does not start back up
Can someone help me with this please
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great - Thanks Scott
I ran this
sudo ln -s /etc/initd/vncserver /etc/rc5.d/S08vncserver
sudo ln -s /etc/initd/vncserver /etc/rc0.d/K01vncserver
and it started on boot!
How am I best automating this so that I can add it all to my deploy.sh
I ran this
sudo ln -s /etc/initd/vncserver /etc/rc5.d/S08vncserver
sudo ln -s /etc/initd/vncserver /etc/rc0.d/K01vncserver
and it started on boot!
How am I best automating this so that I can add it all to my deploy.sh
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for all your assistance to resolve this!
ASKER
That has moved me along nicely - I used the info in your link and discovered another post
I did
sudo nano /etc/initd/vncserver
and populated this with
Open in new window
I can now start the service with
/etc/initd/vncserver start
and stop with
/etc/initd/vncserver stop
How can I get the start command to execute on boot?
Cheers