Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
C'mon guys! Someone must have an idea how to reset Unity without rebooting... I tried unity --restore in a terminal and it vanished the top panel and launcher <aaargh!>. At everything came back to normal after a reboot. Iḿ thinking that a current --CS5.1/CS6?- Photoshop in a VM or rebooting into Winsloth will be the best (only?) solution. –  Jorge M. Treviño May 25 '12 at 7:50
    
Do you mean you used unity --reset? (--restore is not a valid flag for unity.) What happens when you press Ctrl+Alt+F1, log in (you won't see anything as you type in your password, that's fine), run compiz --display :0 --replace, then press Alt+F7? –  Eliah Kagan May 27 '12 at 16:39
    
have you tried booting to unity 2d and see if the same bug is present? –  Alvin May 27 '12 at 17:41
    
Don't worry, I'll post an answer if I feel like I have one that is really going to work (there's a week left on the bounty anyways). Meanwhile, if somebody else makes an answer based on the troubleshooting we're doing, and it works and they put in the work to make it thorough and well-presented, I certainly have no problem with them getting the bounty. With that said...is your goal just to avoid rebooting, or you you want to avoid having to log out and back in after running Photoshop CS2? If you're OK with logging out, there's: Alt+F2, /usr/lib/indicator-session/gtk-logout-helper. –  Eliah Kagan May 27 '12 at 18:23
    
A script to log out is certainly feasible. I don't know about logging back in automatically. You might be able to restart the GUI without actually logging out. Hopefully someone else can weigh in on these questions. Are you able to log out? Does manually invoking gtk-logout-helper work for logging out? –  Eliah Kagan May 27 '12 at 18:36
show 2 more comments

5 Answers

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.

share|improve this answer
    
Many thanks! This nicely rounds up what jasmines proposed as terminal commands. It can even be invoked by a desktop launcher. Unfortunately my problem seems to have evolved: the compiz --replace command gets stuck in what seems an endless loop and has to be terminated with a Ctrl+C. This would be the perfect solution as while it is running the desktop and windows almost recover their normal appearance but as the command is (abnormally) terminated or the terminal forcefully closed, the desk reverts to its crippled state. Please check the comments for the exit warnings. –  Jorge M. Treviño May 28 '12 at 5:46
    
I'm glad it helped you please read note –  virpara May 28 '12 at 5:50
    
OK, I'll have to log-out and back in as I already have it running in a terminal window to test again but will be back in a couple min. –  Jorge M. Treviño May 28 '12 at 5:54
    
Success!!! Many many thanks. Works like a charm. Followed your modified recipe to the letter and made a launcher. My desktop returned. Thereś a slight -unimportant- change; it lost the laiuncher color tweak but it's nimious. I'll add the images to the question. –  Jorge M. Treviño May 28 '12 at 6:13
add comment

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)

share|improve this answer
    
sudo killall compiz left me without a keyboard, I couldn't issue the next command <g> but sudo killall compiz && compiz --replace gave me this output: following on next comment –  Jorge M. Treviño May 27 '12 at 20:07
    
(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` –  Jorge M. Treviño May 27 '12 at 20:14
    
Similar warnings followed... I don't know how to place them here. –  Jorge M. Treviño May 27 '12 at 20:16
    
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... –  Jorge M. Treviño May 27 '12 at 20:17
    
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!!! Bless you man! (off to lunch...) –  Jorge M. Treviño May 27 '12 at 20:19
show 6 more comments

I think, "compiz --replace" is bad idea.

Just use Alt-F2, "compiz-decorator" - will restore frames without compiz restart.

share|improve this answer
    
Great Solution! Probably the best. Works perfectly and takes a fraction of a second. I'm sorry you didn't catch the bounty. I've added a launcher to it in my desktop so I don't have to be hunting for it, in case it's really broken. –  Jorge M. Treviño Jun 5 '12 at 2:08
add comment

I have been able to restore the menus with a:

kill -HUP pidof compiz

but I'd much rather it didn't die. If anyone hears of a fix for the problem(s) causing the crash, it would be appreciated.

share|improve this answer
add comment

Just to note - you're probably experiencing a known bug in 12.04 & wine that affects many programs in wine, though others are ok

https://bugs.launchpad.net/compiz-core/+bug/993265

share|improve this answer
    
Doug, you spotted it precisely (pun intended <g>). Let's hope Wine 1.5 has corrected this; I haven't tried to install it as there's no .deb package yet and frequently new versions of Wine introduce as many new bugs as they solve. So far, thus, the solution offered by virpara gives me an acceptable workaround. Many thanks for the heads-up on the bug; it prevents me from exhausting myself looking for a solution to a problem I thought particular to my setup. –  Jorge M. Treviño May 28 '12 at 19:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.