I had a similar problem, but I did not want anything that needs a writable disk (burnable to CD). So I repackaged TinyCore. To keep my changes separate from the original files, I did not modify the original files, but created a script that will patch the original files.
Another advantage of this approach is that I added a boot option for this. So I can boot the unmodified version or a patched version.
A script that will patch ".xsession" may look like this. I'm no sed expert, maybe there are better ways to do this. But it works.
#!/bin/sh
sed -i '
/"$DESKTOP"/ i if [ -s /etc/sysconfig/rdesktop ]; then
/"$DESKTOP"/ i XIT=1
/"$DESKTOP"/ i while [ $XIT -gt 0 ]; do
/"$DESKTOP"/ i /usr/local/bin/startrdesktop
/"$DESKTOP"/ i /usr/local/bin/exittc_a;
/"$DESKTOP"/ i XIT=$?;
/"$DESKTOP"/ i done
/"$DESKTOP"/ i fi
' /home/"$USER"/.xsession
It starts a RDP client. If the RDP client terminates a modified version of "exittc" will ask the user, if he likes to shutdown or restart the RDP client.