Re: Automate emptying trash bin
Michael Hartmann <[email protected]> Wed, 3 Jan 2007 10:23:33 +0100
| Newsgroups | gmane.comp.kde.kiosk |
|---|---|
| Message-ID | <[email protected]> |
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