VcXsrv Windows X Server

发现一个windows下开源且好用X Server.

http://sourceforge.net/projects/vcxsrv/

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
}
 


vbs脚本(目的是启动远程程序时不出现控制台窗口cmd):

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"
}



自启动x server:

1.运行xlanuch按喜好配置好,并保存配置文件

2.增加启动项,启动命令为:

xlanuch -run config.xlaunch

config.xlaunch为前面保存的配置文件。


你可能感兴趣的:(linux,windows,开发工具)