Wine allows users to run Windows programs natively under Linux without paying a dime. However, there's a tiny problem: programs running in Wine don't look so great. They don't even try to fit into your native GNOME or KDE color scheme or use your preferred fonts. You could use a Windows theme, but themes make Wine run extremely slowly. Luckily, with a little configuration editing, it's easy to make Wine applications look at lot more like the rest of the apps on your desktop.
Integrating into GNOME
To integrate Wine applications with a GNOME desktop, first run the winecfg utility and switch to the Desktop Integration tab. Separately, open the GNOME Appearance program under System -> Preferences, click the Customize button, and click on the Colors tab, then click on an element (e.g. Windows) to pop up GNOME's color picker. Switch back to winecfg and click an appropriate item (e.g. Active Title Bar). Click the Color next to it to open up another color picker, and click the Add to Custom Colors button. Finally, copy and paste the RGB values from the GNOME color picker into the corresponding values in the winecfg color picker.
GNOME and Wine sometimes use different terminology to refer to the same items:
|Selected Items (background)||Active Title Bar|
|Selected Items (text)||Active Title Text|
|Windows (background)||Controls Background|
|Windows (text)||Controls Text|
|Windows (background)||Inactive Title Bar|
|Windows (background)||Menu Background|
|Windows (text)||Menu Text|
|Selected items (background)||Scrollbar|
|Selected items (background)||Selection Background|
|Selected items (text)||Selection Text|
|Tooltips (background)||ToolTips Background|
|Tooltips (text)||ToolTips Text|
Unfortunately, many themes (Ubuntu's Human Theme for example) won't let you change their color schemes. If that's the case, you'll have to do some guesswork (or edit the theme file, which is a laborious task). Use a color picker -- gcolor2, found in most repositories, is my favorite -- and click on title bars, windows, and other elements and read the color values from them. Although not the most accurate way, it will give you a close approximation.
Finally, to make Wine's fonts to look like GNOME's, switch to the Fonts tab in the Appearance program and change all the fonts in winecfg to match GNOME's fonts. If Wine is missing some fonts you use, you'll have to comprimise and use similar fonts such as MS Sans Serif or Free Serif.
Integrating into KDE
Integrating Wine into KDE works about the same way as integrating it with GNOME. As before, start by opening winecfg and switching to the Desktop Integration tab. Open up KControl (or System Settings) and open Colors (under Appearance). You'll want to click on an element in the theme (e.g. Active Titlebar) and then click on the color that appears in a dialog next to it (see the figure). A color picker will pop up. Switch back to winecfg, click the corresponding item (e.g. Active Title Bar), click the Color next to it to open up another color picker, then click the Add to Custom Colors button. Copy and paste the RGB values from the KControl color picker into the corresponding values in the winecfg color picker. Repeat until every element is covered.
Below is a table of element names in KControl and Wine:
|Active Title Bar||Active Title Bar|
|Active Title Text||Active Title Text|
|Inactive Title Bar||Inactive Title Bar|
|Inactive Title Text||Inactive Title Text|
|Windows Background||Menu Background|
|Window Text||Menu Text|
|Standard Background||Window Background|
|Standard Text||Window Text|
|Selected Background||Selection Background|
Now you can change Wine's fonts to look like KDE's. For this, open up the Fonts module under KControl (or System Settings) and customize all the fonts under winecfg to match KDE's fonts. As with GNOME, if Wine is missing certain fonts, you'll have to comprimise and use similar fonts.
Sure, the GTK+ widgets are still ugly, and you'll never (at least, for now) get Wine apps to look exactly like GNOME or KDE apps. But with these techniques you can make Wine programs look a lot more like GNOME or KDE apps -- and a lot less ugly into the bargain.