systemd and /tmp

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Post Reply
Message
Author
User avatar
dolphin_oracle
Developer
Posts: 20001
Joined: Sun Dec 16, 2007 1:17 pm

systemd and /tmp

#1 Post by dolphin_oracle »

to those of you that might be running mx linux in "systemd" mode, you may find that your /tmp directory is not emptying quite as often as you might like. this causes some odd behavior for a couple of apps, but the fix is easy.

1. copy tmp.conf from /usr/lib/tmpfiles.d to /etc/tmpfiles.d

Code: Select all

sudo cp /usr/lib/tmpfiles.d/tmp.conf /etc/tmpfiles.d/tmp.conf
2. add a couple of lines to the /etc/tmpfiles.d/tmp.conf to make your config look like this:

Code: Select all

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

# See tmpfiles.d(5) for details

# Clear tmp directories separately, to make them easier to override
D /var/tmp 1777 root root -
D /tmp 1777 root root -
#q /var/tmp 1777 root root 30d

# Exclude namespace mountpoints created with PrivateTmp=yes
x /tmp/systemd-private-%b-*
X /tmp/systemd-private-%b-*/tmp
x /var/tmp/systemd-private-%b-*
X /var/tmp/systemd-private-%b-*/tmp
for some reason, by default, systemd doesn't empty our /tmp folder like happens with our sysVinit configuration, leading to a never ending buildup of pulseaudio checkfiles, among other things. you are only impacted if you are using systemd for boot/init.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
Jerry3904
Administrator
Posts: 21932
Joined: Wed Jul 19, 2006 6:13 am

Re: systemd and /tmp

#2 Post by Jerry3904 »

Good one to add to the Wiki, doing it now.
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

Post Reply

Return to “Tips & Tricks by users”