1

I kept searching the Internet up and down for a way to do this. Basically, I want to completely hide the BFB (Big Freaking Button), aka Dash icon, aka 'search your computer' icon from the Unity Launcher, so as to have the dock look more like the GNOME counterpart.

I am using 19.04 with Unity for a lot of reasons (proper high DPI scaling being one of them) and do not intend on switching to something else. I am actually in the process of patching minor aspects of Unity and use it for as long as I can. I am fine editing and recompiling the source code for 'unity', I am just asking for a pointer to what to actually change so as not to keep browsing the whole source code looking for it.

Thank you very much.

  • 1
    linked: https://askubuntu.com/questions/719870/compile-unity-without-launcher – Nmath Jul 29 '19 at 22:33
  • Good mention, that is useful as well. Plus, the Trash icon can be hidden from TrashLauncherIcon.cpp using the same method. Not too shabby! – Valentin Radu Jul 29 '19 at 22:36

1 Answers1

1

Knowing a lot of people criticized Canonical for not being transparent to their source code, I did not even look into it before asking here. Yet, after posting this question, I decided to have a look at the source code:

sudo apt source unity

Installed the required dependencies for rebuilding the package from source:

sudo apt build-dep unity

And took a look through the source code files. First shot, an obvious place where some code seems to deal with the launcher:

gedit launcher/BFBLauncherIcon.cpp

Sure enough, by changing line 40 (set visible from true to false), and also commenting the next line (not sure if it helps, probably not really), like so:

SetQuirk(Quirk::VISIBLE, false);
//SkipQuirkAnimation(Quirk::VISIBLE);

And then compiling the package (DEB_BUILD_OPTIONS avoids the process of running automatic code quality tests after the compilation is done which take a long time and probably won't fail since we literally changed almost nothing at all in the code):

DEB_BUILD_OPTIONS=nocheck debuild -uc -us -b -d

Finally, reinstall 'unity':

sudo dpkg -i unity_7.5.0+19.04.20190304-0ubuntu1_amd64.deb

And then restart your computer, or switch to a free virtual terminal (Ctrl + Alt + 3 for example), and restart LightDM so that the new Unity binary is loaded in memory instead of the old one:

sudo systemctl restart lightdm

And yeah, enjoy! It was that simple!