
Su my_user -c "/usr/bin/vncserver -geometry 1280x1024 -depth 16" One needs to use quotation marks for the options, ie.
Running my script as root, which normally would happen, won't work. Is there an error in my script maybe? I guess the process'es owner has to be my_user for it to work, but I have no idea how to debug it.
Adding my script to System -> Preferences -> Startup Applications in Gnomeīut none of them worked. Adding to crontab -e as /home/my_user/scripts/startVNC. Adding my script to /etc/rc.local before exit 0. I checked all the generated symbolic links were there in the /etc/rcX.d/ folders. Copying my script to /etc/init.d/, calling update-rc.d -f startVNC defaults (also with 99 after defaults to make sure everything vncserver depended on is already running). So then I tried 5 things to make it run on start-up: When I execute it when logged in over ssh as my_user vncserver starts and I am able to see the GUI from my desktop. Yields: -rwxr-xr-x 1 root root 406 15:45 startVNC Obviously it's only the last line that's really important.
usr/bin/vncserver -geometry 1280x1024 -depth 24 # Short-Description: Start VNC server at boot time I've got a startup script that is relatively simple, ie: # BEGIN INIT INFO I've been struggling with this long enough to ask yet another startup script question.