Skip to content

Fixing "working directory" argument of two of the three Linux "open terminal" commands#9954

Merged
Siedlerchr merged 1 commit into
JabRef:mainfrom
credmond:fix-for-9953
May 30, 2023
Merged

Fixing "working directory" argument of two of the three Linux "open terminal" commands#9954
Siedlerchr merged 1 commit into
JabRef:mainfrom
credmond:fix-for-9953

Conversation

@credmond

@credmond credmond commented May 28, 2023

Copy link
Copy Markdown
Contributor

Fixes #9953

The "working directory" arguments to "gnome-terminal" and "konsole" were incorrect due to slight mis-use of ProcessBuilder, which meant they were badly formed and the terminal loaded in a default directory (most likely the user's home dir).

There are currently no tests at all for any of this functionality at a low-level (i.e., what operating system commands are called and with what args), nor any OS-specific test filtering, etc... probably because it is significant and complex to assert a running terminal's directory, especially from a unit test. Therefore, I have intentionally not attempted to add a test because doing so would require considerable refactoring of existing tests (OpenConsoleActionTest), with not much benefit -- and it still might not be possible to truly prove a terminal opens in a particular directory anyway.

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@credmond

Copy link
Copy Markdown
Contributor Author

Could someone with access please re-run the failed test job? I think they failed for reasons unrelated to my change (though why exactly, I didn't investigate deeply and it wasn't obvious).

All runs fine locally and my change should have no effect on that (or any other) test...

@Siedlerchr

Copy link
Copy Markdown
Member

Yes they are unrelated. That test sometimes fails randomly

@Siedlerchr

Siedlerchr commented May 30, 2023

Copy link
Copy Markdown
Member

@ThiloteE can you test this changes on your Linux system? I remember that you had issues with the terminal as well

@ThiloteE

Copy link
Copy Markdown
Member

I will try, but later today, don't have time now

@ThiloteE

Copy link
Copy Markdown
Member

Works like a charm on Linux Mint 20.3 Cinnamon (Linux kernel 5.4), which is based on the Ubuntu distribution.

@Siedlerchr Siedlerchr merged commit 2a11af0 into JabRef:main May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Open terminal here" working directory ignored (gnome-terminal)

3 participants