-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix linux file opening by using Process Builder #8853
Conversation
Fixes #8831 Co-authored-by: ThiloteE <[email protected]>
Co-authored-by: ThiloteE <[email protected]>
Co-authored-by: ThiloteE <[email protected]>
Terminal opening works, but it doesn't openin the folder, althought directly executing the following command works: ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a particular reason you want to change to ProcessBuilder?
Co-authored-by: Siedlerchr [email protected]
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get null here. I think /etc/alternatives is a Debian thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe if (Files.exists(/etc/alternatives...) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but what if it does not exist? What terminal emulator do we choose then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out there is no real solution, just checking multiple places https://superuser.com/a/1461079
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [reviewdog] <com.puppycrawl.tools.checkstyle.checks.whitespace.SingleSpaceSeparatorCheck> reported by reviewdog 🐶
Use a single space to separate non-whitespace characters.
this.databaseContext = databaseContext; | ||
this.dialogService = dialogService; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [reviewdog] <com.puppycrawl.tools.checkstyle.checks.whitespace.SingleSpaceSeparatorCheck> reported by reviewdog 🐶
Use a single space to separate non-whitespace characters.
@@ -51,7 +53,7 @@ private void initialize() { | |||
ActionFactory factory = new ActionFactory(preferences.getKeyBindingRepository()); | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [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.md
described in a way that is understandable for the average user (if applicable)