вторник, 20 октомври 2015 г.

How to restore ark submenu in dolphin

After the upgrade to plasma5, it turned out I lost all my submenu functionalities in Dolphin, like my favorite ark submenu "extract here". Restoring them, however, was quite easy.
Just copy the content of "/usr/share/kde4/services/ServiceMenus/" to "/usr/share/kservices5/ServiceMenus/" with
$sudo cp /usr/share/kde4/services/ServiceMenus/*.* usr/share/kservices5/ServiceMenus/
Problem solved :) 

сряда, 14 октомври 2015 г.

How to clear cache without reboot

Today I noticed that something is eating my RAM like crazy. After I checked with
$watch -n 3 cat /proc/meminfo
it turned out something is caching huge memory for no good reason. So this is what I did (source):
$sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"
and it immediately released like 7GB of RAM. Which is quite a lot. And nothing has crashed so far.
Obviously (from here) you can also do is only partially:
$sudo sh -c "sync; echo 1 > /proc/sys/vm/drop_caches"
$sudo sh -c "sync; echo 2 > /proc/sys/vm/drop_caches"
I haven't yet tried them, because it seemed I need to drop everything.
A side thing - I just discovered (well, by googling it) that if you type shift +E while in top, you can change the units from KB to GB. Which is much easier to read. Yay!