WineHQ and file association

28 Dec

I need to read .pdb files. Which the MS Windows have better software to do so than Linux.

The software I am using is a portable one, which mean no installation required. Which turns out it is quite a problem for me. Since no installation, then no file association in any graphical file manager interface.

The solution is to create a mini shell script file to start the application from wine, before associate the .pdb file to the script

#one of the WineHQ script
LANG=zh_TW.UTF-8 wine "/your_path/your_program.exe" "Z:"$@

The most important bit is “Z:”$@. When you double click a file in a file manager, the file manager will pass the file address to your script as argument and replace $@.
Then your script will combine Z: with the file address to tell WineHQ the file is locate is locate in Z drive, which Z drive is the / (root directory). Otherwise WineHQ will try to open the file in C: drive, which is not there at all.

Next your just need to associate the .pdb to your script file, so when you double click all .pdb file, the script will open it correctly.

Leave a comment

Posted by on December 28, 2012 in Linux, Wine


Tags: , , , , , ,

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: