Ubuntu – Open file using custom command: how to specify the file in cmd line

command linepdfwine

I want to open PDF using PDF-XChange Viewer through WINE. How should I specify the pdf file name in the "custom command" line so that I can open a PDF file using PDF-XChange Viewer by double clicking it? I tried to use the \"z:%f\" following the suggestion here for using Foxit reader. But my PDF-XChange Viewer only starts with an empty window.

wine "c:/Program Files/Tracker Software/PDF Viewer/PDFXCview.exe" \"z:%f\"

I use Ubuntu 10.04 and WINE 1.2.2. PDF-XChange Viewer version 2.5.

Best Answer

Found blog entries about the same problem for Foxit reader and for PDF-XChange Viewer. None of them worked for me. So I edited them and got one tailored for my case:

wine "C:\Program Files\Tracker Software\PDF Viewer\PDFXCview.exe" $Filename

Save this bash script and open pdf using this script. Now double click pdf files will open them using PDF-XChange Viewer.