FreeRDP/client/X11/man/xfreerdp-examples.1.xml

142 lines
5.3 KiB
XML

<refsect1>
<title>Examples</title>
<variablelist>
<varlistentry>
<programlisting><![CDATA[
#!/bin/bash
# we got a key combination
if [ "$1" = "key" ];
then
# we only got one argument 'key'
# list all supported combinations with echo
if [ $# -eq 1 ];
then
echo "ctrl+alt+f1"
echo "ctrl+alt+f2"
else
# We want the action for a single combination
# use 'key-local' to not forward to RDP session
if [ "$2" = "ctrl+alt+f1" ];
then
echo "key-local"
fi
if [ "$2" = "ctrl+alt+f2" ];
then
echo "/usr/local/bin/somescript.sh"
fi
fi
fi
if [ "$1" = "xevent" ];
then
if [ $# -eq 1 ];
then
echo "FocusIn"
echo "SelectionClear"
else
if [ "$2" = "SelectionNotify" ];
then
echo "/usr/local/bin/someprogram"
fi
fi
fi
]]></programlisting>
<listitem>
<para>Example action script for key events, listing <replaceable>ctrl+alt+f1</replaceable> to be handled by local window manager and <replaceable>ctrl+alt+f2</replaceable> executing a script</para>
<para>The return value of the program determines if the key is handled locally or remotely (0 for local, &gt; 0 for remote, &lt; 0 for errors)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>xfreerdp connection.rdp /p:Pwd123! /f</command></term>
<listitem>
<para>Connect in fullscreen mode using a stored configuration <replaceable>connection.rdp</replaceable> and the password <replaceable>Pwd123!</replaceable></para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>xfreerdp /u:USER /size:50%h /v:rdp.contoso.com</command></term>
<listitem>
<para>Connect to host <replaceable>rdp.contoso.com</replaceable> with user <replaceable>USER</replaceable> and a size of <replaceable>50 percent of the height</replaceable>. If width (w) is set instead of height (h) like /size:50%w. 50 percent of the width is used.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>xfreerdp /u:CONTOSO\\JohnDoe /p:Pwd123! /v:rdp.contoso.com</command></term>
<listitem>
<para>Connect to host <replaceable>rdp.contoso.com</replaceable> with user <replaceable>CONTOSO\\JohnDoe</replaceable> and password <replaceable>Pwd123!</replaceable></para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>xfreerdp /u:JohnDoe /p:Pwd123! /w:1366 /h:768 /v:192.168.1.100:4489</command></term>
<listitem>
<para>Connect to host <replaceable>192.168.1.100</replaceable> on port <replaceable>4489</replaceable> with user <replaceable>JohnDoe</replaceable>, password <replaceable>Pwd123!</replaceable>. The screen width is set to <replaceable>1366</replaceable> and the height to <replaceable>768</replaceable></para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>xfreerdp /u:JohnDoe /p:Pwd123! /vmconnect:C824F53E-95D2-46C6-9A18-23A5BB403532 /v:192.168.1.100</command></term>
<listitem>
<para>Establish a connection to host <replaceable>192.168.1.100</replaceable> with user <replaceable>JohnDoe</replaceable>, password <replaceable>Pwd123!</replaceable> and connect to Hyper-V console (use port 2179, disable negotiation) with VMID <replaceable>C824F53E-95D2-46C6-9A18-23A5BB403532</replaceable></para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>+clipboard</command></term>
<listitem>
<para>Activate clipboard redirection</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>/drive:home,/home/user</command></term>
<listitem>
<para>Activate drive redirection of <replaceable>/home/user</replaceable> as home drive</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>/smartcard:&lt;device&gt;</command></term>
<listitem>
<para>Activate smartcard redirection for device <replaceable>device</replaceable></para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>/printer:&lt;device&gt;,&lt;driver&gt;</command></term>
<listitem>
<para>Activate printer redirection for printer <replaceable>device</replaceable> using driver <replaceable>driver</replaceable></para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>/serial:&lt;device&gt;</command></term>
<listitem>
<para>Activate serial port redirection for port <replaceable>device</replaceable></para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>/parallel:&lt;device&gt;</command></term>
<listitem>
<para>Activate parallel port redirection for port <replaceable>device</replaceable></para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>/sound:sys:alsa</command></term>
<listitem>
<para>Activate audio output redirection using device <replaceable>sys:alsa</replaceable></para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>/microphone:sys:alsa</command></term>
<listitem>
<para>Activate audio input redirection using device <replaceable>sys:alsa</replaceable></para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>/multimedia:sys:alsa</command></term>
<listitem>
<para>Activate multimedia redirection using device <replaceable>sys:alsa</replaceable></para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>/usb:id,dev:054c:0268</command></term>
<listitem>
<para>Activate USB device redirection for the device identified by <replaceable>054c:0268</replaceable></para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>