Se você estiver usando o Zeitgeist, poderá usar o seguinte script:
#! /usr/bin/env python
from zeitgeist.client import ZeitgeistDBusInterface
from zeitgeist.datamodel import Event, Interpretation, TimeRange, \
StorageState, ResultType
zg = ZeitgeistDBusInterface()
events = zg.FindEvents(
TimeRange.always(),
[Event.new_for_values(interpretation=Interpretation.CREATE_EVENT)],
StorageState.Any, 1, ResultType.MostRecentEvents)
last_event = Event(events[0])
last_subject = last_event.get_subjects()[0]
print last_subject.uri