This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Feature: Desktop Software

Give Wine apps the look and feel of GNOME or KDE

By Andrew Min on January 10, 2008 (4:00:00 PM)

Share    Print    Comments   

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:

GNOME and Wine window terminology
GNOME Wine
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:

KDE and Wine window terminology
KDE 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 Scrollbar
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.

Share    Print    Comments   

Comments

on Give Wine apps the look and feel of GNOME or KDE

Note: Comments are owned by the poster. We are not responsible for their content.

Give Wine apps the look and feel of GNOME or KDE

Posted by: Anonymous [ip: 68.2.79.226] on January 10, 2008 05:35 PM
Hmm.. The next step is automatic one step integration between the two.

Tom

#

Re: Give Wine apps the look and feel of GNOME or KDE

Posted by: Anonymous [ip: 192.168.100.2] on January 10, 2008 06:22 PM
Gimme 1 hour , and Ill update my script which does this all automatically!

I just needed the Name-Convention shoed in this article :) Thanks to ths author !!!

Do you wanna test ?!?!?!

#

Give Wine apps the look and feel of GNOME or KDE

Posted by: Anonymous [ip: 205.238.250.166] on January 10, 2008 05:55 PM
Yeah - I don't know if I care enough to do all that...One step integration I'd do though.

#

Give Wine apps the look and feel of GNOME or KDE

Posted by: Anonymous [ip: 63.238.104.170] on January 10, 2008 06:18 PM
NO NO NO ...This is WRONG! Port applications to Linux. Do not foster the illusion that it is in any way appropriate to _make do_ with Microsoft apps in a Linux environment.

#

Re: Give Wine apps the look and feel of GNOME or KDE

Posted by: Anonymous [ip: 129.33.1.37] on January 14, 2008 06:04 PM
Sure, and just *WHERE* are you going to get the source code for those apps that don't have FLOSS equivalents? Let's see, why don't *YOU* call H&RBlock or Intuit and ask for the source code for their tax applications? (And NO, I'm not interested in relying on the Online-Only filing versions, so don't even mention those). There are some apps that are a *long* way from being developed as open-source, and other apps that just don't have the right userbase for a FLOSS project to even start.

So for some time to come, there will be the need to run Windows apps under Wine. So why not at least make them less ugly? (Personally, I'd rather see Wine plug-ins that handle the theming for various desktop environments)

#

Give Wine apps the look and feel of GNOME or KDE

Posted by: Anonymous [ip: 172.200.46.133] on January 10, 2008 06:43 PM
umm..... I'm confused? what apps WOULD you need from WinS*** anyway, as a long term user of Linux, if Linux ain't got it I don't NEED it, (Windows has run this theory all it's distributing life.....)

#

Re: Give Wine apps the look and feel of GNOME or KDE

Posted by: Anonymous [ip: 129.33.49.251] on January 10, 2008 06:54 PM
Internet Explorer 6. While I do not need it for my day to day tasks, it saves misery when a luser reports that a web page does not display properly under Windows.
Lotus Notes 7 if your site hasn't upgraded to Notes 8 yet.

#

Re: Give Wine apps the look and feel of GNOME or KDE

Posted by: Anonymous [ip: 82.197.120.78] on January 10, 2008 10:18 PM
apps that I NEED: Photoshop, Rosetta Stone and some poker room clients. And all of them run just fine or close to it with wine :)

#

Re: Give Wine apps the look and feel of GNOME or KDE

Posted by: Anonymous [ip: 209.217.118.25] on January 15, 2008 03:54 PM
Radio Mobile Deluxe. Of course, if you're not in the radio industry, you wouldn't need this.

#

"if Linux ain't got it I don't NEED it"

Posted by: Anonymous [ip: 169.233.25.12] on January 10, 2008 07:36 PM
really? you are confused. there's this term, you know, "other people."

#

Give Wine apps the look and feel of GNOME or KDE

Posted by: Anonymous [ip: 149.31.144.58] on January 10, 2008 07:42 PM
A really nice color picker for this task, especially for keeping track of a palette of colors, is agave. It's in most repositories, too.

#

Give Wine apps the look and feel of GNOME or KDE

Posted by: Anonymous [ip: 203.177.187.179] on January 10, 2008 10:26 PM
I don't understand. I need only one program that is not available in Linux. I use WINE for that and it has always come up looking exactly the same as my other KDE apps without doing anything except adding the exec file to wineconfig.

#

without paying a dime?

Posted by: Anonymous [ip: 192.168.111.125] on January 11, 2008 01:58 AM
So, if you're running wine, the stores will just give you the programs for free? If not, what are you trying to say?

#

Re: without paying a dime?

Posted by: Anonymous [ip: 82.231.202.249] on January 16, 2008 08:02 AM
Clearly, the author means "without paying the m$ tax, as he would if he used m$ so-called O.S. which is supposed to run these programs".

A lot of free software (as in speech or beer) exists for Window that can be used in wine too. In these case, you can pay no dime at all.

#

Give Wine apps the look and feel of GNOME or KDE

Posted by: Anonymous [ip: 24.80.34.124] on January 11, 2008 06:14 PM
Nice little tutorial. I hate the way wine apps look like Win98. I use ies4linux regularly to check my web sites and blogs. It's a great way to make sure they render properly without having to use that shitty OS.

#

Dialog fonts

Posted by: Anonymous [ip: 86.49.90.38] on January 12, 2008 01:41 PM
I changed all fonts to Dejavu Sans, but fonts in dialogs (including winecfg itself) are still the same - too small and without anti-aliasing. How can I change these?

#

Re: Dialog fonts

Posted by: Anonymous [ip: 77.0.182.46] on January 13, 2008 03:31 AM
If your fonts are too tiny for your screen, you can alter the registry.
wine ~/.wherever/dotwine/fake_windows/Windows/regedit.exe

Edit the key "HKEY_CURRENT_CONFIG\Software\Fonts" and alter the entry "LogPixels" to e.g. "96" (decimal). This is the value in dpi (dots per inch).
If the key is not there, import the following lines.
[HKEY_CURRENT_CONFIG\Software\Fonts]
"LogPixels"="96"

I searched for years to find this ;)

#

Re: Dialog fonts - addendum a

Posted by: Anonymous [ip: 77.0.182.46] on January 13, 2008 03:33 AM
wine ~/.cxoffice/dotwine/fake_windows/Windows/regedit.exe

#

Re: Dialog fonts - addendum b

Posted by: Anonymous [ip: 77.0.182.46] on January 13, 2008 03:34 AM
[HKEY_CURRENT_CONFIG\Software\Fonts]

"LogPixels"="96"

#

Dialog fonts

Posted by: Anonymous [ip: 86.49.90.38] on January 13, 2008 04:59 PM
Thanks, this really changed the font size, but how do I change the font itself?

#

Give Wine apps the look and feel of GNOME or KDE

Posted by: Anonymous [ip: 209.217.118.25] on January 15, 2008 03:57 PM
How would I do the same for Xcfe, Enlightenment, and JWM?

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya