How to set root’s Nemo to "list view" default?

I am running Cinnamon (Nemo is default file manager) and Timeshift, all in the German locale.

Now Timeshift allows browsing snapshots:

  • opens Nemo in “elevated mode”
  • language (of Nemo) switches to English
  • icon view is default (I hate this, always set to list view)

When I try to to Edit → Preferences and try to select “list view”, it always jumps back to icon view immediately.

How can I permanently set options like default view for Nemo in “elevated mode”?

When I try to run sudo nemo from a terminal and then do the setting, this error msg appears:

(nemo:3001): dconf-WARNING **: 02:55:17.344: failed to commit changes to dconf: Fehler beim Erzeugen der Befehlszeile »dbus-launch --autolaunch=664531f55f9042f8a48ed91e9a322052 --binary-syntax --close-stderr«: Der Kindprozess wurde mit Status 1 beendet

In ~/.config/nemo are just bookmark-metadata and desktop-metadata, nothing useful in those.

Dont do this.
There is no reason any GUI application should ever be run as root or with sudo.
And a good deal many reasons why they should never be.

( ex: gaping security issues, accidentally fudging permissions, broken sourcing, etc )

Its possible what you have encountered previously is some version of GVFS which is safer.
Gnome Virtual File System would provide the admin:// prefix to more properly implement privilege escalation.

Now to your actual question - I dont have a clue really, sorry. :innocent:

Nemo is the only file manager I get along with so I know it well but not super duper.
It was kind of a bitch because I’m a moron.
See under View? you can set list. Do that for every single place you navigate to and eventually you ‘train’ it and you never have to do it again.
Like I said the hard ugly road worked for me because I won the war in the end.
But as I said I’m not the sharpest tool and there probably is a master setting in there that I did not bother to duckduckgo.

Odd. I tried

sudo su
gsettings set org.nemo.preferences default-folder-viewer 'list-view'

and I get the same error:

(process:4206): dconf-WARNING **: 03:40:32.219: failed to commit changes to dconf: Fehler beim Erzeugen der Befehlszeile »dbus-launch --autolaunch=664531f55f9042f8a48ed91e9a322052 --binary-syntax --close-stderr«: Der Kindprozess wurde mit Status 1 beendet

Where’s the culprit? Or what am I missing?

Getting the value works:

[root@toshi-mch matthias]# gsettings get org.nemo.preferences default-folder-viewer
'icon-view'

Setting the key also works as a user:

[matthias@toshi-mch ~]$ gsettings set org.nemo.preferences default-folder-viewer 'list-view'

Something I enjoy about Dolphin, when I was struggling a few years ago getting used to the Plasma way of doing things was that, instead of launching Dolphin as root, or installing some other more basic file browser that could be launched easily as root, I could hit F4 to pop up a terminal in that location.

I believe Nemo can do this, and you can configure a shortcut specifically for that (e.g. if Ctrl_Alt_T opens a terminal, then Ctrl_Alt_K could open a terminal in Nemo’s location).

It takes time to grow out of bad habits, just start now… then in a year or so you’ll start to sound like the rest of us.

Certainly, choosing sudo instead of pkexec raises questions about environment variables, like XDG_CONFIG_HOME which isn’t good. Maybe sudo -H nemo would ensure root’s home is used… but sudo is a bad choice.

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY might be better… isn’t this just getting too complicated already?

Okay, got it. Multiple causes/workarounds. (There’s a reason why one shouldn’t mess with GUI components as sudo …)

  • Need to launch dbus (using dbus-launch).
  • sudo seems not to set $HOME.

Working command, after these findings:

sudo -Hu root dbus-launch gsettings set org.nemo.preferences default-folder-viewer 'list-view'

Explanation:

  • Become root.
  • Set $HOME to user root’s home.
  • Launch dbus
  • Start gsettings to set the key default-folder-viewer in org.nemo.preferences, to the value list-view.

And bingo: Timeshift (and others) start Nemo “elevated” in list view mode!

Mission accomplished.

I was suprised by the extension, “nemo-terminal”..It integrates into nemo, and provides a terminal for what ever folder you are in. No need for any kb shortcuts or extra clicks.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.