I have an RHEL image on Azure that we launch to perform some specialized tasks. There is not an option to actually keep the service running.
However, sometimes on startup, when I attempt to run even just xeyes
, I get the following error:
$ xeyes
No protocol specified.
Error: Can't open display: :1
Other times, when we start it up using the exact same methodology everything works just fine. I can run everything from xeyes
to VNC and all is just fine. I even take special precautions when creating the VM before running the waagent
command since we launch the image in a Scale Set like creating the VNC instance (detailed later) and whatnot under a new user I add strictly for that purpose.
So here's my questions:
- Does anyone know of any oddities that would cause this erratic behavior?
- Is there anything anyone does to ensure that X starts?
- Is there anything I can do to force VNC, etc. to start after X?
Note: I don't need to set up remote X access, just local.
The basic instructions that I followed are the Red Hat RHEL 7 TigerVNC instructions on the Red Hat site itself.
My workaround, at this point, is to build the VM with Chef and then kick off a process to rebuild everything using those instructions.