Skip to content

Commit

Permalink
Fix opening pdf with okular in linux (JabRef#5253)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-morales committed Jan 20, 2020
1 parent 6319d05 commit 98edbfb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#

### Fixed

- We fixed and issue where pdf files will not open under some KDE linux distributions when using okular. [#5253](https://github.com/JabRef/jabref/issues/5253)
- We fixed an issue where the Medline fetcher was only working when JabRef was running from source. [#5645](https://github.com/JabRef/jabref/issues/5645)
- We fixed some visual issues in the dark theme. [#5764](https://github.com/JabRef/jabref/pull/5764) [#5753](https://github.com/JabRef/jabref/issues/5753)
- We fixed an issue where non-default previews didn't handle unicode characters. [#5779](https://github.com/JabRef/jabref/issues/5779)
Expand Down
12 changes: 10 additions & 2 deletions src/main/java/org/jabref/gui/desktop/os/Linux.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ public void openFile(String filePath, String fileType) throws IOException {
viewer = "xdg-open";
}
String[] cmdArray = { viewer, filePath };
Runtime.getRuntime().exec(cmdArray);
Process p;
p = Runtime.getRuntime().exec(cmdArray);
BufferedReader in = new BufferedReader(new InputStreamReader(p.getErrorStream()));
String line;
line = in.readLine();
}

@Override
Expand All @@ -46,7 +50,11 @@ public void openFileWithApplication(String filePath, String application) throws
String[] cmdArray = new String[openWith.length + 1];
System.arraycopy(openWith, 0, cmdArray, 0, openWith.length);
cmdArray[cmdArray.length - 1] = filePath;
Runtime.getRuntime().exec(cmdArray);
Process p;
p = Runtime.getRuntime().exec(cmdArray);
BufferedReader in = new BufferedReader(new InputStreamReader(p.getErrorStream()));
String line;
line = in.readLine();
}

@Override
Expand Down

0 comments on commit 98edbfb

Please sign in to comment.