How can I start a NPM app from a desktop shortcut?
0
votes
1
answer
219
views
I have created a desktop shortcut for a
npm
application called TMXEditor, but it doesn't work.
I can launch the app if I do cd /home/souto/Apps/maxprograms/TMXEditor && npm start
on a terminal.
I put that in a bash file /home/souto/Apps/maxprograms/TMXEditor/start.sh
. The application runs if I just run that script in a terminal. Its exact contents are:
#!/bin/bash
cd /home/souto/Apps/maxprograms/TMXEditor && npm start
So I have created the .desktop file pointing to that:
[Desktop Entry]
Name=TMXEditor
Exec=/home/souto/Apps/maxprograms/TMXEditor/start.sh
Icon=/home/souto/Apps/maxprograms/TMXEditor/icons/tmxeditor.png
StartupNotify=true
Terminal=false
Type=Application
Categories=Translation;
Comment=
Path=/home/souto/Apps/maxprograms/TMXEditor
The .desktop
file is saved as /home/souto/.local/share/applications/TMXEditor.desktop
.
I can see the shortcut in Rofi, but when I run it from there the application will not start.
I have also tried putting Exec=xfce4-terminal -e "/home/souto/Apps/maxprograms/TMXEditor/start.sh
. In that case, I can see a terminal blinking for a fraction of a second but still the application will not run.
Both the .desktop and the bash files are executable:
-rwxrwxr-x 1 souto souto 296 feb 19 14:27 /home/souto/.local/share/applications/TMXEditor.desktop
-rwxrwxrwx 1 souto souto 67 feb 19 13:53 /home/souto/Apps/maxprograms/TMXEditor/start.sh
My desktop environment is Xfce 4.18 (on arch linux) and I normally use zsh 5.9 as the shell.
I'd appreciate some help to debug this shorcut. Thanks.
Asked by msoutopico
(103 rep)
Feb 19, 2024, 01:39 PM
Last activity: Feb 20, 2024, 06:52 PM
Last activity: Feb 20, 2024, 06:52 PM