Launching Bokeh app locally without terminal

In the documentation, the suggested way to start Bokeh dashboard locally is to open a terminal and apply the command bokeh serve --show myapp.py. This is easy for me, but may seem unaccustomed for the end user of my dashboard. How can I make it so that users can launch dashboard by double-clicking on the shortcut? By conception, myapp.py and the shortcut must be in the same folder.

There might be a way to accomplish this with a shell script, where you create a .sh file that is executable upon double-clicking (this may require chmod or changing extensions: macos - Execute a BASH script... by double-clicking on it? - Ask Different).

The file myapp.sh could look something like:

#!/bin/sh
bokeh serve --show myapp.py

And then to make it executable,

$ chmod a+x myapp.sh
2 Likes

AFAIK clickable shortcuts (and especially how to install them) are all going to be platform-specific, and also not really related to Bokeh, per se. You might have better luck posing this question on Stack Overflow.

2 Likes

Unfortunately, it doesn’t work. myapp.sh continues to open in a text editor.

What OS are you on?

elementary OS 6 (Ubuntu 20.04 based)