HowTo:CleanUpUbuntu

From Predictive Chemistry
Jump to: navigation, search

How to clean up a new install of Ubuntu 12

I didn't upgrade past Ubuntu 10 right away, since I was worried about `cloud' integration and co. But when I finally got a hand-me-down netbook with the unbearable Windows I decided to give it a spin. At first, I thought I was being a bit paranoid when I gave the installed applications list the once-over and followed the list below. Later, I noticed the FSF's post on Ubuntu including spyware, and realized that maybe this wasn't such bad advice after all.

For new installations, try Trisquel, it's a totally free distro.

The Beginning

While messing around trying to hack the "dashboard" display (served up to you courtesy of unity-panel-service), I found a bunch of easy settings to mess with under the canonical heading:

$ gsettings list-schemas | grep -i canonical

and found some very disturbing (auto-started) programs named zeitgeist, whose purpose is apparently to raid the web-browser cache, along with anything else it can get its hands on, and make all that information retreivable through dbus.

$ sudo apt-get remove zeitgeist-core


Incidentally, I started this mess trying to remove the "Trash" icon from the Unity dash. When asked how to remove the offensive icon, Mark Shuttleworth (Ubuntu's founder) says, ``We have not allowed the removal of the Trash so that we can enable developers to trust that it will always be there. [1]

The Plot Thickens

There's an interesting tie-in between zeitgiest and rhythmbox, which ubuntu favors as a music player, and has even integrated its

$ sudo apt-get remove unity-scope-{musicstores,video-remote} 

into. I'm not a big fan of combining an OS and a music store, and would rather pay the $100 to buy a copy of an OS than have any commercial interest taking over my PC. While I'm checking running programs, those "lenses" (fancy start-menus) don't look so attractive when you see they come with individual daemon processes.

$ sudo apt-get remove unity-lens-{video,music,files,applications}

That's not even mentioning that unity-lens-files is just a fancy interface to the "locate" command.

Of course, I don't believe I'll be throwing random personal information into a bucket managed by anyone but myself, so

$ sudo apt-get remove ubuntuone-client python-ubuntuone-{client,control-panel,storageprotocol} ubuntuone-couch

What else is running?

Finally, there's a "bamf" daemon that doesn't seem to have any documentation and barely a comment here and there in the code. From the package description:

Bamf matches application windows to desktop files. This package contains the daemon used by the library and a gio module that facilitates the matching of applications started through GDesktopAppInfo.

It seems bamf is not confined to windows that 'opt-in' to interface with unity. Marco Trevisan wrote a recent code review on Launchpad with a few tantalizing statements:

1737 /* we have a window who is ready to be matched */
1738 - handle_raw_window (self, window);
1739 + if (bamf_legacy_window_get_window_type (window) != BAMF_WINDOW_DOCK)
1740 + handle_raw_window (self, window);

Revert this please, bamf should actually track any window

Mhmh... I don't like this:
1760 +void bamf_matcher_register_view_stealing_ref (BamfMatcher *self, BamfView *view);

It should be private, while bamf_unity_webapps should signal to the matcher that a new web-app has
been opened and that it should match it. Basically I think that bamf_unity_webapps should be a source
like BamfLegacyScreen is.

while lines 408-411 of bamf-matcher.c

<source lang="C">

    if (type != BAMF_WINDOW_NORMAL || bamf_legacy_window_get_transient (window))
    {
      /* Child windows can generally easily be recognized by their class */
      if (g_strcmp0 (class, "libreoffice-writer") == 0)

</source>

seems to indicate that the matching can be carried out on libreoffice windows, and child windows (spawned by the parent window, itself presumably the unholy offspring of the "dash" launcher)!

Apparently, bamf is yet another server for building graphical applications and is therefore irremovably hooked into the unity window manager and panel displays. What's odd about this one is that the code singles out openoffice in a few cases and identifies child windows by class names. The application-as-a-server seems to be a common design pattern for the Ubuntu team, but there should definitely be more security around an API designed to peer into other open applications. Should programs be able to automagically "find" each other at all?

A related set of packages are defaults in KDE, and form dependencies of the kde-runtime! Go and read the description of these things:

$ sudo apt-get purge libnepomuk4 libnepomukdatamanagement4 libnepomukquery4a libnepomuksync4 libnepomukutils4