Monday, September 07, 2015

PCManFM empty trash menu





You can add this missing feature in LXDE, emptying the trash can using a menu thanks to the file manager actions, the easy way (it should be compatible with all versions of PCManFM except maybe Qt based builds, for now). Just open a LXTerminal and use these five commands:

  • sudo apt-get install trash-cli
  • mkdir --parents $HOME/.local/share/file-manager/actions
  • wget -O $HOME/.local/share/file-manager/actions/ask-trash-empty.desktop https://raw.githubusercontent.com/NicolasBernaerts/ubuntu-scripts/master/lubuntu/trash-empty/ask-trash-empty.desktop
  • sudo wget -O /usr/local/bin/ask-trash-empty https://raw.githubusercontent.com/NicolasBernaerts/ubuntu-scripts/master/lubuntu/trash-empty/ask-trash-empty
  • sudo chmod +x /usr/local/bin/ask-trash-empty

Now re-log in again, and that's all.

Via: Originally found in Bernaerts blog.

2 comments:

  1. Had this a long time ago, but without a script. http://s244191956.onlinehome.us/2015/08/23/my-linux/
    [Desktop Entry]
    Type=Action
    ToolbarLabel[en_US]=Empty Trash
    ToolbarLabel[en]=Empty Trash
    ToolbarLabel[C]=Empty Trash
    Description[en_US]=Trash
    Description[en]=Trash
    Description[C]=Trash
    Icon[en_US]=user-trash
    Icon[en]=user-trash
    Icon[C]=user-trash
    Name[en_US]=Empty Trash
    Name[en]=Empty Trash
    Name[C]=Empty Trash
    Profiles=profile-zero;

    [X-Action-Profile profile-zero]
    MimeTypes=inode/directory;
    Exec=trash-empty
    Name[en_US]=Default profile
    Name[en]=Default profile
    Name[C]=Default profile

    ReplyDelete
  2. Seems like an old enough feature to me. What about eject usb feature?

    ReplyDelete