emersion / go-autostart Goto Github PK
View Code? Open in Web Editor NEWA Go library to run a command after login
License: MIT License
A Go library to run a command after login
License: MIT License
How can I disable windows start up for this? I already made my own for windows
Working Directory setting for Windows is not supported.
The package seems to create a desktop file entry in accordance with the XDG specification at the path ~/.config/autostart. However, this file seem defective, as Gnome fails to parse them with the following journal error:
gnome-session-binary[1894]: WARNING: Could not parse desktop file ProtonMail Bridge.desktop or it references a not found TryExec binary
I believe this to be an issue with the double hyphenations in the "Exec" field. I see that you've tried working around the issue by escaping those, but it seems that Gnome fails to parse these properly (I'm guessing it works fine on other desktop environments).
On my system I've managed to apply an ugly hack in the form of:
Exec=sh -c "/usr/lib/protonmail/bridge/protonmail-bridge --no-window"
I'm not sure how presentable this solution is, but I was too lazy to come up with anything nicer.
On Mac, this approach sometimes works and sometimes doesn't. I can't figure out why.
THis article might explain it:
http://blog.gordn.org/2015/03/implementing-run-on-login-for-your-node.html
I think you need to "load" the job.
This package creates the pList
file and places it in the LaunchAgent
directory but doesn't do "load" the job.
Creating .bat
files is an ugly solution. Creating .lnk
files seems better. See http://stackoverflow.com/questions/3906974/how-to-programmatically-create-a-shortcut-using-win32
https://github.com/mycodesmells/misc-examples/tree/master/launchd
just ad keep alive to the plist !!
Since 4b93ee2, windows doesn't work like others. Arguments are discarded and the executable must be specified with an absolute path.
Hello.
I'm trying to compile code for windows from MacOS and Linux and I've got an error:
app.Enable undefined (type *autostart.App has no field or method Enable)
My code:
if runtime.GOOS == "windows" {
exe, _ := os.Executable()
app := &autostart.App{
Name: "test",
DisplayName: "test",
Exec: []string{exe},
}
app.Enable()
}
In Windows, when enabling exe to start on boot, currently it opens a terminal on boot.
I would like to enable the program to run on boot, minimized.
Currently, go-autostart creates a shortcut in windows, I think that there's a way to control wether the shortcut opens minimized or it will open a windows.
The goal: I want to start the program shortcut on booth without any window, in background.
➜ GOOS=windows go build -ldflags "-H=windowsgui" .
# github.com/SkYNewZ/twitch-clip
./main.go:69:105: app.IsEnabled undefined (type *autostart.App has no field or method IsEnabled)
./main.go:92:13: app.IsEnabled undefined (type *autostart.App has no field or method IsEnabled)
./main.go:95:17: app.Disable undefined (type *autostart.App has no field or method Disable)
./main.go:103:17: app.Enable undefined (type *autostart.App has no field or method Enable)
➜ GOOS=linux go build . # Another error
# github.com/getlantern/systray
../../../../pkg/mod/github.com/getlantern/[email protected]/systray.go:78:2: undefined: nativeLoop
../../../../pkg/mod/github.com/getlantern/[email protected]/systray.go:106:2: undefined: registerSystray
../../../../pkg/mod/github.com/getlantern/[email protected]/systray.go:111:14: undefined: quit
../../../../pkg/mod/github.com/getlantern/[email protected]/systray.go:136:2: undefined: addSeparator
../../../../pkg/mod/github.com/getlantern/[email protected]/systray.go:190:2: undefined: hideMenuItem
../../../../pkg/mod/github.com/getlantern/[email protected]/systray.go:195:2: undefined: showMenuItem
../../../../pkg/mod/github.com/getlantern/[email protected]/systray.go:220:2: undefined: addOrUpdateMenuItem
When building for Windows, I get this error. My program is building/running successfully on macOS.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.