Years later, I've made a small utility that scans MIME database (both system and user) and register all known native mime-types in Windows registry.
It uses xdg-open
to open a file if there is a default (native) application for that
mime type, otherwise uses packagekit
to search for a package that can handle
that file (just like what Nautilus does). So my initial requirement of registering only extensions that have an installed, native application was not needed anymore. However, an early version of the script did filter only such types. The snippet that made it possible was:
perl -e '
use strict; use warnings;
use File::MimeInfo::Magic; use File::MimeInfo::Applications;
while (my $line = <STDIN>) {
chomp($line);
my ($ext, $mime) = (split/\t/, $line);
my ($def, @apps) = mime_applications_all($mime);
print "$line\n" if ($def || @apps)
}'
By default my script only registers native types that have no handler in windows
registry, but it can also override such associations (so, for example, jpeg
files are opened in native viewer instead of the default Gecko wine browser).
It can also ignore some extensions even if they have no handler in windows.
It tries its best to be winemenubuilder-friendly, meaning all associations it
creates is not published as native associations (or as x-wine-extension
mimetypes) by winemenubuilder, which would be ugly and potentially cause loops.
This is very tricky and not yet perfect, specially with mixed-case extensions
(.C and .c for example)
That said, I hope this script is helful for everyone:
https://github.com/MestreLion/wine-tools/blob/master/wine-import-extensions
Improvements welcome!
In those two samples it looks like the font rendering algorithm is the same, one is just much darker than the other (and the darker one looks, to me, better).
This would be font smoothing "gamma" - gamma controlling how light/dark the partially lit pixels are adjusted.
Both the two following articles recommending setting font smoothing in Wine using regedit (yes, Wine maintains a Windows-style registry and has its own regedit.exe).
Run regedit.exe and adjust the following keys in [HKEY_CURRENT_USER\Control Panel\Desktop] to these values:
"FontSmoothing"="2"
"FontSmoothingType"=dword:00000002
"FontSmoothingGamma"=dword:00000578
"FontSmoothingOrientation"=dword:00000001
Articles:
Best Answer
wine regedit
xdg-open,firefox,konqueror,mozilla,netscape,galeon,opera,dillo
regedit
wine regedit
C:\windows\system32\winebrowser.exe -nohome "%1"
regedit
Summary
Here, we are setting
xdg-open
to be the first Browser, and then changing the behaviour of command by adding"%1"
as an argument. Be sure to perform step #2 for bothhttp
andhttps
to support both protocols, as mentioned in comments below.