Sunday, May 16, 2010

Compiz in Ubuntu 10.04: Same As It Ever Was

Following Gizmo’s Freeware list of tweaks, I decided to try jazzing up the visual appearance of Ubuntu 10.04 (Lucid Lynx).  To do this, I went into Ubuntu's System > Preferences > CompizConfig Settings Manager > Desktop.  Enable Desktop Cube; disable Desktop Wall.  Unfortunately, I went on to play with Effects at the same time, and managed to halfway freeze my system.  Having wasted hours on fooling with Compiz in previous years, I rebooted and went back to System > Preferences > Appearance > Visual Effects > Normal.

Gizmo also described a Windows 7 Aero Snap tweak in which I could drag a window to the left or right side of the screen and it would automatically fill half of the screen.  To make this work, I installed wmctrl in Synaptic.  Then, in CompizConfig > General > Commands, I entered these commands:

  • Command line 0:  WIDTH=`xdpyinfo | grep 'dimensions:' | cut -f 2 -d ':' | cut -f 1 -d 'x'` && HALF=$(($WIDTH/2)) && wmctrl -r :ACTIVE: -b add,maximized_vert && wmctrl -r :ACTIVE: -e 0,0,0,$HALF,-1
  • Command line 1:  WIDTH=`xdpyinfo | grep 'dimensions:' | cut -f 2 -d ':' | cut -f 1 -d 'x'` && HALF=$(($WIDTH/2)) && wmctrl -r :ACTIVE: -b add,maximized_vert && wmctrl -r :ACTIVE: -e 0,$HALF,0,$HALF,-1
  • Command line 2:  wmctrl -r :ACTIVE: -b add,maximized_vert,maximized_horz
Then, in the “Edge Bindings” tab, I changed None to Left (for command 0), Right (for command 1), and Top (for command 2).  I opted to disable the Flip Left, Flip Right, and Flip Up actions of Desktop Wall.  I wasn’t sure what that would mean.  I clicked Back > General > General Options > General tab > Edge Trigger Delay = 500 > press Tab button > Back > Close.  The way this actually worked, as I quickly found, was that whatever window was highlighted at the moment would go to the edge of the screen where I put the cursor.  Nice, but it kept the left panel from coming up (since I had set it to Auto-Hide), and then it made the bottom panel go to the top.

It all felt pretty flaky.  Since I couldn’t get back into the left panel I had to restart the system again.  Or, correction, the only button that worked was the Shut Down, so I did that, and then rebooted.  When the system came back up, the bottom panel was back in place, but I still could not open the left panel to get into System > Preferences and make changes to Compiz etc.  Following howefield’s advice, I hit Alt-F2, typed “gconf-editor” (I could also have typed gnome-terminal if I’d wanted Terminal) and went to /apps/panel/toplevels/top_panel_screen0 and unchecked auto_hide.  I closed that, went back into Compiz Commands, and clicked the brush or broom icon at the left to remove each of those three commands.  I went into Synaptic and removed wmctrl.  I set the left panel back to Auto-Hide.  It would not come up again.  I restarted the system.

The restart option worked this time, at least to the point of taking me to the Ubuntu screen and then freezing.  Eventually, I punched the computer’s reset button.  I tried again with the left panel.  This time, I just turned off its Auto-Hide option and didn’t turn it back on.  I wondered if System > Administration > Update Manager would somehow fix this.  I ran a check for updates and got an indication that there were 21 of them.  I installed those and tried restarting the computer again.  This time, restart worked without having to punch the reset button.  I went back into Appearance > Visual Effects and set it to “None” rather than “Normal” or “Extra.”  I changed the properties of the left panel to Autohide again.  Now it would hide and unhide without a problem.  I went back into Visual Effects and tried the Normal setting.  It said, “Searching for available drivers.”  I opted to keep the settings.  I closed out of that and tried the panel again.  So, back in gconf-editor, I turned off Autohide again to make the panel visible; I went into Visual Effects and set it back to None; and now the panel was back.  So, OK, Compiz had screwed up the Normal setting so that I had to use the None option; but with the None option, everything seemed to be working acceptably.

That took care of this problem.  If the panel had still not worked, Howefield also offered the option of resetting the panels to the original default, which would have required me to reconstruct the way I had set them up.  Moral of the story, for me, on this work-oriented system, was to continue to avoid Compiz special effects.