wine-0.9.59, OpenSolaris and Picasa

New release, new features, new bug fixes and new bugs.
Let’s start with compiling.

Compiling

  • You do not need to use –without-ldap anymore
    I used just two options: –disable-win16 and –without-capi (does anybody use ISDN?).
  • Do not forget the tricks from Part I and Part II
  • New error I haven’t seen before:
    ../../tools/wrc/wrc --nostdinc -I. -I. -I../../include -I../../include   -DBUILD_SHA1=\"$(GIT_DIR=../../.git git rev-parse HEAD 2>/dev/null)\" -fowinetest.res winetest.rc
    /bin/sh: syntax error at line 1: `(' unexpected
    gmake: *** [winetest.res] Error 2

    Not sure if and why git is needed here, but I simply removed (commented) the following line from programs/winetest/Makefile:

    EXTRARCFLAGS = -DBUILD_SHA1=\"$$(GIT_DIR=$(TOPSRCDIR)/.git git rev-parse HEAD 2>/dev/null)\"

Applications
According to the Announcement, the following bugs (among others) were fixed in 0.9.59:

  • 2866 Support for X11 multi head configurations (Xinerama)
    I use Xinerama, but I haven’t noticed anything wrong about it, it was always working
  • 4528 Firefox vertical size wrong, doesn’t take gnome system menu or task
    bars into account
    Yes, it works correctly now. But Firefox 3 beta 5 crashes every 3 seconds 😉
  • 11574 Picasa cannot upload to web albums
    Still does not work for me. But instead it eats all possible and impossible CPU and memory resources:

    #top
    PID USERNAME LWP PRI NICE  SIZE   RES STATE    TIME    CPU COMMAND
    3731 alekz      9  28    4   26M   12M sleep    2:37   102% wine
    3710 alekz     11  38    4  134M  100M sleep    1:26 99.62% wine
    3713 alekz      1  28    4  109M  106M run     20:32 96.60% wineserver
    . . .

    And this is after I killed Picasa:

    PID USERNAME LWP PRI NICE  SIZE   RES STATE    TIME    CPU COMMAND
    3731 alekz     10   0    4   26M   12M cpu      8:06   102% wine
    3713 alekz      1   0    4  406M  404M cpu     26:46 99.85% wineserver

    I stopped Picasa, one process is gone, but what wine is doing now??! Also look at the consumed memory, it’s constantly increasing.

OpenSolaris Forum

There is a possibility that a Wine Community will be created for OpenSolaris. (aka Nevada, aka Solaris 11). BTW, you can try to use the wine configuring script (see further in the thread), but it does not solve the above mentioned problems, so do not waste your time.

Replacing a DiskSuite (Solaris Volume Manager) disk

A short guide on how to recover a broken DiskSuite mirror.

  1. Check metastat information:
    # metastat -c
    d30              m   34GB d31 (maint) d32
    
      d31 s 34GB c0t0d0s3 (maint) d32 s 34GB c0t1d0s3
    d20 m 4.0GB d21 (maint) d22
      d21 s 4.0GB c0t0d0s1 (maint) d22 s 4.0GB c0t1d0s1
    d10 m 30GB d11 (maint) d12
      d11 s 30GB c0t0d0s0 (maint) d12 s 30GB c0t1d0s0
    hsp001 h -
  2. Remove the broken replicas from the metadb :
    # metadb -i
            flags           first blk       block count
          W   p  l          16              8192            /dev/dsk/c0t0d0s7
          W   p  l          8208            8192            /dev/dsk/c0t0d0s7
         a m  p  luo        16              8192            /dev/dsk/c0t1d0s7
         a    p  luo        8208            8192            /dev/dsk/c0t1d0s7
    . . .
    
    # metadb -d /dev/dsk/c0t0d0s7
  3. Replace the broken disk
  4. Check that the new disk is visible:
    # format
    Searching for disks...done
    
    AVAILABLE DISK SELECTIONS:
    
      0. c0t0d0 /pci@1c,600000/scsi@2/sd@0,0 1. c0t1d0 /pci@1c,600000/scsi@2/sd@1,0
  5. Copy the partition table from the healthy to the new disk:
    # prtvtoc /dev/rdsk/c0t1d0s0 | fmthard -s - \
    /dev/rdsk/c0t0d0s0
    fmthard:  New volume table of contents now in place.
  6. Create metadb replicas (for example, 2 copies in slice 7):
    # metadb -a -c2 /dev/rdsk/c0t0d0s7
  7. Verifying the metadb:
    # metadb -i
    
      flags first blk block count
    a u 16 8192 /dev/dsk/c0t0d0s7 a u 8208 8192 /dev/dsk/c0t0d0s7 a p luo 16 8192 /dev/dsk/c0t1d0s7 a p luo 8208 8192 /dev/dsk/c0t1d0s7
  8. “Metareplace” the failed slices:
    # metastat | fgrep replace
    Invoke: metareplace d30 c0t0d0s3
    Invoke: metareplace d20 c0t0d0s1
    Invoke: metareplace d10 c0t0d0s0
    
    # metareplace -e d30 c0t0d0s3
    d30: device c0t0d0s3 is enabled
    # metareplace -e d20 c0t0d0s1
    d20: device c0t0d0s1 is enabled
    # metareplace -e d10 c0t0d0s0
    d10: device c0t0d0s0 is enabled
    
  9. Periodically check the resyncing status:
    # metastat | fgrep esync
    State: Resyncing
    Resync in progress: 0 % done
    State: Resyncing
    c0t0d0s3          0     No       Resyncing   Yes
    State: Resyncing
    Resync in progress: 19 % done
    State: Resyncing
    c0t0d0s1          0     No       Resyncing   Yes
    State: Resyncing
    Resync in progress: 2 % done
    State: Resyncing
    c0t0d0s0          0     No       Resyncing   Yes

WordPress and TinyMCE

TinyMCE (platform independent web based Javascript HTML WYSIWYG editor) is developed by Moxiecode Systems AB.

Update wp-includes/js/tinymce with files from tinymce/jscripts/tiny_mce

3d party TinyMCE plugins can be downloaded from SourceForge and should be placed in wp-includes/js/tinymce/plugins

To activate plugins and/or tune TinyMCE edit wp-includes/js/tinymce/tiny_mce_config.php (do not forget to make a backup copy first).

To add/remove plugins change $plugins variable. By default (wp2.6) it’s set to:

$plugins = array( 'safari', 'inlinepopups', 'autosave', 'spellchecker', 'paste', 'wordpress', 'media', 'fullscreen' , 'wpeditimage');

If you use full version of TinyMCE (e.g. downloaded from Moxiecode) instead of the bundled one, this string may look like (see Plugins reference):

$plugins = array( 'safari', 'inlinepopups', 'autosave', 'spellchecker', 'paste', 'wordpress', 'media', 'fullscreen', 'advhr', 'advimage', 'advlink', 'emotions', 'inlinepopups', 'insertdatetime', 'layer', 'nonbreaking', 'pagebreak', 'preview', 'searchreplace', 'style', 'table', 'visualchars', 'xhtmlxtras' , 'wpeditimage');

To add buttons to 4 available rows modify corresponding variables $mce_buttons, $mce_buttons_2, $mce_buttons_3 and $mce_buttons_4 (see Control reference). For example:

$mce_buttons = apply_filters('mce_buttons', array('search', 'replace', 'bold', 'italic', 'strikethrough',  'underline', '|', 'bullist', 'numlist', 'blockquote', '|', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', '|', 'link', 'unlink', 'image', 'wp_more', 'pagebreak',  'spellchecker', 'fullscreen', 'table', 'wp_adv' ));

$mce_buttons_2 = apply_filters('mce_buttons_2', array('formatselect', 'code', 'forecolor', '|', 'pastetext', 'pasteword', 'removeformat', '|', 'media', 'charmap', '|', 'outdent', 'indent', '|', 'undo', 'redo', 'wp_help', 'advhr', 'emotions', 'insertdate', 'inserttime', 'preview' ));

$mce_buttons_3 = apply_filters('mce_buttons_3', array('fontselect', 'fontsizeselect', 'fullpage'));

The result can be viewed in a browser:
/wp/wp-includes/js/tinymce/tiny_mce_config.php

Note: AdBlock Plus Firefox extension blocks the contents of the TinyMCE popups (you will see empty pop-up windows).  You might consider replacing ABP with Adblock or whitelisting your whole site.

WordPress 2.5

WordPress 2.5 has been released! Installed! And? Does it work? Basically yes. But…

TinyMCE pop-ups are blank in Firefox. This is what I found (similar problems):

The Console shows:

Error: tinyMCE.getWindowArg is not a function
Source: http://.../wp/wp-includes/js/tinymce/tiny_mce_popup.js
Line: 53

Error: tinyMCE.getParam is not a function
Source: http://.../wp/wp-includes/js/tinymce/utils/form_utils.js
Line: 10

Error: tinyMCEPopup.requireLangPack is not a function
Source: http://.../wp/wp-includes/js/tinymce/plugins/advimage/js/image.js
Line: 5

Upgrading TinyMCE to v3.0.5 did not help (see this post on how to do that). Neither did the replacing inline pop-ups with real pop-up windows. The content is empty. However, TinyMCE works fine on the Moxiecode example page and locally using the example files. Hence, it’s not the code but the configuration or the method WordPress initializes TinyMCE (tiny_mce_config.php ?)

Update 2008-03-31 @13:48:24 Disabling compression (‘compress’ => false) and/or caching (‘disk_cache’ => false) in tiny_mce_config.php did not help. The WP cache (wp/wp-content/uploads/js_cache) was cleaned manually.

Switching keyboard layouts and IIIM

Internet/Intranet Input Method (IIIM) is a distributed Input Method solution that provides Input support for Java & X11 clients via Internet/Intranet. The related documentation can be found here.

When I upgraded from snv_83a to snv_85 I lost the ability to switch layouts. This is what I discovered:

iiim-properties sets the hot-keys ( <Ctrl>-<space> by default) and available languages

The following processes must be running:

  • iiim-xbe
  • /usr/bin/iiimx -iiimd
  • iiimd -nodaemon -desktop -udsfile /tmp/.iiim-username/:3.0 \
         -vardir /export/home/username...

If no processes are running they can be started with:

/usr/bin/iiimx -iiimd

The processes are supposed to be started during the logging in by /usr/dt/config/Xsession.d/0020.dtims

If $DTSTARTIMS is set to True:

it calls either /usr/dt/config/$LANG/0020.dtims (if it exists)

or /usr/openwin/lib/locale/common/dtims and if ($LANG ends up in .UTF-8 or contains .UTF-8@) /usr/openwin/lib/locale/common/imsscript/S505multi