1

I'm using /etc/rc.local and here is the current contents:

Okay, for some reason the formatting here isn't making a codeblock and instead is making everything bold and 3x the size. Those who are able, please feel free to edit the post and change this - however for now I'll have to use pastebin links.

http://pastebin.com/8x5L8iGz ( rc.local contents )

http://pastebin.com/6rVRMkic ( /root/VPSInfinity/vncboot file )

If I run /root/VPSInfinity/vncboot by itself, everything works fine. If I reboot, /root/VPSInfinity/vncboot runs as the myfile.txt has a log written to it - but the vncserver command is not run.

I never get a log from rc.local to myfile.txt

Any help would be appreciated, I've spent far too much time on this already and read everything Google has thrown at me.

ish
  • 139,926
TJ Biddle
  • 113

1 Answers1

3

Here's why--vncserver exits with the following error:

vncserver: The HOME environment variable is not set.

This is because /usr/bin/vncserver is in fact a script which requires the home directory to be set (i.e. the user to have logged in), and will die (exit) because of this line of code:

745: die "$prog: The HOME environment variable is not set.\n";

To run vncserver on startup, before login, please follow the instructions in this answer: https://askubuntu.com/a/118645/58612 .

ish
  • 139,926