grist-electron icon indicating copy to clipboard operation
grist-electron copied to clipboard

Gear Lever can't launch Grist Desktop

Open slimhk45 opened this issue 8 months ago • 8 comments

Hello, I installed Grist Desktop with Gear Lever and the app didn't start until I removed --no-sandbox %U in command-line arguments. Can you explain what this line is used for and why Grist Desktop can't start with it (it is the default option set by Gear Lever)?

Image

slimhk45 avatar Mar 10 '25 06:03 slimhk45

the app didn't start

Did you get any specific error messages?

paulfitz avatar Mar 10 '25 13:03 paulfitz

the app didn't start

Did you get any specific error messages?

It just doesn't start by default. No specific error message thrown.

slimhk45 avatar Mar 10 '25 15:03 slimhk45

Hmm if I try this from the command line I get this error:

$ ~/Downloads/grist-desktop-0.3.0-linux-x86_64.AppImage --no-sandbox
error: unknown option '--no-sandbox'

I'm unfamiliar with Gear Lever and I don't know what %U is or what it is trying to achieve here.

paulfitz avatar Mar 10 '25 17:03 paulfitz

Can confirm this issue, we also ran into this at the AUR package: https://aur.archlinux.org/packages/grist-desktop-bin#comment-1025396

It looks like the released .AppImage file has a malformed .desktop file. When running ./grist-desktop-0.3.2-linux-x86_64.AppImage --appimage-extract, the contents of squashfs-root/grist-desktop.desktop file are like this:

[Desktop Entry]
Name=Grist Desktop
Exec=AppRun --no-sandbox %U
Terminal=false
Type=Application
Icon=grist-desktop
StartupWMClass=Grist Desktop
X-AppImage-Version=0.3.2
Comment=Grist Desktop
Categories=Development;

I'm not sure how the packaging of the .AppImage works, but it looks like the --no-sandbox argument is added to the .desktop file during this build already.

In the AUR package, we patched the .desktop file to remove the --no-sandbox argument, but this should probably happen in Grist's build directly, since it can be reproduced on other platforms as well.

I don't know what %U is or what it is trying to achieve here.

Most .desktop files have this. It represents the list of URLs with which the application is launched by the user. See the specification: https://specifications.freedesktop.org/desktop-entry-spec/latest/exec-variables.html

mpsijm avatar May 21 '25 09:05 mpsijm

Thanks for the help understanding this @mpsijm ! Desktop packaging happens here: https://github.com/gristlabs/grist-desktop/blob/153fd05d5201943a24d7f2a623c0b76c54a2f331/.github/workflows/package.yml#L125 Which is just running: https://github.com/gristlabs/grist-desktop/blob/153fd05d5201943a24d7f2a623c0b76c54a2f331/scripts/ci.sh#L21

So maybe we're on a bad version of ... something or other.

paulfitz avatar May 21 '25 15:05 paulfitz

That could be? If you don't change anything about the .desktop file in your build process (which I believe is the case), then maybe you could try to upgrade the dependencies in https://github.com/gristlabs/grist-desktop/blob/main/ext/package.json for the next release, to see if that results in an updated default .desktop file 🙂 At least, electron could be upgraded from 30 to 36, and electron-builder from 25 to 26.

mpsijm avatar May 23 '25 18:05 mpsijm

I can confirm this is a problem. The appimage launcher tool also expects this argument

rambip avatar Oct 28 '25 20:10 rambip

Also occuring with appimaged:

Image

almereyda avatar Nov 02 '25 20:11 almereyda