I originally thought nemo-desktop
is for the whole GUI, it is not.
It's literally just that - a "desktop" app = it means it displays the icons on the desktop, nothing more. Not even the taskbar neither windows are tied to it...
This means it can be shutdown and restarted with no issues Resulting in reseting the RAM usage.
A. TL;DR Don't use the Desktop icons on the Desktop?
You can just nemo-desktop --quit
.
Don't worry, Nemo file manager and "display desktop" (Super+D) will still work the same ;-)
B. You need the Desktop icons
- Open the terminal
nemo-desktop --quit
- should end with "Killing nemo-desktop, as requested"
- wait a few seconds for it to kill the
nemo-desktop
process (the quit seems to be asynchronous)
nemo-desktop > /dev/null 2>&1 & disown nemo-desktop
(explanation below)
- That's ALL => you can now close the terminal (see explanation below)
Explanation of nemo-desktop > /dev/null 2>&1 & disown nemo-desktop
nemo-desktop
is rerunning the nemo-desktop
2>&1
is redirecting standard error(2) to the standard output(1)
- the
&
here means it's a special file for standard output and not just some text file called "1" (more info)
> /dev/null
is redirecting standard output to the oblivion (to null/nowhere)
&
in the middle means run the command in the background - allows to run other commands while this is running
the other command disown
unattaches the jobs/command runs from the current terminal - this allows us to close the terminal safely (5.) without the process we ran being killed
disown
doesn't need the job name, but it can be provided as I did (disown nemo-desktop
) to be more explicit and allow closing other attached jobs that you want to be closed when the terminal closes - but yes, to keep everything running it would just be disown
and you can use it independetly anytime before you close the terminal to keep everything running what you've ran.
Note - there is no sudo - nemo-desktop
is being run by normal user on purpose.
I am still not sure what is the root cause of the memory leak over time - since it's definitely not about thumbnails - I have cleared the thumbnail cache, set its settings to low size only and generally don't have that many thumbnail-related files. If this cause is resolved/found fix for any time in the future - feel free to comment or edit.