Score:0

terminal command for Espruino Web IDE

mp flag

I installed the Espruino Web IDE on my Ubuntu laptop a year or so ago. I am presently grouping my coding tools together in the Dock using this script

[Desktop Entry]
Type=Application
Name=Programming
GenericName=Programming
Comment=Open-source electronics prototyping platform
Exec="~/ArduinoLatest/Arduino-1.8.13/arduino-1.8.13/arduino"
Icon=~/Bilder/Icons/Clock.png
Terminal=false
Categories=Development;IDE;Electronics;
MimeType=text/x-arduino;
Keywords=embedded electronics;electronics;avr;microcontroller;
Actions= ArduinoBeta;UIFlow;M5_Burner;Espruino;;

[Desktop Action ArduinoBeta]
Name=Arduino-Beta
Exec=~/ArduinoLatest/Arduino-2/arduino-ide_2.0.0-beta.5_Linux_64bit/arduino-ide

[Desktop Action UIFlow]
Name=UI Flow
Exec=~~/UIFlowIDE/bin/uiflow-desktop-ide

[Desktop Action M5_Burner]
Name=M5_Burner
Exec=~/UIFlowIDE/M5Burner/bin/electron-m5burner-v2-eletron

[Desktop Action Espruino]
Name=Espruino
Exec=

The problem is that although I can search for and find and execute Espruino Web IDE vie the Activities menu and in Dock and "Dash to Dock" I cannot find the actual command used to launch the app. How can I find out what command the Dock is using?

waltinator avatar
it flag
Your `Exec=` commands (and `Icon=`) are flawed. Replace the `~` (and `~~`?) with the absolute path.
mp flag
They are the absolute path in real life, I just didn't want the full paths published on the internet. But the script works perfectly well and I only published it as background. The problem, as I wrote, is I would like to know the command used by Dock to launch the Espruino Web IDE.
Terrance avatar
id flag
Do you mean `https://www.espruino.com/ide/` ?
Terrance avatar
id flag
`firefox https://www.espruino.com/ide/` will do it, or change to any browser that you are using before the web URL. Dock files are just `.desktop` files that have the full command in them. `Exec=/usr/bin/firefox https://www.espruino.com/ide/` or instead of `Exec=` you can use `URL=https://www.espruino.com/ide/` that will use your default browser to open the link in a `.desktop` file.
mp flag
Thanks `Exec=google-chrome https://www.espruino.com/ide/` works by opening a chrome tab with the IDE and I can use this solution. However when the IDE opens from Dock it seems to be a simple window without other tabs, Url, or other Chrome stuff whereas when I open it with `google-chrome https://www.espruino.com/ide/` it either opens a new instance of Chrome or if one is already open, opens a new window. `URL=https://www.espruino.com/ide/` doesn't seem to do anything.
Score:1
id flag

For the .desktop file you should be able to run the Espruino Web IDE with --app mode in Chrome.

Exec=google-chrome --app="https://www.espruino.com/ide/"

Hope this helps!

mp flag
Perfect! Thank you very much, this is exactly what I was looking for although I didn't explain myself very well!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.