Photoshop CS2 under Wine 1.4 Messes up Unity Desktop

I'm aware that the general consensus is that Photoshop is at best barely usable under Wine. I'm one of the lucky few that got CS2 (apparently one of the least quirky) running well under Wine 1.4 in Ubuntu 12.04. All the mentioned quirks like the crashes provoked by the text tool are not present. With the -for my practical purposes- unimportant exception of Bridge refusing to start, the rest is working just fine.

The only grave quirk it has is that on closure, it messes up completely the Unity desktop, lossing automatically the 3D appearance, leaving me with a D2 desktop, square cornered windows and without the (x)(-)([]) buttons and windows title. This forces me to close the windows by means of Ctrl-Q and eventually a reboot to get back the correct desktop and window appearance.

In the likely case there's no solution to this behaviour, is there a command or script I may use to restore the usual desktop? That would allow me to place a launcher to that effect.

I'll appreciate any comment not in the lines of looking for a Photoshop substitute. I've been through all and they won't let me do in a practical manner what I need.

Many thanks in advance.

Jorge.

Photoshop running, normal desktop

Photoshop closed, messed desktop. Note the lack of buttons and the square corners


Update 27.05.2012 14:20 CST:

Eliah Kagan and Alvin have helped me to pinpoint the problem to the 3D session. Thus, so far the solution involves logging-out of the 3D session and logging back-in with a 2D session before starting Photoshop; then it exits normally and doesn't disturb the desk.

Of great help would be a way to switch-off the 3D effects without having to log-out, and then back-on, if it is at all feasible. Of even greater help would be a BASH script to automate this.


Update 27.05.2012 19:10 CST:

jasmines' suggestion to do a compiz --replace doesn't terminate correctly, although while the order is still in a loop the desktop appears normal. However, closing the terminal or breaking the loop reverts the session status to a crippled desk, no top panel, no launcher, no window top bar & controls and now; no keyboard.

The final output of the compiz --replace where it gets stuck is this:

WARN  2012-05-27 20:44:32 unity <unknown>:0 Unable to fetch children: No existe la interfaz «org.ayatana.bamf.view» en el objeto en la ruta /org/ayatana/bamf/application62801462

WARN  2012-05-27 20:44:32 unity <unknown>:0 Unable to fetch children: No existe la interfaz «org.ayatana.bamf.view» en el objeto en la ruta /org/ayatana/bamf/application62801462

Hopefully somebody can decode this. It's sanskrit to me. The solution to the problem is still at large...


SOLVED!

See virpara's answer. I created the script by his suggestion and placed a launcher to it in my desktop. Works like a charm and solves my Photoshop exit bad manners in less than a minute :-)

Adding 3 screen captures of before, during and after.

Photoshop running, desktop normal

Photoshop closed, desktop ruined

After running **"Restore Unity"** script, desktop back to normal

Beautiful. This place is a wealth of knowledge. Many thanks to all who participated.


Solution 1:

answering because is says script to restore Unity 3D without rebooting will do.

create a file wherever you like(I will create in /usr/bin)

gksudo gedit /usr/bin/restore-unity give pass and paste

#!/bin/bash

sudo killall compiz
compiz --replace

in gedit then close gedit. now you have script named restore-unity in /usr/bin/. give execution permission.

sudo chmod +x /usr/bin/restore-unity

to run, open terminal and run

restore-unity

Note:

run this as command( alt+F2 ). if you run this from terminal you have to keep terminal running if you interrupted or closed terminal thing will get messed up.

Or

to make it persistent even if terminal is closed just use prefix nohup

thats it.

Solution 2:

Is compiz still running? If so, try kill it and then restart it:

sudo killall compiz
compiz --replace

Report back for errors!

Jorge M. Treviño(OP) wrote( these are comments by OP i have included for future reference):

sudo killall compiz left me without a keyboard, I couldn't issue the next command but sudo killall compiz && compiz --replace gave me this output:

(compiz:5223): GConf-CRITICAL **: gconf_client_add_dir: assertion gconf_valid_key (dirname, NULL)' failed Initializing unityshell options...done 
compiz (decor) - Warn: failed to bind pixmap to texture compiz (decor) - Warn: failed to bind pixmap to texture 
compiz (decor) - Warn: failed to bind pixmap to texture Starting gtk-window-decorator 
WARN 2012-05-27 15:01:52 unity.libindicator <unknown>:0 Desktop file '/usr/share/applications/firefox.desktop' is using a deprecated format for its actions that will be dropped soon. 
WARN 2012-05-27 15:01:52 unity.libindicator <unknown>:0

Similar warnings followed... I don't know how to place them here.Then

(compiz:5223): GConf-CRITICAL **: gconf_client_add_dir: assertion `gconf_valid_key (dirname, NULL)' failed Initializing unityshell options...done 
compiz (decor) - Warn: failed to bind pixmap to texture compiz (decor) - Warn: failed to bind pixmap to texture 
compiz (decor) - Warn: failed to bind pixmap to texture 

and more Warnings...

Finally,

ERROR 2012-05-27 15:01:53 unity.glib-gobject <unknown>:0 
g_object_unref: assertion G_IS_OBJECT (object)' failed  

but YES! that got me back the top panel, the launcher and the 3D windows!

Oops! Hold your horses please guys. I was hasty saying it solved the problem.

The terminal was stuck just after the output G_IS_OBJECT (object) failed and I didn't notice that I didn't get a prompt back. Breaking the compiz --replace order with a Ctrl+C left me with the crippled desk again. I'm going to try this again in 2D mode and see what happens...

No go, the output is:

(compiz:30135): GConf-CRITICAL **: gconf_client_add_dir: assertion `gconf_valid_key (dirname, NULL)' failed Initializing unityshell options...done
WARN 2012-05-27 20:44:32 unity <unknown>:0 Unable to fetch children: No existe la interfaz «org.ayatana.bamf.view» en el objeto en la ruta /org/ayatana/bamf/application62801462

OK, the sum is this: compiz --replace, even in a 2D session ends stuck in an error loop with two warnings about the interface «org.ayatana.bamf.view» not existing. Terminating the loop with Ctrl+C cripples the desk. Again, ideas?

these were the comments by OP though he has solved it now( for future reference)