From 97b7b0eccc17af01494645db776cd71093367e67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=91=9E=E5=AE=81?= <3134191406@qq.com> Date: Sat, 24 Feb 2024 16:46:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nodeService.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/nodeService.js b/nodeService.js index 72324b4..e6478ef 100644 --- a/nodeService.js +++ b/nodeService.js @@ -41,11 +41,18 @@ app.post('/createShortcut', (req, res) => { // linux下创建快捷方式 const shortcutFolderPath = path.join(folderPath, `${shortcutName}.desktop`); + // const shortcutFileContent = `[Desktop Entry] + // Type=Application + // Name=${shortcutName} + // Exec=/usr/bin/chromium-browser ${shortcutURL} + // Icon=/usr/share/icons/hicolor/48x48/apps/chromium-browser.png`; + + // arm 下用火狐打开 const shortcutFileContent = `[Desktop Entry] Type=Application Name=${shortcutName} - Exec=/usr/bin/chromium-browser ${shortcutURL} - Icon=/usr/share/icons/hicolor/48x48/apps/chromium-browser.png`; + Exec=sudo /usr/bin/firefox-esr ${shortcutURL} + Icon=/usr/share/icons/hicolor/48x48/apps/firefox-esr.png`; try { fs.writeFileSync(shortcutFolderPath, shortcutFileContent);