Bottom panel problems with compiz, Ubuntu MATE 16.04 (solved)

I have a standard panel in the bottom of the screen (Redmond layout). During startup the panel is first briefly shown in the bottom, then briefly at the top, then finally at the bottom again. What is worse: The panel is unresponsive. It turns out that I can click the panel at the top even though it is shown at the bottom. So I added a startup script which kills the panel after 3 secs which causes it to re-launch at the bottom this time fully functional. So the panel is now shown and removed three times during startup before finally being shown the forth time. While functional this is very clunky and hardly elegant. It seems to me that if I could somehow create a dependency which causes the panel to launch only after compiz has started, then I would be good.

What could be the problem?

How did you setup compiz to start ? Does this happen if you start compiz after the desktop is loaded ?
Probably some driver compatability isue with compiz.

Here is the script that you wan’t

'#!/bin/bash

while true
do
if pgrep “[c]ompiz” > /dev/null
then
echo “Starting mate-panel”
mate-panel & exit
else
echo “Compiz not started…”
fi
sleep 2
done

to make this work
open dconf-editor and navigate to org.mate.session.required-components there you should see panel . replace the value of “panel” with the path and name of the script (like /ome/john/scriptname.sh)

finaly restart mate session .

1 Like

Clever! Unfortunately I can’t find the path you refer to in dconf-editor - I have no org.mate.session. I do have an org.mate.panel, but that’s a folder, not a value I can edit. Under org.mate.panel I have “general” and “menubar” but none of the values in these two places look like a command I could replace with your script.

Edit: I think I found it. It’s under org.mate.desktop.session.required-components. I’ll report back what my results are (I’m going to backup my machine first).

Awesome man, it works! I couldn’t get my script started through org.mate.desktop.session.required-components though, nothing happened, so I just cleared the panel variable and added my script as a Startup Application. Here’s what I ended up with:

#!/bin/sh

N=0
while [ $N -lt 100 ]; do
  if pgrep compiz >/dev/null; then
    break
  fi
  sleep 0.1
  ((N++))
done

while true; do
  sleep 1
  mate-panel
done

I wanted faster discovery of the compiz process hence only 100ms sleep in the first loop, also I wanted timeout (the N variable). Furthermore, once the compiz process is found, I want to make sure it is truly up and running, hence the 1sec delay before starting the mate-panel. Lastly I want the mate-panel to re-spawn if it is somehow killed, hence the second loop.

Thanks!

3 Likes

I think that your loop will start compiz even if compiz is not running . If it doesn’t find compiz the 100th time
the loop will break and it will start mate-panel no mather of that . Or I am a IDIOT with capital letters couse you need to start mate-panel anyway :smile: . The second while loop is not needed change it to “if statement” becouse the script will not exit once it is done . By the way did you trie compiz-reloaded ? Neet stuff.

Simplest and fastest way
to fix it is is just kill mate-panel after init has completed. You can
do it manually through a terminal (Alt+F2) or automatically through

cat /etc/rc.local 
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

killall mate-panel
exit 0

Just add one line and it will be fixed.

1 Like