7fdd9705 by Ean Schuessler

Set HOME and USERNAME environment vars. #3913

It seems like this didn't used to be necessary, Adam
should see if jsvc is somehow responsible.
1 parent 55e32ab2
......@@ -43,7 +43,11 @@ public class LibreOfficeRenderer {
UtilIO.writeString(outputFile, output);
List<String> args = Arrays.asList(new String[]{"libreoffice", "--headless", "--convert-to", "pdf", outputFile.getPath(), "--outdir", "/tmp"});
Process process = new ProcessBuilder(args).start();
ProcessBuilder pb = new ProcessBuilder(args);
Map env = pb.environment();
env.put("HOME", "/home/ofbiz");
env.put("USERNAME", "ofbiz");
Process process = pb.start();
InputStream is = process.getInputStream();
process.waitFor();
......