Fix linux file opening by using Process Builder#8853
Conversation
Fixes #8831 Co-authored-by: ThiloteE <thilo.ertel@posteo.de>
Co-authored-by: ThiloteE <thilo.ertel@posteo.de>
Co-authored-by: ThiloteE <thilo.ertel@posteo.de>
|
Terminal opening works, but it doesn't openin the folder, althought directly executing the following command works: ` |
btut
left a comment
There was a problem hiding this comment.
Is there a particular reason you want to change to ProcessBuilder?
Co-authored-by: Siedlerchr siedlerkiller@gmail.com
|
Sorry for not giving credit, I somehow screwed up the co-authored-by. |
|
@btut Ok, I did a short test after you did the split: Linux Mint Cinnamon 20.3 with Nemo filemanager on first glance works perfectly :-) |
| Process p = runtime.exec("readlink /etc/alternatives/x-terminal-emulator"); | ||
| BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream())); | ||
|
|
||
| String emulatorName = reader.readLine(); |
There was a problem hiding this comment.
I get null here. I think /etc/alternatives is a Debian thing.
There was a problem hiding this comment.
Maybe if (Files.exists(/etc/alternatives...) ?
There was a problem hiding this comment.
Yes, but what if it does not exist? What terminal emulator do we choose then?
There was a problem hiding this comment.
Turns out there is no real solution, just checking multiple places https://superuser.com/a/1461079
There was a problem hiding this comment.
So how do we proceed? Leave it as is? Show an alert message that we cannot determine a TE?
Do you think this is a feature that many people use?
There was a problem hiding this comment.
Show an alert message. Unable to open terminal. I doubt many use this
|
as per #8849 (comment): the fix works on Fedora's default Gnome, too. |
* upstream/main: Add an importer for Citavi backup files (#8848) Reviewdoc: Comment on PRs (#8878) Squashed 'buildres/csl/csl-styles/' changes from 649aac4..e740261 Use JDK 15 text blocks to improve injected languages readability (#8874) Fix fetcher tests (#8877) Fix #8390 by allowing multiple group deletion for Remove groups > Kee… (#8875) Add restart warning on SSL configuration change (#8871) Update to lucene 9.2 (#8868) Fix for removing several groups deletes only one of them (#8801) Disable Write XMP Button in General tab of Entry-Editor when action is in progress (#8728) Bump jsoup from 1.14.3 to 1.15.1 (#8864) Bump unirest-java from 3.13.8 to 3.13.10 (#8869) Bump unoloader from 7.3.2 to 7.3.3 (#8863) Bump pascalgn/automerge-action from 0.15.2 to 0.15.3 (#8860) Bump classgraph from 4.8.146 to 4.8.147 (#8861) Bump mockito-core from 4.5.1 to 4.6.0 (#8862) Lucence dir checkers should only delete lucence dirs (#8854) Update README.md (#8858) Update adr.md Update adr.md
Set directory for terminal
| cmd = new String[] {emulatorName, absolutePath}; | ||
| } | ||
|
|
||
| ProcessBuilder builder = new ProcessBuilder(cmd); |
There was a problem hiding this comment.
🚫 [reviewdog] <com.puppycrawl.tools.checkstyle.checks.whitespace.SingleSpaceSeparatorCheck> reported by reviewdog 🐶
Use a single space to separate non-whitespace characters.
|
|
||
| public ConstantsPropertiesViewModel(BibDatabaseContext databaseContext, DialogService dialogService) { | ||
| this.databaseContext = databaseContext; | ||
| this.dialogService = dialogService; |
There was a problem hiding this comment.
🚫 [reviewdog] <com.puppycrawl.tools.checkstyle.checks.whitespace.SingleSpaceSeparatorCheck> reported by reviewdog 🐶
Use a single space to separate non-whitespace characters.
| EasyBind.subscribe(viewModel.selectedFetcherProperty(), fetcher -> { | ||
| if ((fetcher != null) && fetcher.getHelpPage().isPresent()) { | ||
| Button helpButton = factory.createIconButton(StandardActions.HELP, new HelpAction(fetcher.getHelpPage().get())); | ||
| Button helpButton = factory.createIconButton(StandardActions.HELP, new HelpAction(fetcher.getHelpPage().get(),dialogService)); |
There was a problem hiding this comment.
🚫 [reviewdog] <com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAfterCheck> reported by reviewdog 🐶
',' is not followed by whitespace.
|
TODO: l10n Could\ not\ detect\ terminal\ automatically.\ Please\ define\ a\ custom\ terminal\ in\ the\ preferences.=Could not detect terminal automatically. Please define a custom terminal in the preferences. |
|
reveal in file explorer works with arch linux, kde and dolphin, |
* upstream/main: Add ADR 25 to ADR Toc (#8882)
Fixes #8679
Fixes #8849
CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable)