forked from security/hakurei
app/dbus: manage dbus proxy and pass address to child
This commit adds code that starts and registers the D-Bus proxy, as well as cleanup code that tracks and closes the daemon once our child exits. A few more flags were added to pass D-Bus config to xdg-dbus-proxy. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
10
cli.go
10
cli.go
@@ -7,7 +7,10 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
userName string
|
||||
userName string
|
||||
dbusConfig string
|
||||
dbusID string
|
||||
mpris bool
|
||||
|
||||
mustWayland bool
|
||||
mustX bool
|
||||
@@ -19,7 +22,10 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
flag.StringVar(&userName, "u", "chronos", "Specify a username")
|
||||
flag.StringVar(&userName, "u", "chronos", "Passwd name of user to run as")
|
||||
flag.StringVar(&dbusConfig, "dbus-config", "builtin", "Path to D-Bus proxy config file, or \"builtin\" for defaults")
|
||||
flag.StringVar(&dbusID, "dbus-id", "", "D-Bus ID of application, leave empty to disable own paths, has no effect if custom config is available")
|
||||
flag.BoolVar(&mpris, "mpris", false, "Allow owning MPRIS D-Bus path, has no effect if custom config is available")
|
||||
|
||||
flag.BoolVar(&mustWayland, "wayland", false, "Share Wayland socket")
|
||||
flag.BoolVar(&mustX, "X", false, "Share X11 socket and allow connection")
|
||||
|
||||
Reference in New Issue
Block a user