Skip to content

Commit

Permalink
Fixing "working directory" argument of two of the three Linux (#9954)
Browse files Browse the repository at this point in the history
"open terminal" commands
  • Loading branch information
credmond authored May 30, 2023
1 parent af9972b commit 2a11af0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We fixed an issue where the encoding header in a bib file was not respected when the file contained a BOM (Byte Order Mark). [#9926](https://github.com/JabRef/jabref/issues/9926)
- We fixed an issue where cli help output for import and export format was inconsistent. [koppor#429](https://github.com/koppor/jabref/issues/429)
- We fixed an issue where no preview could be generated for some entry types and led to an exception [#9947](https://github.com/JabRef/jabref/issues/9947)
- We fixed an issue where the Linux terminal working directory argument was malformed and therefore ignored upon opening a terminal [#9953](https://github.com/JabRef/jabref/issues/9953)

### Removed

Expand Down
7 changes: 4 additions & 3 deletions src/main/java/org/jabref/gui/desktop/os/Linux.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,12 @@ public void openConsole(String absolutePath, DialogService dialogService) throws

String[] cmd;
if (emulatorName.contains("gnome")) {
cmd = new String[] {"gnome-terminal", "--working-directory=", absolutePath};
cmd = new String[] {"gnome-terminal", "--working-directory", absolutePath};
} else if (emulatorName.contains("xfce4")) {
cmd = new String[] {"xfce4-terminal", "--working-directory=", absolutePath};
// xfce4-terminal requires "--working-directory=<directory>" format (one arg)
cmd = new String[] {"xfce4-terminal", "--working-directory=" + absolutePath};
} else if (emulatorName.contains("konsole")) {
cmd = new String[] {"konsole", "--workdir=", absolutePath};
cmd = new String[] {"konsole", "--workdir", absolutePath};
} else {
cmd = new String[] {emulatorName, absolutePath};
}
Expand Down

0 comments on commit 2a11af0

Please sign in to comment.