File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,6 +37,6 @@ problem on those systems where Flatpak or DBus are not available.
3737## What is left to do?
3838
3939- [ ] Add an option to restrict the commands that can be run
40- - [ ] Add support for creating shims for host binaries
40+ - [x ] Add support for creating shims for host binaries
4141- [ ] Switch from TCP to Unix sockets
4242- [ ] Code optimization
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
1010 "os"
1111 "os/exec"
1212 "os/signal"
13+ "path"
1314 "strconv"
1415 "strings"
1516 "syscall"
@@ -41,9 +42,15 @@ shell on the host.`)
4142 return
4243 }
4344
44- command := []string {"sh" , "-c" , os .Getenv ("SHELL" )}
45- if len (os .Args ) > 1 {
46- command = os .Args [1 :]
45+ // Start the client otherwise
46+ var command []string
47+ if path .Base (os .Args [0 ]) == "hrun" {
48+ command = []string {"sh" , "-c" , os .Getenv ("SHELL" )}
49+ if len (os .Args ) > 1 {
50+ command = os .Args [1 :]
51+ }
52+ } else {
53+ command = append ([]string {path .Base (os .Args [0 ])}, os .Args [1 :]... )
4754 }
4855
4956 startClient (command )
You can’t perform that action at this time.
0 commit comments