Skip to content

Commit 778d873

Browse files
author
Martin Plieske
committed
changed executeCommandLinux()
1 parent e4431f2 commit 778d873

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/main/java/de/doubleslash/keeptime/common/BrowserHelper.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ private static void executeCommandWindows(final Runtime rt, final String url) {
5050

5151
private static void executeCommandLinux(final Runtime rt, final String url) {
5252
try {
53-
final String command = "xdg-open " + url;
54-
LOG.debug("execute command: {}", command);
53+
final String command = url;
54+
LOG.debug("execute command: xdg-open {}", command);
5555

56-
rt.exec(command);
56+
rt.exec(new String[] {
57+
"xdg-open", command
58+
});
5759
} catch (final Exception e) {
5860
LOG.warn(e.getMessage());
5961
}

src/main/java/de/doubleslash/keeptime/common/FileOpenHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private static void executeCommandLinux(final Runtime rt, final String fileStrin
6262
LOG.debug("executing command: gedit {}", command);
6363

6464
rt.exec(new String[] {
65-
"gedit", command
65+
"xdg-open", command
6666
});
6767
} catch (final Exception e) {
6868
LOG.error(e.getMessage());

0 commit comments

Comments
 (0)