Saturday, December 26, 2015

gnome - Disable Unity launcher and top panel 16.04


In Ubuntu 14.04 I was able to permanently disable Unity plugin from Compiz config settings manager (to hide launcher and top bar). However in 16.04 it's back after a reboot.
Any idea how I can make this change permanent? Or: is there a way to disable them at every startup? Or: can I completely uninstall them?
Thank you for any idea.


(Reason: These bars badly interfere with full screen applications. They appear for example when a dialog box is shown, covering important parts of the screen. Same is true for gnome-session-flashback.)



Fixing #1506023 a startup check for unityshell was implemented, so it will be added back to the list of active Compiz plugins even if you have disabled it in ccsm (unity-active-plugins-safety-check).


As discussed in #1620728, we can disable this check in /usr/share/upstart/sessions/unity7.conf. Just comment out the line:


  #/usr/lib/x86_64-linux-gnu/unity/unity-active-plugins-safety-check

Then copy this file to ~/.config/upstart/unity7.conf, because the system-wide file may be overwritten on an update.




Alternatively, lock the list of active plugins to a fixed value. If Compiz uses the GSettings Configuration Backend (the default), you can lock the active-plugins key in Dconf (the backend of Gsettings).


(1) Get the list of Compiz profiles:


dconf read /org/compiz/existing-profiles

For me it's


['Default', 'unity']

Append a new profile called nounity:


dconf write /org/compiz/existing-profiles "['Default', 'unity', 'nounity']"

(2) Get your currently active Compiz profile:


dconf read /org/compiz/current-profile

For me it's unity. Copy every setting from here to the new nounity profile


dconf dump /org/compiz/profiles/unity/ | dconf load /org/compiz/profiles/nounity/

(3) Get the list of active plugins:


dconf read /org/compiz/profiles/nounity/plugins/core/active-plugins

For me


['core', 'composite', 'opengl', 'place', 'mousepoll', 'snap', 'grid', 'copytex', 'imgpng', 'resize', 'wall', 'commands', 'vpswitch', 'move', 'unitymtgrabhandles', 'regex', 'compiztoolbox', 'session', 'animation', 'expo', 'workarounds', 'ezoom', 'fade', 'scale', 'unityshell']

Copy this into a text editor for later use. Remove 'unityshell' and add 'decor' (for window decorations, frames, captions etc.) somewhere after opengl.


['core', 'composite', 'opengl', 'decor', 'place', 'mousepoll', 'snap', 'grid', 'copytex', 'imgpng', 'resize', 'wall', 'commands', 'vpswitch', 'move', 'unitymtgrabhandles', 'regex', 'compiztoolbox', 'session', 'animation', 'expo', 'workarounds', 'ezoom', 'fade', 'scale']

Note: you could have done this step from ccsm. Click Preferences on the left plane, switch to the nounity profile, go back, disable Unity plugin, and enable window decorations. Compiz may crash for the first time. Then optionally change the profile back to unity. Now ccsm should have set /org/compiz/profiles/nounity/plugins/core/active-plugins to the correct value so that the plugins are in correct order.


(4) From here on, we'll follow the Dconf manual to lock active-plugins in the nounity Compiz profile. We'll create a new Dconf system database called nounity. Create a folder /etc/dconf/db/nounity.d/ then a file /etc/dconf/db/nounity.d/plugins with contents from step (3):


[org/compiz/profiles/nounity/plugins/core]
active-plugins=['core', 'composite', 'opengl', 'decor', 'place', 'mousepoll', 'snap', 'grid', 'copytex', 'imgpng', 'resize', 'wall', 'commands', 'vpswitch', 'move', 'unitymtgrabhandles', 'regex', 'compiztoolbox', 'session', 'animation', 'expo', 'workarounds', 'ezoom', 'fade', 'scale']

(5) We'll lock that key to this default value. Create a folder /etc/dconf/db/nounity.d/locks/ then a file /etc/dconf/db/nounity.d/locks/plugins with contents


/org/compiz/profiles/nounity/plugins/core/active-plugins

(6) If the DCONF_PROFILE environment variable is unset and there is no /etc/dconf/profile/user Dconf profile file on the system, then the default fall-back configuration is used. So it's safe to create our own configuration. We'll call it user so that Dconf loads it by default, and specify our nounity system database to lock the active-plugins key. Create a file /etc/dconf/profile/user with contents


user-db:user
system-db:nounity

(7) Because of steps (4)-(6) call


sudo dconf update

Everything's set up. Now you can switch to the nounity Compiz profile with Compizconfig Settings Manager – probably the easiest, GUI way – or by editing your compizconfig file (~/.config/compiz-1/compizconfig/config)


[general_ubuntu]
profile = nounity

Either way, this choice persists across restarts. With the nounity profile, Unity shell doesn't show, and even you can't enable it in ccsm or through dconf, because the plugin list is locked. With the unity profile, you can toggle plugins manually (but unityshell will be automatically activated at startup).


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...