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.
Showing
1 changed file
with
5 additions
and
1 deletions
... | @@ -43,7 +43,11 @@ public class LibreOfficeRenderer { | ... | @@ -43,7 +43,11 @@ public class LibreOfficeRenderer { |
43 | UtilIO.writeString(outputFile, output); | 43 | UtilIO.writeString(outputFile, output); |
44 | 44 | ||
45 | List<String> args = Arrays.asList(new String[]{"libreoffice", "--headless", "--convert-to", "pdf", outputFile.getPath(), "--outdir", "/tmp"}); | 45 | List<String> args = Arrays.asList(new String[]{"libreoffice", "--headless", "--convert-to", "pdf", outputFile.getPath(), "--outdir", "/tmp"}); |
46 | Process process = new ProcessBuilder(args).start(); | 46 | ProcessBuilder pb = new ProcessBuilder(args); |
47 | Map env = pb.environment(); | ||
48 | env.put("HOME", "/home/ofbiz"); | ||
49 | env.put("USERNAME", "ofbiz"); | ||
50 | Process process = pb.start(); | ||
47 | InputStream is = process.getInputStream(); | 51 | InputStream is = process.getInputStream(); |
48 | process.waitFor(); | 52 | process.waitFor(); |
49 | 53 | ... | ... |
-
Please register or sign in to post a comment