How I am organizing my remote desktop connections
I’ve been using freerdp for a while - the command line specifically.
It is quite verbose, however, to keep passing all the necessary arguments when calling freerdp, so a pretty common approach is to put all that in a script file and call it instead. But now, to avoid storing passwords in clear text in that file, you have to prompt for it in the beginning of the script. The next step, as I had to connect to different machines, is to duplicate that script. Then you release the pain of changing common parameters, like using multi-monitor and whatnot - then you have now a common script to store common stuff. After while, you are tired of typing passwords to connect all the time, and decides to throw a call to gnome keyring in that script. And, you see where this goes.
I ended up deciding to rewrite that script from scratch so I could provide the RDP configuration in a separate file instead of embedded on the script and (hopefully) property use the gnome keyring. I called this script crdp for lack of creativity (c standing for commandline). I published it on github here https://github.com/andreesteve/crdp.
In short, you configure the connections in INI-like file:
[general]
use-keyring=1
rdpclient=xfreerdp
rdpclient_password_switch=p
rdpclient_hostname_switch=v
rdpclient_switch_prefix=/
rdpclient_switch_postfix=:
additional_args=/f /sound:sys:alsa,format:1,quality:high /microphone:sys:alsa,format:1,quality:high
[office]
hostname=office.example.com
_u=andre-office
_d=mydomain
_gp=$password
_g:mygateway.example.com
_gu=andre
And then you can connect to it by running:
crdp connect office
without having to type your password (after you enter it at least once), if you enable the use of keyring.