diff --git a/source/ublexec.cc b/source/ublexec.cc index dfd2e52..950f59a 100644 --- a/source/ublexec.cc +++ b/source/ublexec.cc @@ -629,7 +629,13 @@ string MainWindow::start_cmd(string user_cmd) { } string cmd = ""; if (path_file.length() > 0) { - cmd = str_nice_cmd + str_cmd_terminal + str_variants_root + " xdg-open '" + path_file + "' "; + if (access(path_file.c_str(), X_OK) != -1) { + cmd = str_nice_cmd + str_cmd_terminal + str_variants_root + " " + path_file; + } + else{ + cmd = str_nice_cmd + str_cmd_terminal + str_variants_root + " xdg-open '" + path_file + "' "; + } + } else if (name_app.length() > 0) { cmd = str_nice_cmd + str_cmd_terminal + str_variants_root + name_app;