Xfce – Make Nemo Handle the Desktop in Linux Mint

desktopnemothunarxfce

For the purpose detailed below uninstalling Thunar is not a solution. The behavior described below stays the same if Thunar is uninstalled. So, it is not Thunar as such that handles the Xfce desktop. So, when here I say "Thunar desktop" or "Thunar icons" (in relation to desktop icons) that should mean the Xfce desktop handler, whatever that is.


For various reasons I want to use Nemo as default file manager in Xfce (Mint 19.2). Just installing Nemo and making it the preferred file manager in exo-preferred-applications is not making Nemo handle the desktop too.

So, trying to make Nemo handle the desktop, I know that the needed command is nemo-desktop.

Simply running that at startup doesn't make it happen though, as seen when running the command in terminal

** (nemo-desktop:9781): WARNING **: 16:50:30.626: Desktop already managed by another application, skipping desktop setup.
To change this, modify org.nemo.desktop 'ignored-desktop-handlers'.

At this point nemo-desktop is not listed in running applications.

Going to dconf Editor, I have added ['thunar'] there. (The same effect as ['org.xfce.FileManager'] it seems; org.nemo.desktop show-desktop-icons which is specifically described as intended to "allow Nemo to manage the desktop" is marked as "Deprecated", and changing its value makes no difference.) At this point, if in (xfdesktop-settings) Desktop -> Icons -> Appearance -> Icon type is set to File/launcher icons, after restarting session the desktop shows desktop icons twice (once through Nemo-desktop, once through Xfce/Thunar desktop), with the Nemo icons on top, while those of Xfce/Thunar are not accessible.

This mix is bad, but at least confirms that nemo-desktop is running, as seen in the System Monitor list, and can be temporarily rectified by setting Desktop -> Icons -> Appearance -> Icon type to none. This gives me what I want, but only till the end of the session: all icons go away (as set in xfdesktop-settings) after restarting session. (This works for me sort of, as I rarely log out or restart, but simply suspend.)

Only if Desktop -> Icons -> Appearance -> Icon type is already set to File/launcher icons during session startup do the Nemo icons appear on the desktop. — Nemo follows the xfdesktop-settings that are in place at session startup, while changes made during session only affect Xfce/Thunar icons. (Nemo-desktop icons stay visible until logout even if xfdesktop-settings says differently.)

The solution would be to set Desktop -> Icons -> Appearance -> Icon type to File/launcher icons but to completely stop Xfce-desktop-manager (whichever that is, because it's not Thunar) from handling the desktop.

Best Answer

So, as said in the question, Thunar removal is not needed. (If it was removed, it can be re-installed; in Mint it's sudo apt install thunar mint-meta-xfce thunar thunar-archive-plugin thunar-media-tags-plugin thunar-volman xfce4-places-plugin.)

The whole problem is related to identifying the Xfce desktop manager.

I have received an answer to that question: it's xfdesktop.

It must run in Xfce in order to have a proper desktop; it shouldn't be stopped (withxfdesktop --quit) as suggested in the question, or the desktop loses wallpaper and compositing. But all problems mentioned in the question disappear as everything falls into place once xfdesktop program is specified correctly in gsettings: Nemo-desktop is the desktop manager associated with Nemo; it checks whether other desktop managers are running; if the case, nemo-desktop stops, except when such managers are specified in gsettings (maybe with dconf Editor) under org.nemo.desktop ignored-desktop-handlers.

So:

  • in terminal do gsettings set org.nemo.desktop ignored-desktop-handlers ['xfdesktop']

  • in xfdesktop-settings ('Desktop') go to Icons -> Appearance -> Icon type and set it to none

  • in 'Session and Startup' (xfce4-session-settings), 'Application autostart', add nemo-desktop

  • restart session


Other useful settings for Nemo in Xfce:

  • integrate with Thunar bulk rename: in Nemo, Edit > Preferences > Behavior > Bulk rename, enter thunar --bulk-rename

  • add custom actions with filemanager-actions (Filemanager-Actions Configurations Tool); details here

Related Question