zoukankan      html  css  js  c++  java
  • 使用freerdp远程连接Windows桌面(转载)

    使用freerdp远程连接Windows桌面

    之前使用的是rdesktop,但是由于其不支持NLA认证,便不能登录公司的电脑。为此,现在使用freerdp——这是package的名字,实际的可执行程序是xfreerdp。使用如下的命令行即可实现远程桌面:

    xfreerdp -u user_name -d domain_name -a 32 -g 1920x1030 -x 0 --fonts --sec nla ip_address

    参数解释如下:

    1. -u:用户名

    2. -d:域名

    3. -a:使用32位颜色

    4. -g:窗口大小

    5. -x 0:使用LAN模式获得最好的体验。

    6. --fonts:打开antialias功能。

    7. -sec:指定使用的协议NLA

    在由家中台式机连接至公司电脑时,两台电脑上的鼠标键与键盘设置不完全一样,会出现一定的问题。具体情况是:

    1. 家中台式机(基于xmodmap

      1. 鼠标键:使用右手鼠标,即鼠标左右键不交换。

      2. 键盘:Caps Lock与左Ctrl键交换。

    2. 公司电脑(基于AutoHotkey

      1. 鼠标键:使用左手鼠标,鼠标左右键交换。

      2. 键盘:Caps Lock与左Ctrl键交换。

    基于上述情况,若不作任何处理,直接由家中电脑连接至公司电脑操作时,鼠标会被变成左手的操作习惯,键盘则会由于执行了两次Caps Lock与Ctrl交换回到默认键位,导致操作Emacs极为不便。为解决此问题,可以写一个脚本程序,在启动xfreerdp之前,执行xmodmap交换一次Caps Lock与Ctrl,将鼠标设为左手习惯;退出xfreerdp后,再执行xmodmap交换Caps Lock与Ctrl,将鼠标设为右手习惯。

    上述第一次执行xmodmap所需的配置文件为:

    复制代码
    ! Restore the default caps lock and left control
    remove Lock = Caps_Lock
    remove Control = Control_L
    keysym Control_L = Caps_Lock
    keysym Caps_Lock = Control_L
    add Lock = Caps_Lock
    add Control = Control_L
    
    ! Swap mouse button
    pointer = 3 2 1
    复制代码

    上述第二次执行xmodmap所需的配置文件为:

    复制代码
    ! Swap Caps_Lock and Control_L
    remove Lock = Caps_Lock
    remove Control = Control_L
    keysym Control_L = Caps_Lock
    keysym Caps_Lock = Control_L
    add Lock = Caps_Lock
    add Control = Control_L
    
    ! Swap mouse button
    pointer = 1 2 3
  • 相关阅读:
    JavaScript
    94.Binary Tree Inorder Traversal
    144.Binary Tree Preorder Traversal
    106.Construct Binary Tree from Inorder and Postorder Traversal
    105.Construct Binary Tree from Preorder and Inorder Traversal
    90.Subsets II
    78.Subsets
    83.Merge Sorted Array
    80.Remove Duplicates from Sorted Array II
    79.Word Search
  • 原文地址:https://www.cnblogs.com/pipci/p/10076081.html
Copyright © 2011-2022 走看看