Closed jfaltermeier closed 1 month ago
For testing the theia scheme on ubuntu I slightly adjusted the generated desktop file:
[Desktop Entry]
Name=TheiaIDE
Exec=/home/johannes/.local/share/applications/theia-ide-launcher.sh %U
Terminal=false
Type=Application
Icon=/home/johannes/.local/share/applications/theia-ide-electron-app.png
StartupWMClass=TheiaIDE
MimeType=x-scheme-handler/theia;
Comment=Eclipse Theia IDE product
Categories=Development;
The referenced launcher script looks like this (basically adding logging of the passed arguments):
#!/bin/bash
# Log the arguments to a file
echo "App launched with: $@" >> /tmp/xxx-theia_launch.log
# Launch the AppImage with the provided arguments
/home/johannes/Git/theia-blueprint/applications/electron/dist/TheiaIDE.AppImage "$@"
Now I can see that the AppImage gets the theia scheme URL passed:
App launched with:
App launched with: theia://tylerleonhardt.open-external/open-external
Nothing happens though (besides that a new frontend is started), but I guess this is then an issue with plain Theia and not with the IDE and the metadata in the desktopfile
On Windows and Mac the theia://
protocol gets handled as expected.
For testing the theia scheme on ubuntu I slightly adjusted the generated desktop file:
[Desktop Entry] Name=TheiaIDE Exec=/home/johannes/.local/share/applications/theia-ide-launcher.sh %U Terminal=false Type=Application Icon=/home/johannes/.local/share/applications/theia-ide-electron-app.png StartupWMClass=TheiaIDE MimeType=x-scheme-handler/theia; Comment=Eclipse Theia IDE product Categories=Development;
The referenced launcher script looks like this (basically adding logging of the passed arguments):
#!/bin/bash # Log the arguments to a file echo "App launched with: $@" >> /tmp/xxx-theia_launch.log # Launch the AppImage with the provided arguments /home/johannes/Git/theia-blueprint/applications/electron/dist/TheiaIDE.AppImage "$@"
Now I can see that the AppImage gets the theia scheme URL passed:
App launched with: App launched with: theia://tylerleonhardt.open-external/open-external
Nothing happens though (besides that a new frontend is started), but I guess this is then an issue with plain Theia and not with the IDE and the metadata in the desktopfile
I can see that VSCode uses two desktop files, one passing --open-url
that is also hidden in the launcher. I'll try this
Edit: That seems to do the trick, I'll adapt accordingly
What it does
update-desktop-database ~/.local/share/applications/
after the desktop file was createdcloses #378 closes #383
Contributed on behalf of STMicroelectronics
How to test
theia://
protocol handling (see https://github.com/eclipse-theia/theia/pull/13306 for instructions)~/.theia-ide/globalStorage/theia-ide-launcher/desktopfile.json
Review checklist
Reminder for reviewers