1、安装 rdesktop
rdesktop官网:www.rdesktop.org ,可官方网站找到更详细的用法和说明。
使用rdesktop可以实现ubuntu下远程windows桌面。如果没有安装的话,先安装:
sudo apt-get install rdesktop
安装完成之后就可以开始使用了。
2、使用
直接使用命令 rdesktop 192.168.0.10:2495
即可开始进行远程,不过为了的得到更好的体验和更强大的功能,需要更进一步了解这个命令的用法:
rdesktop
命令 常用参数有:
参数 | 含义 |
---|---|
-u | 用户名 |
-p | 密码,要注意了,如果你的密码里有特殊字符,你可以把密码用 " 号包裹 |
-P | 缓冲,可选 |
-n | 客户端主机名(显示windows任务管理器中的连接客户端名) |
-g | 桌面大小( 宽* 高)[也可以用 x(小写的X)] |
-f | 全屏模式,从全屏模式切换出来按Ctrl+Alt+Enter |
-a | 连接颜色深度(最高到16位),一般选16才会显示真彩色(window7支持32位) |
-0 | 数字0表示连接上windows控制台,等效mstsc/console命令 |
-r | clipboard:PRIMARYCLIPBOARD 重要,剪贴板可以与远程桌面交互,好像只对复制的文字有效。比方说你在远程上复制了一个文件,你不能在本地粘贴这个文件。你只能远程上复制一段文本,你可以在本地粘贴。不过对于文件,可以使用下面的参数。 |
-r | disk:wj=/home/magicgod 映射虚拟盘,可选,会在远程机器的网上邻居里虚拟出一个映射盘,功能很强,甚至可以是软盘或光盘 |
-r | sound:off 关闭声音,当然也可以把远程发的声音映射到本地来。 |
-z | 压缩,可选 |
3、举个例子
远程连接:
rdesktop 192.168.0.10:2495 -u administrator -p "password" -r clipboard:PRIMARYCLIPBOARD -r disk:myUbuntu=/home/xxx/
# xxx 表示自己的用户目录
使用administrator账户连接 192.168.0.10 远程桌面并提供剪切板支持,并将本地的用户目录在远程桌面上以虚拟盘出现在“计算机”里。
效果如下:
4、英语文档
这是一份来自命令行得到的帮助文档:
rdesktop: A Remote Desktop Protocol client.
Version 1.9.0. Copyright (C) 1999-2016 Matthew Chapman et al.
See http://www.rdesktop.org/ for more information.
Usage: rdesktop [options] server[:port]
-u: user name
-d: domain
-s: shell / seamless application to start remotely
-c: working directory
-p: password (- to prompt)
-n: client hostname
-k: keyboard layout on server (en-us, de, sv, etc.)
-g: desktop geometry (WxH[@DPI][+X[+Y]])
-i: enables smartcard authentication, password is used as pin
-f: full-screen mode
-b: force bitmap updates
-L: local codepage
-A: path to SeamlessRDP shell, this enables SeamlessRDP mode
-V: tls version (1.0, 1.1, 1.2, defaults to negotiation)
-B: use BackingStore of X-server (if available)
-e: disable encryption (French TS)
-E: disable encryption from client to server
-m: do not send motion events
-M: use local mouse cursor
-C: use private colour map
-D: hide window manager decorations
-K: keep window manager key bindings
-S: caption button size (single application mode)
-T: window title
-t: disable use of remote ctrl
-N: enable numlock synchronization
-X: embed into another window with a given id.
-a: connection colour depth
-z: enable rdp compression
-x: RDP5 experience (m[odem 28.8], b[roadband], l[an] or hex nr.)
-P: use persistent bitmap caching
-r: enable specified device redirection (this flag can be repeated)
'-r comport:COM1=/dev/ttyS0': enable serial redirection of /dev/ttyS0 to COM1
or COM1=/dev/ttyS0,COM2=/dev/ttyS1
'-r disk:floppy=/mnt/floppy': enable redirection of /mnt/floppy to 'floppy' share
or 'floppy=/mnt/floppy,cdrom=/mnt/cdrom'
'-r clientname=<client name>': Set the client name displayed
for redirected disks
'-r lptport:LPT1=/dev/lp0': enable parallel redirection of /dev/lp0 to LPT1
or LPT1=/dev/lp0,LPT2=/dev/lp1
'-r printer:mydeskjet': enable printer redirection
or mydeskjet="HP LaserJet IIIP" to enter server driver as well
'-r sound:[local[:driver[:device]]|off|remote]': enable sound redirection
remote would leave sound on server
available drivers for 'local':
alsa: ALSA output driver, default device: default
'-r clipboard:[off|PRIMARYCLIPBOARD|CLIPBOARD]': enable clipboard
redirection.
'PRIMARYCLIPBOARD' looks at both PRIMARY and CLIPBOARD
when sending data to server.
'CLIPBOARD' looks at only CLIPBOARD.
'-r scard[:"Scard Name"="Alias Name[;Vendor Name]"[,...]]
example: -r scard:"eToken PRO 00 00"="AKS ifdh 0"
"eToken PRO 00 00" -> Device in GNU/Linux and UNIX environment
"AKS ifdh 0" -> Device shown in Windows environment
example: -r scard:"eToken PRO 00 00"="AKS ifdh 0;AKS"
"eToken PRO 00 00" -> Device in GNU/Linux and UNIX environment
"AKS ifdh 0" -> Device shown in Microsoft Windows environment
"AKS" -> Device vendor name
-0: attach to console
-4: use RDP version 4
-5: use RDP version 5 (default)
-o: name=value: Adds an additional option to rdesktop.
sc-csp-name Specifies the Crypto Service Provider name which
is used to authenticate the user by smartcard
sc-container-name Specifies the container name, this is usually the username
sc-reader-name Smartcard reader name to use
sc-card-name Specifies the card name of the smartcard to use
-v: enable verbose logging
Full text complete, Reproduction please indicate the source. Help you? Not as good as one:
Comment(Comments need to be logged in. You are not logged in.)
You need to log in before you can comment.