Setting resolution for headless prior to xorg loading

OK, there may well be other ways to do this, but I am looking for a specific solution.

I’m using Fed34 with the Compiz spin on a number of desktop machines.

As I have more machines then monitors I often initially configure a box, then only ever log onto and start an xorg session using VNC (suitable protected and VNC has to be manually started prior to the logon).

I am currently use xrandr -fb aaaaaxbbbbb in a user startup script to then set the screen resolutions, this works fine except that my mate panels become ‘confused’ about app placement as the initial screen resolution doesn’t allow them to ‘stick’ where they were previously (i.e. they get scrunched up).

So, is there a way to set the screen resolution at the logon screen prior to xorg firing up? If not, is there a way hidden away somewhere to manually delay the panel apps starting up till either the proper resolution has been set or possibly editing a setting to force the apps to load at a specific point only once the panel has been live for ccc seconds?

I can live with the way I’m doing it now as it only takes a few seconds to fix each time, but it’s annoying and I’m sure there should be a way to automate it.

May be this is what you are looking for: How to Change the VNC Server Resolution in Linux

Sorry no, that’s changing the resolution after the session has started.

I just found this, but I’m not sure since I never did it:

sudo tee -a  /etc/systemd/system/xvnc@.service << EOF

Description=Daemon for each XVNC connection

ExecStart=-/usr/bin/Xvnc -inetd -query localhost -geometry 2000x1200 -once -SecurityTypes=None


Please read all the doc here on method 3 and adjust acordingly.