新闻、帮助、产品更新动态

最新的业界新闻,产品系统更新开发动态,帮助教程和活动发布

linux系统下登录windows远程桌面的客户端

发布日:2022-05-20 14:35       阅读数:

windows系统远程桌面使用rdp协议,linux下面有不少支持该协议的程序,这里介绍两个,可以实现等同windows自带的mstsc客户端功能,如远程操作,复制,粘贴等。
$ xfreerdp /v:ip /u:user /p:password +clipboard /drive:tmp,/tmp
登录windows后可见linux下的/tmp目录被挂载到了windows下面,这样就可以实现两个系统之间的文件对传。
 
同时粘贴板也是可用的,直接在两个系统上各自打开一个文本编辑器,可以实现编辑器内的内容互相复制粘贴。

有时候我们可能需要指定分辨率,可以加上/w:1024 /h:600
 
更多参数看帮助文件
$ xfreerdp


FreeRDP - A Free Remote Desktop Protocol Implementation
See www.freerdp.com for more information


Usage: xfreerdp [file] [options] [/v:<server>[:port]]


Syntax:
    /flag (enables flag)
    /option:<value> (specifies option with value)
    +toggle -toggle (enables or disables toggle, where '/' is a synonym of '+')


    /v:<server>[:port]     Server hostname
    /port:<number>         Server port
    /w:<width>             Width
    /h:<height>            Height
    /size:<width>x<height>  Screen size
    /f                     Fullscreen mode
    /bpp:<depth>           Session bpp (color depth)
    /kbd:0x<layout id> or <layout name>  Keyboard layout
    /kbd-list              List keyboard layouts
    /kbd-type:<type id>    Keyboard type
    /kbd-subtype:<subtype id>  Keyboard subtype
    /kbd-fn-key:<function key count>  Keyboard function key count
    /admin                 Admin (or console) session
    /multimon              Use multiple monitors
    /workarea              Use available work area
    /monitors:<0,1,2...>   Select monitors to use
    /monitor-list          List detected monitors
    /t:<title>             Window title
    +decorations (default:off)  Window decorations
    +smart-sizing (default:off)  Scale remote desktop to window size
    /a                     Addin
    /vc                    Static virtual channel
    /dvc                   Dynamic virtual channel
    /u:[<domain>\]<user> or <user>[@<domain>]  Username
    /p:<password>          Password
    /d:<domain>            Domain
    /g:<gateway>[:port]    Gateway Hostname
    /gu:[<domain>\]<user> or <user>[@<domain>]  Gateway username
    /gp:<password>         Gateway password
    /gd:<domain>           Gateway domain
    /load-balance-info:<info string>  Load balance info
    /app:||<alias> or <executable path>  Remote application program
    /app-name:<app name>   Remote application name for user interface
    /app-icon:<icon path>  Remote application icon for user interface
    /app-cmd:<parameters>  Remote application command-line parameters
    /app-file:<file name>  File to open with remote application
    /app-guid:<app guid>   Remote application GUID
    +compression (default:off)  Compression
    /shell                 Alternate shell
    /shell-dir             Shell working directory
    /sound                 Audio output (sound)
    /microphone            Audio input (microphone)
    /audio-mode            Audio output mode
    /multimedia            Redirect multimedia (video)
    /network               Network connection type
    /drive                 Redirect drive
    +drives (default:off)  Redirect all drives
    +home-drive (default:off)  Redirect home drive
    +clipboard (default:off)  Redirect clipboard
    /serial                Redirect serial device
    /parallel              Redirect parallel device
    /smartcard             Redirect smartcard device
    /printer               Redirect printer device
    /usb                   Redirect USB device
    +multitouch (default:off)  Redirect multitouch input
    /echo                  Echo channel
    +fonts (default:off)   Smooth fonts (ClearType)
    +aero (default:off)    Desktop composition
    +window-drag (default:off)  Full window drag
    +menu-anims (default:off)  Menu animations
    -themes (default:on)   Themes
    -wallpaper (default:on)  Wallpaper
    /gdi:<sw|hw>           GDI rendering
    /rfx                   RemoteFX
    /rfx-mode:<image|video>  RemoteFX mode
    /frame-ack:<number>    Frame acknowledgement
    /nsc                   NSCodec
    /jpeg                  JPEG codec
    /jpeg-quality:<percentage>  JPEG quality
    -nego (default:on)     protocol security negotiation
    /sec:<rdp|tls|nla|ext>  force specific protocol security
    -sec-rdp (default:on)  rdp protocol security
    -sec-tls (default:on)  tls protocol security
    -sec-nla (default:on)  nla protocol security
    +sec-ext (default:off)  nla extended protocol security
    /cert-name:<name>      certificate name
    /cert-ignore           ignore certificate
    /pcb:<blob>            Preconnection Blob
    /pcid:<id>             Preconnection Id
    /vmconnect:<vmid>      Hyper-V console (use port 2179, disable negotiation)
    -authentication (default:on)  authentication (hack!)
    -encryption (default:on)  encryption (hack!)
    -grab-keyboard (default:on)  grab keyboard
    -toggle-fullscreen (default:on)  Alt+Ctrl+Enter toggles fullscreen
    -mouse-motion (default:on)  mouse-motion
    /parent-window:<window id>  Parent window id
    -bitmap-cache (default:on)  bitmap cache
    -offscreen-cache (default:on)  offscreen bitmap cache
    -glyph-cache (default:on)  glyph cache
    /codec-cache:<rfx|nsc|jpeg>  bitmap codec cache
    -fast-path (default:on)  fast-path input/output
    /max-fast-path-size:<size>  maximum fast-path update size
    +async-input (default:off)  asynchronous input
    +async-update (default:off)  asynchronous update
    +async-transport (default:off)  asynchronous transport (unstable)
    +async-channels (default:off)  asynchronous channels (unstable)
    /wm-class:<class name>  set the WM_CLASS hint for the window instance
    /version               print version
    /help                  print help
    /play-rfx:<pcap file>  Replay rfx pcap file
    +auth-only (default:off)  Authenticate only.


Examples:
    xfreerdp connection.rdp /p:Pwd123! /f
    xfreerdp /u:CONTOSO\JohnDoe /p:Pwd123! /v:rdp.contoso.com
    xfreerdp /u:JohnDoe /p:Pwd123! /w:1366 /h:768 /v:192.168.1.100:4489
    xfreerdp /u:JohnDoe /p:Pwd123! /vmconnect:C824F53E-95D2-46C6-9A18-23A5BB403532 /v:192.168.1.100


Clipboard Redirection: +clipboard


Drive Redirection: /drive:home,/home/user
Smartcard Redirection: /smartcard:<device>
Printer Redirection: /printer:<device>,<driver>
Serial Port Redirection: /serial:<device>
Parallel Port Redirection: /parallel:<device>
Printer Redirection: /printer:<device>,<driver>


Audio Output Redirection: /sound:sys:alsa
Audio Input Redirection: /microphone:sys:alsa


Multimedia Redirection: /multimedia:sys:alsa
USB Device Redirection: /usb:id,dev:054c:0268


More documentation is coming, in the meantime consult source files
类似的程序
 
rdesktop -r disk:share=/tmp/dir -P ip

编辑:航网科技   来源:腾讯云

本文版权归原作者所有 转载请注明出处

联系我们

0755-36300002

深圳市龙华区和平路龙胜商业大厦5楼B5区

资质证书

  • Copyright © 2011-2020 www.hangw.com. All Rights Reserved 深圳航网科技有限公司 版权所有 增值电信业务经营许可证:粤B2-20201122 - 粤ICP备14085080号

    在线客服

    微信扫一扫咨询客服


    全国免费服务热线
    0755-36300002

    返回顶部