Re: Automate emptying trash bin
Murray Trainer <[email protected]> Thu, 04 Jan 2007 11:55:16 +0900
| Newsgroups | gmane.comp.kde.kiosk |
|---|---|
| Message-ID | <[email protected]> |
Hi Michael, Thanks for that. Unfortunately the ktrash --empty requires an X-session to be running. I might have to just do: rm -f ~/.local/Share/Trash/files/* rm -f ~/.local/Share/Trash/info/* Which seems to work :-) Murray > Hi, > > of course there is a way to do this via a script. We're talking about KDE :). > I remember doing it by DCOP, but I can't find the option any more. > > However, you can use ktrash. ktrash accepts --empty, so "ktrash --empty" will > empty the trash can of the logged in user. If you need to run this script as > root or as a different user you might need to use su or sudo and correct > XAUTHORITY and DISPLAY variables. > > This might work: > XAUTHORITY=/home/user/.XAUTHORITY DISPLAY=:0 su user -c "ktrash --empty" > > Maybe you figure out some problems when trying to empty the trash can of a > user that isn't logged in; I just emptied the trash can every time a user > logged in. > > Good luck. > > --Michael > > Am Mittwoch, 3. Januar 2007 01:59 schrieb Murray Trainer: > > Hi All, > > > > On our system, when users fill up their disk quota, they can't login any > > more. I was thinking one way of avoiding this would be to empty their > > trash if their disk space is low. Is there any way of doing this via a > > script? > > > > Thanks > > > > Murray > > > > _______________________________________________ > > kde-kiosk mailing list > > [email protected] > > https://mail.kde.org/mailman/listinfo/kde-kiosk > _______________________________________________ > kde-kiosk mailing list > [email protected] > https://mail.kde.org/mailman/listinfo/kde-kiosk -- Murray Trainer GO-PC Technical Support [email protected] ******************************************************** GOPC is a Personal Desktop you can access from Anywhere. Get your own personal GO-PC account at WWW.GOPC.NET ********************************************************