diff --git a/assets/dbus/org.freedesktop.FileManager1.xml b/assets/dbus/org.freedesktop.FileManager1.xml
index ccf592aea5..65a5e4ff8f 100644
--- a/assets/dbus/org.freedesktop.FileManager1.xml
+++ b/assets/dbus/org.freedesktop.FileManager1.xml
@@ -16,5 +16,8 @@
+
+
+
diff --git a/assets/scripts/dde-file-manager b/assets/scripts/dde-file-manager
index 14833e50d9..dbe02c661d 100755
--- a/assets/scripts/dde-file-manager
+++ b/assets/scripts/dde-file-manager
@@ -4,15 +4,16 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
-f="${1#file://}"
+args=""
+for arg in "$@"; do
+ args+="$arg,"
+done
-# dde-file-manager --show-item xxx
-if [[ "$1" == "--show-item" ]]; then
- dbus-send --print-reply --dest=org.freedesktop.FileManager1 /org/freedesktop/FileManager1 org.freedesktop.FileManager1.ShowItems "array:string:${@:2}" "string:"
-# dde-file-manager /path/to/xxx or file:///path/to/xxx
-elif [ -e "$f" ]; then
- dbus-send --print-reply --dest=org.freedesktop.FileManager1 /org/freedesktop/FileManager1 org.freedesktop.FileManager1.ShowItems "array:string:$f" "string:"
-else
- exec /usr/libexec/dde-file-manager "$@"
-fi
+args=${args%,}
+
+dbus-send --print-reply --dest=org.freedesktop.FileManager1 /org/freedesktop/FileManager1 org.freedesktop.FileManager1.Open array:string:"$args"
+if [ $? -ne 0 ]; then
+ echo "dbus call failed"
+ exec file-manager.sh "$@"
+fi
diff --git a/src/plugins/server/serverplugin-filemanager1/filemanager1dbus.cpp b/src/plugins/server/serverplugin-filemanager1/filemanager1dbus.cpp
index ef6fdbc193..7d17e1ea2e 100644
--- a/src/plugins/server/serverplugin-filemanager1/filemanager1dbus.cpp
+++ b/src/plugins/server/serverplugin-filemanager1/filemanager1dbus.cpp
@@ -84,3 +84,11 @@ void FileManager1DBus::Trash(const QStringList &URIs)
QJsonDocument doc(argsObj);
QProcess::startDetached("dde-file-manager", QStringList() << "--event" << doc.toJson());
}
+
+void FileManager1DBus::Open(const QStringList &Args)
+{
+ if (QProcess::startDetached("file-manager.sh", QStringList() << Args))
+ return;
+
+ QProcess::startDetached("dde-file-manager", QStringList() << Args);
+}
diff --git a/src/plugins/server/serverplugin-filemanager1/filemanager1dbus.h b/src/plugins/server/serverplugin-filemanager1/filemanager1dbus.h
index 085e86aba7..d79c84dd27 100644
--- a/src/plugins/server/serverplugin-filemanager1/filemanager1dbus.h
+++ b/src/plugins/server/serverplugin-filemanager1/filemanager1dbus.h
@@ -24,6 +24,7 @@ public slots:
void ShowItemProperties(const QStringList &URIs, const QString &StartupId);
void ShowItems(const QStringList &URIs, const QString &StartupId);
void Trash(const QStringList &URIs);
+ void Open(const QStringList &Args);
};
#endif // FILEMANAGER1DBUS_H