远程桌面软件rdesktop

远程windows一直是在使用rdesktop这个软件,比较轻量易用,命令行启动,功能基本足够。发个贴灌个水 :sweat_smile:
安装:
sudo apt install rdesktop

使用命令参考:
rdesktop -f 192.168.0.2 // 参数-f 全屏,ctl+alt+enter退出全屏
也可根据需求使用一些特定参数,有些参数比较长,我在.bash_alias增加了几个常用的适合自己的别名:

alias rdt='rdesktop -g1920x990 -0 -a24 '
alias rto='rdt -rclipboard:PRIMARYCLIPBOARD -rsound:local '
alias rtowdsk='rto -rdisk:HomeDsk=/home -rdisk:AllDsk=/media '
alias rtoadmin=' rtowdsk -uadministrator '

alias rto1314='rdt -uuser14 11.12.13.14:63389 -pxxxxxxxx &'
alias rto1317='rtoadmin -u 11.12.13.17:53389 -pxxxxxxxx &'

具体命令参考可查看命令帮助或baidu :)

$rdesktop 
rdesktop: A Remote Desktop Protocol client.
Version 1.8.3. Copyright (C) 1999-2011 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 remotly
   -c: working directory
   -p: password (- to prompt)
   -n: client hostname
   -k: keyboard layout on server (en-us, de, sv, etc.)
   -g: desktop geometry (WxH)
   -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
   -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
   -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 syncronization
   -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 Linux/Unix enviroment
                   "AKS ifdh 0"       -> Device shown in Windows enviroment 
          example: -r scard:"eToken PRO 00 00"="AKS ifdh 0;AKS"
                   "eToken PRO 00 00" -> Device in Linux/Unix enviroment
                   "AKS ifdh 0"       -> Device shown in Windows enviroment 
                   "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 usally the username
           sc-reader-name     Smartcard reader name to use
           sc-card-name       Specifies the card name of the smartcard to use

1 个赞

更习惯用TeamViewer,无人值守访问的功能比较方便 :joy:

1 个赞

之前TV在64位的parrot上没能装起来 :disappointed_relieved:
后来就习惯内网之间到WIN就选用远程桌面,到LINUX就SSH命令行+需要时X转发了。

适合的分辨率以及最常用的连接,做了段脚本放到系统bin目录:

┌─[usr@pc]─[~/path]
└──╼ $which rdsktp 
/bin/rdsktp
┌─[usr@pc]─[~/path]
└──╼ $cat  ` which rdsktp `
#! /bin/bash

case "$1" in
  name1)
	rdesktop -g1920x990 -0 -a24 -rclipboard:PRIMARYCLIPBOARD -rsound:local 192.168.0.6 -uadministrator -pxxxxxx &
	;;
  name2)
	rdesktop -g1920x990 -0 -a24 -rclipboard:PRIMARYCLIPBOARD -rsound:local 192.168.0.7 -uuser -pxxxxxx &
	;;
  env|name3)
	rdesktop -g1920x990 -0 -a24 -rclipboard:PRIMARYCLIPBOARD -rsound:local 192.168.0.5 -uadministrator -pxxxxxx &
	;;

  dname1)
	rdesktop -g1920x990 -0 -a24 -rclipboard:PRIMARYCLIPBOARD -rsound:local -rdisk:HomeDsk=/home -rdisk:AllDsk=/media 192.168.0.6 -uadministrator -pxxxxxx &
	;;
  dname2)
	rdesktop -g1920x990 -0 -a24 -rclipboard:PRIMARYCLIPBOARD -rsound:local -rdisk:HomeDsk=/home -rdisk:AllDsk=/media 192.168.0.7 -uuser -pxxxxxx &
	;;
  denv|dname3)
	rdesktop -g1920x990 -0 -a24 -rclipboard:PRIMARYCLIPBOARD -rsound:local -rdisk:HomeDsk=/home -rdisk:AllDsk=/media 192.168.0.5 -uadministrator -pxxxxxx &
	;;
  *)
	echo "Parameter No Found! "
esac

然后运行的时候在RUN启动器里面直接调用简单的参数,启动器会记住最近几个执行过的命令,也很方便

Selection_112

1 个赞

服务器资源由ZeptoVM赞助

Partners Wiki Discord