forked from rosa/hakurei
cmd/app: optional interactive shell
Enabling this unconditionally causes the new configuration prompt to be shown when started from a terminal, and is generally less robust than not reading zshrc unless explicitly required. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
+7
-2
@@ -74,7 +74,7 @@ func parse(id string, base *check.Absolute, r io.Reader) (*hst.Config, error) {
|
|||||||
Shell: shell,
|
Shell: shell,
|
||||||
Home: home,
|
Home: home,
|
||||||
Path: shell,
|
Path: shell,
|
||||||
Args: []string{"zsh", "-ic"},
|
Args: []string{"zsh", "-c"},
|
||||||
|
|
||||||
Flags: hst.FCoverRun,
|
Flags: hst.FCoverRun,
|
||||||
},
|
},
|
||||||
@@ -108,8 +108,9 @@ func parse(id string, base *check.Absolute, r io.Reader) (*hst.Config, error) {
|
|||||||
}
|
}
|
||||||
c.Container.Args = append(c.Container.Args, s.Text(), "")
|
c.Container.Args = append(c.Container.Args, s.Text(), "")
|
||||||
|
|
||||||
var flagGPU, flagSystemBus bool
|
var flagInteractive, flagGPU, flagSystemBus bool
|
||||||
flags := map[string]*bool{
|
flags := map[string]*bool{
|
||||||
|
"interactive": &flagInteractive,
|
||||||
"gpu": &flagGPU,
|
"gpu": &flagGPU,
|
||||||
"system_bus": &flagSystemBus,
|
"system_bus": &flagSystemBus,
|
||||||
}
|
}
|
||||||
@@ -259,6 +260,10 @@ func parse(id string, base *check.Absolute, r io.Reader) (*hst.Config, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if flagInteractive {
|
||||||
|
c.Container.Args[1] += "i"
|
||||||
|
}
|
||||||
|
|
||||||
if flagGPU {
|
if flagGPU {
|
||||||
c.Container.Filesystem = append(c.Container.Filesystem, []hst.FilesystemConfigJSON{
|
c.Container.Filesystem = append(c.Container.Filesystem, []hst.FilesystemConfigJSON{
|
||||||
{FilesystemConfig: &hst.FSBind{
|
{FilesystemConfig: &hst.FSBind{
|
||||||
|
|||||||
+1
-1
@@ -112,7 +112,7 @@ talk com.canonical.Unity
|
|||||||
Home: hst.AbsPrivateTmp.Append("home"),
|
Home: hst.AbsPrivateTmp.Append("home"),
|
||||||
Path: fhs.AbsRoot.Append("bin", "zsh"),
|
Path: fhs.AbsRoot.Append("bin", "zsh"),
|
||||||
Args: []string{
|
Args: []string{
|
||||||
"zsh", "-ic",
|
"zsh", "-c",
|
||||||
"exec Discord --ozone-platform-hint=wayland",
|
"exec Discord --ozone-platform-hint=wayland",
|
||||||
"",
|
"",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user