Skip to content

Commit 5db4da2

Browse files
committed
fix: VNC command configuration and update to TigerVNC
1 parent d0bcd55 commit 5db4da2

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

go-client/config.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -478,17 +478,17 @@
478478
"is_set": true
479479
},
480480
{
481-
"name": "vncviewer",
482-
"display_name": "RealVNC Viewer",
481+
"name": "tigervnc",
482+
"display_name": "TigerVNC",
483483
"protocol": ["vnc"],
484484
"comment": {
485-
"zh": "RealVNC Viewer 是一款用于远程控制计算机的软件,它使用VNC(Virtual Network Computing)协议,允许用户从一台计算机(客户端)访问和控制另一台计算机(服务器)的桌面",
486-
"en": "RealVNC Viewer is a software used for remote computer control. It utilizes the VNC (Virtual Network Computing) protocol, allowing users to access and control the desktop of another computer (the server) from their own computer"
485+
"zh": "TigerVNC是一个高效且安全的远程桌面控制工具,适用于跨平台操作,并有强大的安全性能保障",
486+
"en": "TigerVNC is an efficient and secure remote desktop control tool that is suitable for cross platform operations and has strong security performance guarantees."
487487
},
488-
"download_url": "https://www.realvnc.com/en/connect/download/viewer/",
488+
"download_url": "https://sourceforge.net/projects/tigervnc/files/stable/1.15.0/tigervnc-1.15.0.x86_64.tar.gz",
489489
"type": "remotedesktop",
490-
"path": "/Applications/VNC Viewer.app/Contents/MacOS/vncviewer",
491-
"arg_format": "-WarnUnencrypted=0 -VerifyId=0 -UserName={username} {host}:{port}",
490+
"path": "/Applications/TigerVNC viewer 1.15.0.app/Contents/MacOS/TigerVNC viewer",
491+
"arg_format": "{host}:{port}",
492492
"match_first": ["vnc"],
493493
"is_internal": false,
494494
"is_default": false,

go-client/pkg/awaken/awaken_darwin.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,12 @@ func awakenVNCCommand(r *Rouse, cfg *config.AppConfig) *exec.Cmd {
4545
"port": strconv.Itoa(r.Port),
4646
}
4747
commands := getCommandFromArgs(connectMap, appItem.ArgFormat)
48-
appPath := appItem.Path
49-
_cmd := exec.Command(appPath, strings.Split(commands, " ")...)
50-
_cmd.Start()
51-
52-
currentPath := filepath.Dir(os.Args[0])
53-
scriptPath := filepath.Join(currentPath, "Scripts", "vnc.scpt")
54-
cmd := exec.Command("osascript", "-s", "h", scriptPath, r.Value, "0")
48+
cmd := exec.Command(appItem.Path, strings.Split(commands, " ")...)
49+
// 设置环境变量(只对这个子进程有效)
50+
cmd.Env = append(os.Environ(),
51+
"VNC_USERNAME="+r.getUserName(),
52+
"VNC_PASSWORD="+r.Value,
53+
)
5554
return cmd
5655
}
5756

0 commit comments

Comments
 (0)