Thursday, December 4, 2014

Removing the Anchor icon in Docky on openSUSE

1. Install gconf-editor
# zypper install gconf-editor

2. Launch gconf-editor
Press ALT+F2
enter "gconf-editor"
3. Go to apps > docky-2 > Docky > Items > DockyItem
 
4. Deselect "ShowDockyItem"

Now you can exit gconf-editor and the Anchor icon of Docky will disappear.

Tuesday, December 2, 2014

Cleaning /tmp on openSUSE 13.2

In the past openSUSE used an automated task to clean the content of /tmp. Long story short even before systemd arrival, a group of users complains about it on the openSUSE mailinglist, so the automated task (a cron job) for cleaning /tmp as been disabled.
Now that we used systemd by default on openSUSE, it has also been decided to disable this task in the systemd configuration.

So since you can have a /tmp greater than 1G in size with file older than 1 years, here is my simple solution :  install tmpwatch.

tmpwatch is a simple package, which install the following daily cron job :

cat /etc/cron.daily/tmpwatch
#! /bin/sh
flags=-umc
/usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix \
        -x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix 10d /tmp
/usr/sbin/tmpwatch "$flags" 30d /var/tmp
for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do
    if [ -d "$d" ]; then
        /usr/sbin/tmpwatch "$flags" -f 30d "$d"
    fi
done

And here we go, tmpwatch will  recursively removes files which haven't been accessed for 10 days in /tmp and 30 days in /var/tmp.