Windows X-server based on the xorg git sources (like xming or cygwin's xwin), but compiled with Visual C++ 2010. Source code can also be compiled with VS2008, VS2008 Express Edition and VS2010 Express Edition.
安装完后,修改system.XWinrc菜单
menu remotehost { ubuntu-svr menu remoteapps } menu remoteapps { xterm exec "wscript ubuntuexterm.vbs" emacs exec "wscript ubuntuemacs.vbs" } menu root { // Comments fit here, too... "Reload system.XWinrc" RELOAD "Applications" menu apps Separator "Show log" exec "notepad %logfile%" Separator "Remote Apps" menu remotehost }
dim objShell set objShell=wscript.createObject("WScript.Shell") iReturnCode=objShell.Run("plink -ssh -2 -X -pw pwd [email protected] emacsclient -c -a '' ",0,TRUE)
可以编辑一个通用的执行脚本,如全名为remoteexec.vbs
内容如下:
dim objShell set objShell=wscript.createObject("WScript.Shell") Set args = WScript.Arguments if args.Count > 2 then pwd = args(0) url = args(1) cmd = args(2) iReturnCode=objShell.Run("plink -ssh -2 -X -pw " & pwd &" " & url & " " & cmd,0,TRUE) end if
可使用如下命令执行:
wscript remoteexec.vbs pwd [email protected] emacs
menu vmsvrapps { terminator exec "wscript remoteexec.vbs pwd [email protected] terminator" gnome-terminal exec "wscript remoteexec.vbs pwd [email protected] gnome-terminal" emacs exec "wscript remoteexec.vbs pwd [email protected] emacs" }