Wednesday, July 11, 2007

XPS Reader for Linux

A friend sent me a document with XPS extension. Turned out it's the new Microsoft XML format, which functions similar to PDF. The problem is that I can only use Internet Explorer to open it, since Microsoft have not provided stand alone XPS reader that runs on Linux. Well, I have it in my VMware server, so I created the following script to be able to open XPS document simply by clicking it from Linux (or right click and select "ie") :

ie :

#!/bin/bash

#fullscreen only
echo rdesktop -D -K -g 1024x768 -a 16 -S 18 -s "'"C:\\Program Files\\Internet Explorer\\iexplore.exe \"$@\""'" thartono-wxp:3389 -u thartono -p xxxxxx >~/Desktop/rdesktop.cmd.txt

cat ~/Desktop/rdesktop.cmd.txt | sed "s_/_\\\_g" | sed " s_\\\home\\\thartono\\\data\\\customers_z:\\\customers_g " | sed s_\\\home\\\thartono\\\data\\\products_z:\\\products_g " | sed "s_\\\home\\\thartono\\\data\\\shared_z:_g " |sh

rm ~/Desktop/rdesktop.cmd.txt

No comments: