Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Lubuntu 14.04 right click trash icon desktop to empty?

  1. #1
    Join Date
    May 2007
    Location
    Townsville, Australia
    Beans
    1,820
    Distro
    Lubuntu 14.04 Trusty Tahr

    Question Lubuntu 14.04 right click trash icon desktop to empty?

    by right clicking the desktop and clicking desktop preferences and then desktop icons and selecting show trash can on desktop, i now have the trash can on the desktop and thats all well and dandy & almost halfway to where i want to be.

    I would like the abilty to be able to right the trash can and select something that will delete all files contained it it rather then open pcmafm and do it thru there. i have hunted high and low with google and i can not for the life of me find the answer. i have spent ages going thru menus and settings that i can find in lubuntu and i come up enpty handed as well.

    any one got any ideas/suggestions/thoughts/comments etc?

    thanks
    Ubuntu user # 16304 www.nocleanfeed.com
    If someone asks you to sudo rm -rf anything, don't do it, and don't run any command with rm in it unless you know exactly what you're doing.things i have learnt changing from Xp pro to Ubuntu

  2. #2
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    3,580

    Re: Lubuntu 14.04 right click trash icon desktop to empty?

    any one got any ideas/suggestions/thoughts/comments etc?
    I think this is going to be possible with the new "custom actions". I haven't had a chance to look into them yet, but will soon.

    Get started here:

    http://lubuntublog.blogspot.com/p/actions_24.html

  3. #3
    Join Date
    May 2007
    Location
    Townsville, Australia
    Beans
    1,820
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Lubuntu 14.04 right click trash icon desktop to empty?

    aaaahhhh that looks promising. a quick google gives us this

    http://ubuntuforums.org/showthread.php?t=812712

    how to delete trash from command line cos i suspect we will need to make a command that runs from shell, so we will need this

    rm -rf ~/.local/share/Trash/files/*

    i will keep reading and see if there is anything else we might need. with a bit of luck it might be pretty simple to do
    Ubuntu user # 16304 www.nocleanfeed.com
    If someone asks you to sudo rm -rf anything, don't do it, and don't run any command with rm in it unless you know exactly what you're doing.things i have learnt changing from Xp pro to Ubuntu

  4. #4
    Join Date
    May 2007
    Location
    Townsville, Australia
    Beans
    1,820
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Lubuntu 14.04 right click trash icon desktop to empty?

    ok, im on the right track. i followed this

    http://madebits.com/blog/comments.ph...y140317-141947

    and i had to create a new directory

    ~/.local/share/file-manager/actions/

    in there i created a new text file and now i can right click on the desktop any where and i can see

    empty trash

    but if i click on the empty trash it does nothing. here is what is in my "empty.trash.can.desktop" file


    [Desktop Entry]
    Type=Action
    Tooltip=Empty Trash Can
    Name=Empty Trash Can
    Profiles=profile-zero;

    [X-Action-Profile profile-zero]
    MimeTypes=inode/directory;
    Exec=rm -rf ~/.local/share/Trash/files/*
    Name=Default profile


    im close, very close, i need to do some more reading but i think this is going to work, if i can read and understand how it works moreclearly
    Ubuntu user # 16304 www.nocleanfeed.com
    If someone asks you to sudo rm -rf anything, don't do it, and don't run any command with rm in it unless you know exactly what you're doing.things i have learnt changing from Xp pro to Ubuntu

  5. #5
    Join Date
    May 2007
    Location
    Townsville, Australia
    Beans
    1,820
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Lubuntu 14.04 right click trash icon desktop to empty?

    i just tested this

    rm -rf ~/.local/share/Trash/files/*

    stright from shell and it works perfectly. so there is something that i need to fix in the little bit of code....mmm.. but what on earth is it, lol
    Ubuntu user # 16304 www.nocleanfeed.com
    If someone asks you to sudo rm -rf anything, don't do it, and don't run any command with rm in it unless you know exactly what you're doing.things i have learnt changing from Xp pro to Ubuntu

  6. #6
    Join Date
    May 2007
    Location
    Townsville, Australia
    Beans
    1,820
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Lubuntu 14.04 right click trash icon desktop to empty?

    i went reading and i thought if i remvoed this from the text file

    MimeTypes=inode/directory;

    that it would work, but i have logged off/on and it dint work. *sigh* man i thought it was going to be the missing bit hat fix it. oh man, this is so frustrating, im so close to getting this working i can smell victory, but man, what is stopping it from not working??? AAARRRGGGHHH!!!

    lol
    Ubuntu user # 16304 www.nocleanfeed.com
    If someone asks you to sudo rm -rf anything, don't do it, and don't run any command with rm in it unless you know exactly what you're doing.things i have learnt changing from Xp pro to Ubuntu

  7. #7
    Join Date
    Dec 2007
    Beans
    12,540

    Re: Lubuntu 14.04 right click trash icon desktop to empty?

    Quote Originally Posted by stinger30au View Post
    i just tested this

    rm -rf ~/.local/share/Trash/files/*

    stright from shell and it works perfectly. so there is something that i need to fix in the little bit of code....mmm.. but what on earth is it, lol
    Just a wild guess but your command is meant to work from a terminal and so maybe PCManFM doesn't know how to deal with it in a Custom Action?

    This is an interesting thread and I hope you get what you want!

  8. #8
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: Lubuntu 14.04 right click trash icon desktop to empty?

    Maybe ~ or * is not expanded correctly from the desktop file (as bash would expand them). Start with your hardcoded home directory instead of ~

  9. #9
    Join Date
    May 2007
    Location
    Townsville, Australia
    Beans
    1,820
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Lubuntu 14.04 right click trash icon desktop to empty?

    lol, you must have mistaken me for someone who actually has an idea on what they are doing here, lol. im doing lots of reading and experimenting here trying to get this to work & i have got *zero* idea what your talking about, sorry.
    Ubuntu user # 16304 www.nocleanfeed.com
    If someone asks you to sudo rm -rf anything, don't do it, and don't run any command with rm in it unless you know exactly what you're doing.things i have learnt changing from Xp pro to Ubuntu

  10. #10
    Join Date
    May 2007
    Location
    Townsville, Australia
    Beans
    1,820
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Lubuntu 14.04 right click trash icon desktop to empty?

    after more reading here, it looks like i might need to create a new text file and call that when the "empty trash" is selected. looks like pcman fm wont run sheel command directly, hence the need for the extra text file. i think if i make it so when you select "empty trash" it runs the extra text file it iwll run it direct form sheel and bypass pcman and it will work.


    thats the theory.... now to make it happen, lol, more reading
    Ubuntu user # 16304 www.nocleanfeed.com
    If someone asks you to sudo rm -rf anything, don't do it, and don't run any command with rm in it unless you know exactly what you're doing.things i have learnt changing from Xp pro to Ubuntu

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •