[TriLUG] Connecting to Remote PC

Dewey Hylton plug at hyltown.com
Thu Dec 19 15:27:35 EST 2013


> From: "Ron Kelley" <rkelleyrtp at gmail.com>
> To: "Triangle Linux Users Group General Discussion" <trilug at trilug.org>
> Sent: Thursday, December 19, 2013 9:43:17 AM
> Subject: Re: [TriLUG] Connecting to Remote PC
> 
> Another option - from your linux box run "rdesktop" with the drive
> redirection option.  This way, you can map your local Linux directory
> as a
> disk on the XP machine.

this is exactly what i do. in fact, i call rdesktop via a wrapper script so this is always available. i create a directory called shared in my home directory (~/shared) ... everything i want to share with a remote windows box gets stuffed there. anything i want to copy from a windows box lands there. this directory shows up on the windows box as "shared on linuxbox" and i simply copy stuff to/from there using windows explorer.

here is my wrapper, which shows a few other things in addition to the drive mapping:

%-=

#!/bin/sh
rdesktop -0 -r clipboard:PRIMARYCLIPBOARD -r disk:shared=/usr/home/dewey/shared $@

%-=

i saved this file as ~/bin/rd ... i used it like this:

    rd somewindowsbox


for extra credit, you can make things even easier on yourself ... if you trust storing plain-text credentials on your system in your home directory, you can create a file that looks like this:

    username=mywindowsusername
    password=reallygoodpassword

let's pretend this file is located at ~/.smb/mywindowsdomain ... then i'd amend my "rd" wrapper script to look more like this:


%-=

#!/bin/sh

MYDOMAIN=mywindowsdomain
CREDFILE=~/.smb/${MYDOMAIN}
USERNAME=`awk -F= '/username/ {print $2}' ${CREDFILE}`
PASSWORD=`awk -F= '/password/ {print $2}' ${CREDFILE}`
SHAREDIR=/home/myuser/shared

rdesktop -5 -K -g 1276x1006 -a 16 \
  -d ${DOMAIN}                    \
  -u ${USERNAME}                  \
  -p ${PASSWORD}                  \
  -r clipboard:PRIMARYCLIPBOARD   \
  -r disk:shared=${SHAREDIR}      \
  -r sound:local $@

%-=

if you are not performing domain logins, you can dispense with the "-d" line ... and i'll leave it up to you to look up the extra options to rdesktop. but definitely check out the redirection options; i'm showing three: clipboard, disk, and sound. it all works nicely for me.


More information about the TriLUG mailing list