美文网首页
bitbar调用rdesktop进行远程连接

bitbar调用rdesktop进行远程连接

作者: 坚慧 | 来源:发表于2017-06-18 16:43 被阅读30次

    很多时候,rdesktop缺乏一个好用的远程管理连接,不用每次输入ip地址、密码,bitbar正好满足了这个需求。

    image.png

    ~/Documents/rdesktop.txt样式如下:

    Host JSWP风力发电网  rdesktop -g 1024x768 -u administrator -p mypassword -r clipboard:CLIPBOARD   210.2.2.2
    

    bitbar调用rdesktop进行远程连接

    #!/usr/bin/env bash
    #
    # Quickly rdesktop to your favorite hosts
    # The list of hosts are extracted from ~/Documents/rdesktop.txt
    #
    # <bitbar.title>rdesktop</bitbar.title>
    # <bitbar.version>v1.0</bitbar.version>
    # <bitbar.author>Jianhui</bitbar.author>
    # <bitbar.author.github>zhangyc</bitbar.author.github>
    # <bitbar.desc>Quickly rdesktop to your favorite hosts listed in your ~/Documents/rdesktop.txt file</bitbar.desc>
    #
    
    echo "微软远程"
    echo "---"
    awk '/^Host / && !/\*/ {print " echo \"rdesktop -g 1024x768 -r clipboard:CLIPBOARD -u administrator  -p  "$9,$12" \">/tmp/rdesktop_"$12  }' ~/Documents/rdesktop.txt | bash
    chmod +x /tmp/rdesktop_*
    
    awk '/^Host / && !/\*/ {print $2" | bash=/tmp/rdesktop_"$12" | terminal=true | refresh=true" }' ~/Documents/rdesktop.txt
    

    相关文章

      网友评论

          本文标题:bitbar调用rdesktop进行远程连接

          本文链接:https://www.haomeiwen.com/subject/deziqxtx.html