start and stop sections of init scripts
I have a normal script /home/pi/startVNC.sh which contains the following:
Code:
#!/bin/sh Code:
#! /bin/sh |
What distro is this? Many distros should provide initialization scripts for vnc servers out of the box. Then, it's just a question of setting up a config file such as /etc/sysconfig/vncservers.
To answer your question, just put vncserver :1 -geometry 1280x720 into the start branch, and something like vncserver -kill :1 in the stop branch (check the syntax though, the precise command might depend on your particular vnc server). This does the job but doesn't separate config data and executable, thus provides little flexibility. |
Well this is Raspbian, so it's based on Debian. I had already tried what you said, but it doesn't work. In the log/error file it would say that the USER variable isn't defined. After inserting the variable, it starts complaining that the HOME variable isn't. After supplying that it just says "vncserver: Wrong type or access mode of /home/pi/.vnc." On the Raspberrypi website it's done differently. Have a look. I tried this and it works. But when switching the start and stop sections here with your recommendations it still stops working and gives the same error.
|
so the link you posted contains a start/stop script too. Is this what you need or?
|
Quote:
So what is the problem with the solution at the link you provided? |
The script at the provided link works fine. Now I'm just wondering why your starting and stopping methods
Code:
vncserver :1 -geometry 1280x720 Code:
vncserver -kill :1 Code:
su - pi -c "/usr/bin/vncserver :0 -geometry 1280x800 -depth 16 -pixelformat rgb565" Code:
/usr/bin/vncserver -kill :0 PS: Yes I am using the newest Raspian, Jessie. To what degree would that affect what the script looks like? |
All times are GMT -5. The time now is 06:31 AM. |