Hack: How to disable recently used items list

      7 Comments on Hack: How to disable recently used items list

Quite a few applications use ~/.local/share/recently-used.xbel to keep track of a user’s most recent files. Unfortunately, not every application offers customization options to disable this list.

One possible solution, granted, a quite hacky one, is to clear recently-used.xbel and revoke a user’s permission to edit it again.

First, remove and re-create the file to clear it

$ rm -f ~/.local/share/recently-used.xbel 
$ touch ~/.local/share/recently-used.xbel 

You can then edit the permission so that the user can’t edit the file any more.

$ chmod -w ~/.local/share/recently-used.xbel 

For KDE, there is quite a similar mechanism. While there is no single file that stores the recently used items, a .desktop file is created in ~/.kde/share/apps/RecentDocuments/ for every item.

If if you revoke a user’s writing permission to that folder, KDE won’t add any item to the ‘recently used’ list.

$ chmod -w ~/.kde/share/apps/RecentDocuments/

7 thoughts on “Hack: How to disable recently used items list

  1. avatarMark

    Thanks for the hack. KDE no longer lists my recent documents but it still lists recent applications. Do you know how I can prevent this?

  2. avatarhoang

    I have tried that but it does not work
    my command is chmod -w ~/.kde4/share/apps/RecentDocuments/
    i did not work then I removed all permissions to the folder, chmod 000 /Re.., but still, when I open a file, i keeps adding recent documents @@

  3. avatarDan

    The only thing that worked for me was the crude cludge of deleting the file recently-used.xbel and creating a directory with the same name; thus preventing the file being recreated again.

  4. avatarjustmetest

    This worked for me kde 5 plasma:
    rm -r ./.local/share/RecentDocuments
    mkdir ./.local/share/RecentDocuments
    chown nobody:nobody ./.local/share/RecentDocuments
    chmod a-w ./.local/share/RecentDocuments

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.