Some distributions use libpaper to set the default paper size for all applications. Debian/Ubuntu has a patch to add support for it.
Created attachment 2210 [details] libpaper-support.patch the first file has two patches, for the old debian version and the 8.53 I tried to port it to, but I think it needs some more work. You need to remove one of them or both before trying to apply. Problems with this patch include that it is not conditional. There is no patch in gs-esp for this yet, so you have to implement it manually if it is needed?
Maybe this should be a gp_ function. Do any other platforms have a default papersize mechanism?
A different version of this was added in r9334, r9336, and r9337, and is part of the 8.64 release.