GNOME application launcher for local penpot installation

Works nicely for me right now to launch my local docker installation. Sharing this here for documentation and maybe it’s useful for someone.

You need 3 files to implement this. I put all three into $HOME/.local/share/applications/

1) Shell script to start docker and open a browser window

penpot.sh

#!/bin/bash
if [ !  "$( docker container inspect -f '{{.State.Status}}' penpot-penpot-frontend-1 )" == "running" ] 
then
  docker compose -p penpot -f $PATHTOPENPOT/docker-compose.yaml up -d
fi
xdg-open http://localhost:9001

2) Desktop icon

penpot.png

penpot

3) Launcher file

penpot.desktop

[Desktop Entry]
Encoding=UTF-8
Name=Penpot
Exec=$HOME/.local/share/applications/penpot.sh
Icon=$HOME/.local/share/applications/penpot.png
Type=Application
Categories=Design

The $HOME variable is not resolved in the desktop file, you need to state your actual path. From the GNOME documentation:

The application binary is listed in the Exec key, either the complete path or a binary that is looked up in the PATH.

2 Likes

Thanks Manuel! I tried it and works like a charm.
I think you can forgo $HOME and stick to GNOME friendly ~/ instead.

It would be nice to encapsulate this in a small package that could be installed as a “proxy” for the actual installation, don’t you think?
Nice work!

2 Likes

Theoretically yes :smile: Practically I already tried it, piled up errors, and decided I’d need to throw too much time at this right now without having another use case… Happy though if someone has more expertise already and wants to improve it in any way!

1 Like

Hi,
Very much glad to hear this.
Which 3 files and where to find these files?
I use Debian based MX linux with Xfce desktop environment.
Will it work for me? I want to install PenPot locally.
Can we use Podman for any better?
Thanks

Hey @Zeno394 I’m afraid all this does is adding a desktop launcher to the GNOME desktop. So one can launch Penpot using a default UI interaction in GNOME, rather than typing a command.

It doesn’t do the local installation of Penpot as such. Nor will it work on a different Linux desktop environment other than GNOME.

1 Like