vncdotool - A command line VNC client

作者:Daly 出处:http://www.cnblogs.com/daly 欢迎转载,也请保留这段声明。谢谢!

之前的一个项目需要需求希望可以通过命令行去远程执行一些Windows 系统操作。

所以决定采用: Python + vnctool

环境准备:

1. 2 台Windows机器。 其中一台作为lead机器, 一台作target机器。

2. Python2.7.5, VNC-5.0.5安装包和其他一些依赖包。 具体可以参考以下步骤。

On the lead machine:

1. Install Python2.7

1.1. Start with a Windows

1.2. Install python via python-2.7.5.msi

1.3. Set the Environment Variables (2 methods):

a. Open up PowerShell, and paste in the following:

[Environment]::SetEnvironmentVariable("Path",

"$env:Path;C:\Python27\;C:\Python27\Scripts\", "User")

b. Right click Computer and select "Properties" > click "Advanced system settings" > click "Environment Variables..." > select "Path" in "System variables" field and click "Edit" > add "C:\Python27\;C:\Python27\Scripts\;" at the "Variable value"

2. Install Twisted

2.1. Install Twisted via Twisted-13.1.0.win32-py2.7.exe

3. Install PIL

3.1. Install PIL via PIL-1.1.7.win32-py2.7.exe

4. Copy 2 scripts to C:\Python27\Scripts

4.1. Copy file ez_setup.py and get-pip.py to C:\Python27\Scripts

5. Install setuptools

5.1. Download setuptools-1.1.6

5.2. Launch CMD and input the follow commands to install setuptools:

> cd c:\setuptools-1.1.6

> python setup.py install

6. Install pip

6.1. Download pip-1.4.1

6.2. Launch CMD and input the follow commands to install pip:

> cd c:\pip-1.4.1

> python setup.py install

7. Install distribute

7.1. Download distribute-0.7.3

7.2. Launch CMD and input the follow commands to install distribute:

> cd c:\distribute-0.7.3

> python setup.py install

8. Install zope.interface

8.1. Download zope.interface-4.05

8.2. Launch CMD and input the follow commands to install zope.interface:

> cd c:\zope.interface-4.05

> python setup.py install

9. Install vncdotool

9.1. Download vncdotool -0.8.0

9.2. Launch CMD and input the follow commands to install vncdotool:

> cd c:\vncdotool -0.8.0

> python setup.py install

VNC Server installation(Install it on the lead machine and the target machine)

1. Install VNC Server

1.1. Download VNC-5.0.5-Windows.exe

1.2. Install VNC via VNC-5.0.5-Windows.exe

VNC Configuration (Configure it on the lead machine and the target machine)

1. After install VNC Server successfully, right click VNC icon in the bottom right corner of the toolbar > select "Options..."

2. Then select the "Advanced..." button:

3. Choose Authentication as "VNC password" and click "Configure.." > input the password to configure > choose Encryption as "Prefer off"

4. Select tab "Expert" > set the "ProtocolVersion" for the VNCServer to 4.0.

5. Click "Apply" and click "OK" to finish the configuration

VNCDO usage

1. Test the vncdo take effect:

On the lead machine, at the CMD prompt input:

> vncdo.exe -s xxx.xxx.xxx.xxx[the target machine‘s ip]  -p password[the password you set at VNC Configuration #3 capture screenshot.png

you will get the target machine‘s currently screenshot

2. vncdo usage

a. Input "vncdo --help" in CMD to get the vncdo all usage

b. Some useful usage:

>vncdo -s xxx.xxx.xxx.xxx -p password type "hello"

>vncdo -s xxx.xxx.xxx.xxx -p password key ctrl-alt-del expect a.png 0

>vncdo -s xxx.xxx.xxx.xxx -p password type "administrator" key tab type "password" key enter expect d.png 0

3. Get more info from the website: http://pythonhosted.org/vncdotool/

https://pypi.python.org/pypi/vncdotool

时间: 2024-09-29 03:42:23

vncdotool - A command line VNC client的相关文章

Proxy settings in TortoiseSVN and command line svn client

The server file is created when you install TortoiseSVN, Eclipse or command-line Subversion. Use the appropriate path from the installation folder to configure proxy settings: CLI Unix/Linux : /home/username/.subversion/servers CLI Windows (2k, XP):

Can't use Subversion command line client: svn

使用Intellij IDEA的svn时提示出错:Can't use Subversion command line client: svn. 当我在使用svn,Checkout一个项目后,然后将其导入到Intellij idea中,出现这样的报错!经过google后,发现了问题,我的问题是:我安装的TortoiseSVN工具,本身是带有command-line功能的(我没有安装)如图: 所以报这个错误.如果安装的TortoiseSVN工具,本身是不带有command-line功能的,必须要安装

Error “can't use subversion command line client : svn” Probably the path to Subversion executable is wrong

错误提示如图. 大概意思就是SVN路径不对 解决方法如下: 首先下载Subversion 1.8.13(1.8) 下载链接(https://www.visualsvn.com/downloads/) 然后解压到一个文件夹中. 将会有一个文件夹bin, 然后 去设置- >版本控制- > Subversion 按照图片: 保存,问题解决! Error "can't use subversion command line client : svn" Probably the pa

Android Studio集成SVN报错:can't use subversion command line client : svn

Android Studio集成SVN插件,check out出代码后,每次开启都会在右上角出现如下错误: Can't use Subversion command line client: svn Probably the path to Subversion executable is wrong. Fix it. Errors found while svn working copies detection. Fix it. 下面直接上解决方案吧: 1.安装客户端http://ncu.dl

Idea中配置svn时报 Can't use Subversion command line client: svn.Errors found while svn working copies detection.

使用Intellij的svn时提示出错:Can't use Subversion command line client: svn. Errors found while svn working copies detection. 当我在使用svn,Checkout一个项目后,然后将其导入到Intellij中,就出现这样的报错! 经过google后,明白了,我的问题是:我安装的TortoiseSVN工具,本身不是带有command-line功能的,必须要安装VisualSVN,而且须要单独安装.

Webstorm 提示 Can't use Subversion command line client

Webstorm 提示 Can't use Subversion command line client (Probably the path to Subversion executable is wrong) 如何解决? 安装了phpstorm之后,想配置svn,结果在file->settings->Version Contorl->subversion->with conmand line client配置成 D:\Program Files\TortoiseSVN\bin\

Can't use Subversion command line client: svn. Errors found while svn working copies detection.

idea 报错: Can't use Subversion command line client: svn. Errors found while svn working copies detection. 1.卸载以前的svn客户端 2.下载 VisualSVN  下载地址:http://subversion.apache.org/packages.html#windows,下载完成后解压到任意目录 3.idea设置:File->settings-> 红色框里面设置你刚刚解压的 Visua

mysql5.1 command line client 登录时出现闪退

因为长时间没有使用mysql command line client.今天在使用时,打开界面,输入密码后就出现了闪退,同时workbench平台也显示不能连接数据库.首先我照着百度试了一下,发觉在"计算机"-->"管理"(右键)-->"服务"下,没有找到mysql有关的服务. 解决办法如下: (1)打开cmd窗口,把路径调整到mysql command line client 的bin 文件下,即输入:cd C:\Program Fi

Can't use Subversion command line client:svn 报错处理

需要主意的有两点: 1.安装svn的时候,第二项,command line client tools也要安装 2.点击报错的fix it 打开了settings,把红色框中的地址改为安装svn地址路径下的svn.exe Android Studio面板中的以下两个按钮分别是 svn的跟新 和 上传 Can't use Subversion command line client:svn 报错处理