I installed Wine
on an Ubuntu Linux
system to be able to run Microsoft Windows applications on it. I
installed Sumatra
PDF to view PDF and
EPUB files. When
I double-clicked on EPUB files in the Wine
File Explorer
window, which you can run by issuing the command wine explorer
in a Terminal
window, or wine explorer &, if you wish to open it and
immediately return to the
shell prompt,
I saw an Error window which stated "There is no Windows program
configured to open this type of file." If I double-clicked on a PDF file,
it would open in the
GNOME Document Viewer
application. I was able to set the default application for opening those
files under Wine with the following steps:
-
From the Bash prompt in a Terminal window, run the Wine
registry
editor program to modify the
Windows
Registry with
wine regedit. -
Navigate to
HKEY_CLASSES_ROOT\.epuband set(Default) = epubfile. If you don't see a.epubentry, right-click on HKEY_CLASSES_ROOT and choose New. You can press the F5 key or choose View and Refresh to refresh the display to show the new entry in alphabetical order. -
If you then click on the
.epubentry, you will see(Default)under Name,REG_SZunder Type, and(value not set)under Data. -
Double-click on the entry and then type
epubfilein the Value data field and then click on OK. -
Then navigate to
HKEY_CLASSES_ROOT\epubfile\shell\open\command, if it exists. If there is no epubfile entry you can create one by right-clicking onHKEY_CLASSES_ROOTand selecting New and Key giving the new key a name ofepubfile. Then double-click on the (Default) entry under the new key and typeEPUB Documentin the Value data field. Then right-click on theepubfilekey and choose New and Key and typeshellfor the name. Right-click on shell and create a new,openbeneath it. Then right-click on open and create a new key,commandbeneath open. - Then right click on the command key and choose New then String Value.
-
Double-click on the new (Default) entry under command
and then type the location and file name for the application that you
wish to use to open .epub files within double quotes followed by a space
and then
"%1", e.g."C:\Program Files\SumatraPDF\SumatraPDF.exe" "%1", if you wish to open the files with Sumatra PDF and you installed it so that it is accessible to all users of the system. Or use"C:\users\username\AppData\Local\SumatraPDF\SumatraPDF.exe " "%1", where username is the relevant username, if you chose to install it just for the current user when you installed it.
[ More Info ]
