[GH-ISSUE #201] best way to implement auto launch on startup? #135

Closed
opened 2026-05-05 11:46:51 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @yrik on GitHub (Feb 11, 2019).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/201

Hello! Thank you for the awesome package.
I'm developing personal activity tracker that would help to remember what I was working some time before and help to prepare invoices. The app should start tracking automatically when the computer starts. It should remain in the tray.

I have found a package auto-launch, but It's not clear how to specify a path to the running app. I use electron packager. The package automatically takes a process.execPath for the electron app. Should it do the same for the react-proton app as well?

Offtop: Does anyone know how to rename the app in the mac os menu after it's being packaged? It shows nodejs instead of the name I used in the package.js.

Originally created by @yrik on GitHub (Feb 11, 2019). Original GitHub issue: https://github.com/kusti8/proton-native/issues/201 Hello! Thank you for the awesome package. I'm developing personal activity tracker that would help to remember what I was working some time before and help to prepare invoices. The app should start tracking automatically when the computer starts. It should remain in the tray. I have found a package auto-launch, but It's not clear how to specify a path to the running app. I use electron packager. The package automatically takes a `process.execPath` for the electron app. Should it do the same for the react-proton app as well? Offtop: Does anyone know how to rename the app in the mac os menu after it's being packaged? It shows nodejs instead of the name I used in the package.js.
Author
Owner

@mischnic commented on GitHub (Feb 13, 2019):

I have found a package auto-launch, but It's not clear how to specify a path to the running app. I use electron packager. The package automatically takes a process.execPath for the electron app. Should it do the same for the react-proton app as well?

At least for macOS, this path should work:
path.dirname(process.execPath) + "/YOUR_APP_NAME"
I don't know about Linux or Windows.

Offtop: Does anyone know how to rename the app in the mac os menu after it's being packaged? It shows nodejs instead of the name I used in the package.js.

For me, the output generated by electron-builder has this title set to the name specified in package.json

<!-- gh-comment-id:463348381 --> @mischnic commented on GitHub (Feb 13, 2019): > I have found a package auto-launch, but It's not clear how to specify a path to the running app. I use electron packager. The package automatically takes a `process.execPath` for the electron app. Should it do the same for the react-proton app as well? At least for macOS, this path should work: `path.dirname(process.execPath) + "/YOUR_APP_NAME"` I don't know about Linux or Windows. > Offtop: Does anyone know how to rename the app in the mac os menu after it's being packaged? It shows nodejs instead of the name I used in the package.js. For me, the output generated by electron-builder has this title set to the `name` specified in package.json
Author
Owner

@yrik commented on GitHub (Mar 9, 2019):

Thanks.
Eventually, it works for me for mac too with following code

const launcher = new AutoLaunch({
    name: 'Tracker App',
    path: process.execPath,
});
<!-- gh-comment-id:471161573 --> @yrik commented on GitHub (Mar 9, 2019): Thanks. Eventually, it works for me for mac too with following code ``` const launcher = new AutoLaunch({ name: 'Tracker App', path: process.execPath, }); ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/proton-native#135
No description provided.