Wine integration in Nautilus

13Oct09

As very few people apart from Scott Ritchie probably know, I’ve been working on integrating Wine more closely with Gnome for a few months now, and though I’ve had a break from the development for some time, I managed to finally create a little more for the project today.

More specifically, I made the first version of the integration of Wine’s preferences into Nautilus.

So far, this is what’s possible:
Right click on an EXE file
And you can directly set how Wine opens this program

Now, Wine also has options for setting some options for DirectSound emulation and library (DLL) overrides for a specific program, and while I intend to add support for library overrides, I don’t think I’ll include the options for setting DirectSound emulation levels. The reasons for this are that, first of all, the options would take up a lot of space visually and make the usually small properties dialog huge, but more importantly, I’ve never seen any howto, guide or anything where a program would work better after toggling DirectSound emulation or changing the bit depth of the audio, so I’m assuming that those options are pretty safe to exclude.

If you want this on your own system, this is what you have to do (this will be much easier soon as Scott is in the process of packaging this stuff up for Ubuntu):

We’ll be needing two things: My Wine library for Python and the properties file for Nautilus and we’ll be getting both from bzr, so if you don’t have bzr installed you should do a sudo aptitude install bzr (if you are on Ubuntu or another Debian based system) before doing the next steps.

First, let’s get all the files from the bzr project:
bzr branch lp:~ubuntu-wine/+junk/wine-helper

Next, we’ll install the Wine library for Python (UPDATE: There’s a debian package further down the page, if you prefer that route):
sudo cp -R wine-helper/wine /usr/lib/python2.6/wine

And finally we’ll install the Wine properties page for Nautilus:
sudo cp wine-helper/wine-property-page.py /usr/lib/nautilus/extensions-2.0/python/

Now everything is installed and you can either log out and in again or restart Nautilus by pressing Alt+F2 and typing nautilus -q for the changes to have effect.

Let me know how things went 🙂

UPDATE: For those of you that prefer not to “hack” your system, say by copying files directly into the directory of a specific Python version, I’ve made a deb package of the Wine library. It’s available here.

Advertisements


12 Responses to “Wine integration in Nautilus”

  1. This is a very good extension and useful extension! But… I can’t get it to work. I’ve tried to install suggested DEB file, and afterwards I’ve pulled wine-project from bzr and executed:

    sudo cp wine-helper/wine-property-page.py /usr/lib/nautilus/extensions-2.0/python/

    Then I’ve restarted nautilus and opened an EXE file, but I can’t see Compatibility tab.

    Am I doing something wrong? I’ve testid this on fully updated Ubuntu 9.10.

    Thank You in advance!

    • 2 Christian Dannie Storgaard

      Thanks for trying it out!
      I’m sorry it’s not working for you, do you think you could kill Nautilus, start it from a terminal and send me the terminal output from after you’ve tried opening the properties dialog of an exe file?

  2. Here is the output:

    sss@lfu4-desktop:~/Свалени/python-wine$ nautilus

    (nautilus:24930): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()’ failed
    Initializing nautilus-gdu extension
    Initializing nautilus-open-terminal extension

    ** (nautilus:24930): WARNING **: No marshaller for signature of signal ‘UploadFinished’

    ** (nautilus:24930): WARNING **: No marshaller for signature of signal ‘DownloadFinished’

    ** (nautilus:24930): WARNING **: No marshaller for signature of signal ‘ShareCreateError’
    ERROR: Could not load classifier cascade /usr/share/opencv/haarcascades/haarcascade_frontalface_alt2.xml

    ** (nautilus:24930): WARNING **: Invalid borders specified for theme pixmap:
    /usr/share/themes/LFU Modern Grey/gtk-2.0/Shadows/frame1.png,
    borders don’t fit within the image
    /tmp/tmp.GWGzU6akG1: clr_important field in bitmap should be zero
    /tmp/tmp.GWGzU6akG1: clr_important field in bitmap should be zero
    /tmp/tmp.GWGzU6akG1: clr_important field in bitmap should be zero
    /tmp/tmp.GWGzU6akG1: clr_important field in bitmap should be zero
    /tmp/tmp.GWGzU6akG1: premature end
    /tmp/tmp.KiYSjrPGyC: premature end

    I’ve also tried your PPA for wine-preferences, but it gives me error about unsatisfied dependency. The error says that wine (>= 1.1.23) is needed. I have wine 1.1.32-0ubuntu-1-ppa installed from http://ppa.launchpad.net/ubuntu-wine.

    • 4 Christian Dannie Storgaard

      Thanks for the output. I’m not sure what the problem is, but I have now changed the python-wine package to not require a specific version of Wine, so if you could try installing version 0.2.2-2 from my PPA and see if that works it would be great.
      Just a thought, have you tried it with different exe files or just one?

      • 5 Christian Dannie Storgaard

        Oh, forgot to mention that I also updated nautilus-wine so you should try installing that as well from the PPA.

  3. It’s all working now, thank You! I want to translate wine-preferences, is it translatable?

    • 7 Christian Dannie Storgaard

      Great to hear that everything is working! And yes, it’s definitely translatable. I’ll email you the .pot files and start including them from the next release.

  4. Hmm, something is wrong here – nautilus-wine doesn’t work and if I open Properties of exe file, Compatibility tab is missing. When I launch Nautilus from terminal, it shows the following message:

    sss@lfu4-desktop:~$ nautilus

    (nautilus:5355): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()’ failed
    Initializing nautilus-gdu extension
    Traceback (most recent call last):
    File “/usr/lib/nautilus/extensions-2.0/python/wine-property-page.py”, line 23, in
    if os.path.isdir( “%s/locale” % os.path.abspath(os.path.dirname(sys.argv[0])) ):
    NameError: name ‘sys’ is not defined

    • 9 Christian Dannie Storgaard

      I’m sorry, stupid mistake from my side. It’s fixed in the newest version that should appear in the PPA shortly. Thanks for reporting it!

  5. I checked nautilus-wine after last update from your ppa, and now it is working. Thank You for your quick response!

    • 11 Christian Dannie Storgaard

      I’m glad to hear that it’s working. Thanks for helping out!

  6. 12 fukid

    it is very nice 😀 thanks!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s


%d bloggers like this: