Ubuntu – How to run Ubuntu Tweak’s janitor automatically

command linemaintenancestartupubuntu-tweak

My aim is to have the janitor running at startup, with a pre-configured profile (e.g. clean old packages and empty the browser cache), much like CCleaner's /AUTO parameter on Windows.

The website is lacking any documentation or usage instructions, and I could not find any information on this here on AskUbuntu as well.

I tried, naturally, to start Ubuntu Tweak from the command line, hoping additional API exists that will come through in this (allegedly) simple task.

I only got as far as:

ubuntu-tweak -f janitor

which is a step in the right direction, but what's still missing is a command for the clear action. Is such a command available, or is there any better way of achieving the described behavior?

Best Answer

for the moment the answer is no...

Let me expand on that statement.

In many ways, your question is similar to this Q&A:

Ubuntu Tweak only offers (currently) a limited API call for the executable itself.

Therefore - when trying to invoke a Ubuntu-Tweak feature when starting from startup applications or via a quick list, you can only use the command line parameters that have been made available.

ubuntu-tweak -f janitor is one such feature. There are no command-line parameters (currently) for what you are seeking to do.

You can test this yourself by running ubuntu-tweak -h. The linked answer above shows the typical result you could expect.

Some programs - once running - expose an interface such as dbus that allows you to invoke features via an external program. Rhythmbox is one such software with its rhythmbox-client which can be called externally. Ubuntu-tweak unfortunately does not offer the same external interface.

What you'll need to do is submit a patch to the author that would add a command-line parameter to do the function you are seeking.

Alternatively - add an externally callable interface such as dbus when ubuntu-tweak is actually running.

Related Question