Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

executableArgs do not work on snap #4587

Closed
Laruxo opened this issue Jan 9, 2020 · 4 comments · Fixed by #7198
Closed

executableArgs do not work on snap #4587

Laruxo opened this issue Jan 9, 2020 · 4 comments · Fixed by #7198

Comments

@Laruxo
Copy link

Laruxo commented Jan 9, 2020

I have quite simple requirement to have app start on boot and to do it minimized. So far snap gives me the biggest headache. I already have autoStart working and now I am trying to make it start hidden. From what I've read the best way is to add --hidden argument when it is starting on boot. For that in snap desktop file I need this line: Exec=myApp --hidden

I've tried adding executableArgs: ['--hidden'] to linux target, but it did not work. From what I could find this condition seems to be at fault - https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/src/targets/LinuxTargetHelper.ts#L95

exec is equal to packager.executableName, so it cannot be null:
https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/src/targets/snap.ts#L182

I would be happy to make a PR to fix this but I am not sure if executableArgs can be safely moved out of that if. Or maybe there is some better solution?

This could also solve AppImage issues such as #4496

@stale stale bot added backlog and removed backlog labels Mar 9, 2020
@electron-userland electron-userland deleted a comment from Laruxo Mar 10, 2020
@electron-userland electron-userland deleted a comment from stale bot Mar 10, 2020
@develar
Copy link
Member

develar commented Mar 10, 2020

I would be happy to make a PR to fix this but I am not sure if executableArgs can be safely moved out of that if

To answer, need to try. I suggest to do some changes and prepare PR. I will take responsibility to finish PR as nessary.

@Cabecinha84
Copy link

We are also facing issues, in our case we are trying to add --no-sandbox but its not added, and we are using the latest version of the builder. So the AppImage generated doesn't run for example on debian 10.

"linux": { "icon": "build/icons", "target": [ "deb", "AppImage" ], "executableArgs": [ "--no-sandbox" ] },

@stale
Copy link

stale bot commented Jun 5, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the backlog label Jun 5, 2020
@stale stale bot closed this as completed Jun 12, 2020
@jojapoppa
Copy link

Can we please get some action on this item? It would resolve the issue that AppImages cannot work properly on Debian, as the --no-sandbox flag will not work without this fix. The executableArgs section is supposed to be functional. tx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants