如何将 Nemo 设置为 Ubuntu 中的默认文件管理器?

r.b*_*igi 11 nautilus filemanager nemo

我刚刚安装了 Ubuntu,我想用 Nemo 替换 nautilus。我首先使用以下命令安装了 Nemo:

sudo add-apt-repository ppa:embrosyn/cinnamon
sudo apt-get update
sudo apt-get install nemo
Run Code Online (Sandbox Code Playgroud)

然后我使用以下命令将 Nemo 设置为默认文件管理器:

xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
gsettings set org.gnome.desktop.background show-desktop-icons false
gsettings set org.nemo.desktop show-desktop-icons true
Run Code Online (Sandbox Code Playgroud)

我从这篇文章中学到了这些命令。但是,我收到以下错误:

> GLib-GIO-Message: 15:22:17.302: Using the 'memory' GSettings backend. 
> Your settings will not be saved or shared with other applications.
Run Code Online (Sandbox Code Playgroud)

编辑:

我找到了解决此错误的方法,可以在下面的答案中找到。接受的答案提供了一组更新的说明,使 Nemo 成为最新版本的 Ubuntu(撰写本文时为 18.04+)中的默认文件管理器。

Gab*_*les 18

如果您的问题是您安装了 Anaconda 并且它更改了您~/.bashrc文件中的某些内容,请阅读OP 的此答案

否则,这是我关于...的一般说明

如何安装 Nemo 并将其设置为 Ubuntu 18.04、20.04 等的默认文件管理器:

  • 在运行默认 Gnome 桌面的 Ubuntu 18.04 中进行了全面测试。
    • 2020 年 8 月 8 日更新:也在 Ubuntu 20.04 中得到验证。
  • 为什么使用nemonautilus?查看最后的几个屏幕截图,显示了空间和功能的大量使用nemo

这对我有用https : //itsfoss.com/install-nemo-file-manager-ubuntu/

要使用 Nemo 而不是 Nautilus 作为默认文件管理器,包括管理桌面图标,请执行以下操作:

sudo apt update
sudo apt install nemo
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
gsettings set org.gnome.desktop.background show-desktop-icons false
gsettings set org.nemo.desktop show-desktop-icons true

# Then also install these tools so we can adjust some settings next
sudo apt install dconf-editor gnome-tweak-tool

# Start up the nemo desktop to allow nemo to control the desktop icons too
nemo-desktop&  # We use `&` here to run it in the background
Run Code Online (Sandbox Code Playgroud)

[也为 Ubuntu 20.04 或更高版本开始执行此操作]
(我不记得 Ubuntu 18.04 是否也需要这样做,但我必须在 Ubuntu 20.04 上执行此操作)

在 UBUNTU 20.04 上,您还必须使用sudo apt install gnome-tweak-tool. 按您的Super键(WindowsPC 键盘上的键,或Command运行 Linux 的 Mac 上的键),然后输入“扩展”,然后单击扩展程序:

在此处输入图片说明

在这个程序里面,点击滑块关闭“桌面图标”,如下图。这将关闭 nautilus 桌面图标,以便我们可以只使用 nemo 桌面图标。如果你不这样做,你会得到一个奇怪的桌面,其中有一些无法使用的 nautilus 桌面图标被可用的 nemo 桌面图标覆盖,如下几张图片所示。

在此处输入图片说明

这是我的桌面快照:

之前:(
显示叠加在现在无法使用的 nautilus 桌面之上的新激活的 nemo 桌面):

在此处输入图片说明

之后:(
现在只显示新激活的 nemo 桌面,默认的 Ubuntu gnome nautilus 桌面图标现在已禁用,如我所愿):

在此处输入图片说明

[也为 Ubuntu 20 或更高版本执行此操作 END]


现在将命令添加nemo-desktop到您的启动应用程序以在每次启动时打开 nemo 桌面图标。

在此处输入图片说明

重新启动(或只是注销然后重新登录)并运行xdg-open $HOME以确保它现在在 nemo 中打开您的主文件夹,而不是像以前那样在 nautilus 中打开。

设置 nemo 桌面图标:

如果您希望您的计算机、主页、垃圾箱等图标再次出现在您的桌​​面上(您可以在下面的屏幕截图中看到其中的一些),请在此处查看Mark Greaves 的回答。用我自己的话来说:确保安装了dconf-editor

sudo apt install dconf-editor
Run Code Online (Sandbox Code Playgroud)

按您的Super键(WindowsPC 键盘上的键,或Command运行 Linux 的 Mac 上的键),然后输入“dconf editor”,然后单击程序:

在此处输入图片说明

导航到:org --> nemo--> desktop。您可以选择显示以下 5 项内容。启用您喜欢的任何一个。我建议您不要更改任何其他内容,除非您确切地知道自己在做什么:

  1. computer-icon-visile (我喜欢启用此功能 - 如下面的屏幕截图所示)
  2. home-icon-visible (我喜欢启用这个——显示在下面的屏幕截图中)
  3. 网络图标可见
  4. 垃圾图标可见
  5. 体积可见

在使用 Nemo 作为文件管理器时更改桌面图标大小

在 Ubuntu 18.04 中,只需右键单击桌面并转到Desktop --> Icon Size,如下所示:

在此处输入图片说明

在 Ubuntu 20.04 中,您必须右键单击桌面,然后转到“自定义”。它会弹出一个新窗口,如下所示。我强调了一些您可能想要自定义的内容。例如,其中之一是“图标大小”的下拉菜单。底部和右侧的滑块可分别用于调整水平和垂直桌面图标网格间距。

在此处输入图片说明

回到使用 Nautilus 而不是 Nemo:

xdg-mime default nautilus.desktop inode/directory application/x-gnome-saved-search
gsettings set org.gnome.desktop.background show-desktop-icons true
sudo apt purge nemo nemo*
sudo apt autoremove
Run Code Online (Sandbox Code Playgroud)

nemo-desktop从启动应用程序中删除该命令。

要选择在 Nautilus 中显示哪些桌面选项:

对于 Ubuntu 18.04,首先确保安装了 gnome-tweak-tool:

sudo apt install gnome-tweak-tool
Run Code Online (Sandbox Code Playgroud)

然后通过在开始菜单中搜索“调整”来打开它,然后转到左侧的 --> 桌面选项卡:

在此处输入图片说明

对于 Ubuntu 20.04,我相信 Nautilus 桌面图标只是由我之前在上面显示的“扩展”GUI 工具控制。

为什么要使用nemoUbuntu 的默认nautilus文件管理器?

这个很容易。看看 nemo 允许在紧凑视图中漂亮地利用空间。立即查看您可以看到的所有文件!

(请注意,此视图并未完全缩小。您仍然可以在仍然看到文件名的同时再缩小一次,然后再缩小一次以仅看到小图标)。我喜欢你能看到一切的紧凑程度!让这成为 GUI 文件管理器设计者的模型(Microsoft & Apple & Ubuntu/Nautilus,注意!:))

在此处输入图片说明

与 nautilus 文件管理器中可用的真正用户不友好和浪费空间的视图相比(在相同大小的窗口中查看同一目录):

  1. 图标视图(一直放大):
    在此处输入图片说明
  2. 或者,列表视图(一直放大): 在此处输入图片说明

太棒了,在我看来!相比之下,我几乎看不到任何文件,而且要找到东西要困难得多!

说够了。注意漂亮的地址栏,您也可以轻松地在 nemo 中输入。在 nautilus 中,您必须使用Ctrl+L才能看到要输入的地址栏。

故障排除:

如果您无法nemo成为Dash to Panel等工具使用的默认文件管理器,请尝试以下操作(未经测试):

  1. 在 repo 中搜索nautilus并手动将其替换为nemo. 在此处查看 Dash to Panel 源代码中对“nautilus”的搜索:https : //github.com/home-sweet-gnome/dash-to-panel/search? q=nautilus 。或者:

  2. 通过在 ~/bin 文件夹中创建一个名为“nautilus”的符号链接,让你的计算机nemonautilus运行时打开,但让它指向nemo!:

    mkdir -p ~/bin  # create ~/bin dir if it doesn't exist
    # see where the executable for nautilus is; sample output: `/usr/bin/nautilus`
    which nautilus  
    # see where the executable for nemo is; sample output: `/usr/bin/nemo`
    which nemo
    # create symlink to back nautilus path up; this allows running 
    # `nautilus_real` to run the real `nautilus`!
    ln -s /usr/bin/nautilus ~/bin/nautilus_real
    # create a new `nautilus` symlink to point to `nemo`; this means
    # that if you run `nautilus` it will actually run `nemo`!
    ln -s /usr/bin/nemo ~/bin/nautilus
    
    Run Code Online (Sandbox Code Playgroud)

    注销并重新登录。现在, runningnemo将运行 nemo, runningnautilus将 run nemo,而 runningnautilus_real将运行 nautilus。

    要撤消这些别名,只需删除上面刚刚创建的那两个符号链接:

    rm ~/bin/nautilus_real
    rm ~/bin/nautilus
    
    Run Code Online (Sandbox Code Playgroud)

有关的:

  1. 请注意,此答案已从此处移至此位置:更改默认文件管理器 Ubuntu 18.04
  2. 如何更改桌面图标大小?
  3. 如何显示垃圾箱和主文件夹图标?

您可能想要更改的其他内容:

  1. [我的回答]如何将“显示桌面”添加到 GNOME dash 或 Ubuntu Dock?
  2. [我的回答]如何在桌面上创建启动器?
  3. [我的回答]如何在 18.04 的角落捕捉窗口?
  4. [我的回答]永久修复 Chrome 滚动速度

  • 非常感谢这份精确而令人惊叹的指南! (3认同)

Gab*_*les 6

如何在 Ubuntu 22.04 中安装 Nemo 并将其设置为默认文件管理器(对于早期版本,请参阅此处):

  • 全面测试:
    1. Ubuntu 22.04 于 2022 年 12 月 19 日运行默认的 Gnome 桌面。
  • 为什么要用nemoover 呢nautilus请参阅我的其他答案末尾的几个屏幕截图,显示了空间和功能的巨大利用率nemo

要使用 Nemo 而不是 Nautilus 作为默认文件管理器(包括打开桌面图标),请执行以下操作:

对于 Ubuntu 22.04

我们将安装 nemo 并将其设为默认值,但与上面的 Ubuntu 18.04 和 20.04 说明不同,我们不会nemo 控制桌面图标(主要是因为我不知道如何禁用 Gnome 控制的桌面图标) )。相反,我们将简单地告诉 Gnome 在 nemo 而不是 nautilus 中打开它控制的桌面图标。

安装尼莫

sudo apt update
sudo apt install nemo

# Make `xdg-open` open up directories in nemo instead of nautilus
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
# Make Gnome-controlled directories and **icons on the desktop** open up in nemo
# now instead of in nautilus
gsettings set org.gnome.shell.extensions.ding use-nemo true

# Install a configuration tool we will use below
sudo apt install dconf-editor 

# (Optional, in case we want to try using this tool to tweak settings too) 
# Note: `gnome-tweaks` on Ubuntu 22.04 replaces `gnome-tweak-tool` on Ubuntu
# 18.04 and 20.04
sudo apt install gnome-tweaks
Run Code Online (Sandbox Code Playgroud)

设置桌面图标:

打开该dconf-editor工具,然后导航到org --> gnome--> shell --> extensions --> ding

打开底部的“use-nemo”选项以“使用 Nemo 打开文件夹”。

这是我当前的设置:

在此输入图像描述

请注意,您还可以在命令行中编辑这些设置。例子:

gsettings set org.gnome.shell.extensions.ding use-nemo true
gsettings set org.gnome.shell.extensions.ding show-home true
Run Code Online (Sandbox Code Playgroud)

...其中一些设置也可以通过主“设置”菜单访问。

示例:按下您的Super按键(WindowsPC 键盘上的按键,或Command运行 Linux 的 Mac 上的按键),然后输入“设置”。打开“设置”,然后转到“外观”选项卡。关闭“显示个人文件夹”选项以隐藏“主”文件夹,或者根据需要将其重新打开,如下所示:

在此输入图像描述

该设置直接链接到gsettings set org.gnome.shell.extensions.ding show-home true命令行和dconf-editor.

完成后重新启动以测试:

reboot
Run Code Online (Sandbox Code Playgroud)

测试更改:

# 1. Ensure `xdg-open` now opens up your home folder **in nemo**, and NOT in
# nautilus like it used to
xdg-open $HOME

# 2. double-click the Home dir or any folder icon on your desktop and ensure it
# opens up in nemo now instead of in nautilus too.
Run Code Online (Sandbox Code Playgroud)

注意事项和故障排除:

  1. 如果您在按上述方式启用其在桌面上显示后找不到预期的图标(例如“Home”文件夹),则它可能位于另一台显示器上!使用Windowskbd +最小化所有窗口D,然后在另一台显示器上查找丢失的图标。您可能需要右键单击桌面并转到“排列方式...”-->“保持排列...”,以自动排列它们。或者,手动将图标拖回到主显示器上您想要的位置。

  2. 如果 Nemo 文件管理器窗口左侧的书签已损坏并显示带有感叹号的黄色框,如下所示:

    在此输入图像描述

    ...那么这意味着那些书签已损坏。通过转到“书签”-->“编辑书签...”来修复它们,然后手动修复每个书签的“位置”(路径)字段。如果您更改了用户名和主目录,尤其会发生这种情况,如此处所示的操作方法

要更改桌面图标大小

使用常规设置下的“尺寸”选项。它可以在“设置”-->“外观”选项卡-->“桌面图标”部分-->“大小”参数下找到,如上面的最后一个屏幕截图所示。这是建议更改它的位置,但您也可以通过dconf-editor上面显示的屏幕上的 访问它,或者通过 命令行 访问它gsettings set org.gnome.shell.extensions.ding icon-size <size>,其中size显然是从 获得的范围中选择的枚举值gsettings range org.gnome.shell.extensions.ding icon-size

我喜欢在 Nemo 中设置的其他设置:

选择视图 --> 紧凑视图。还要确保查看 --> 状态栏被选中。这会显示窗口底部的状态栏。

然后转到编辑 --> 首选项 --> 视图选项卡 --> 将“默认视图”更改为“紧凑视图”,并将“紧凑视图默认值”“默认缩放级别”从 100% 减少到 66%,这样您就可以可以在紧凑视图中查看更多文件和文件夹。这是我在此选项卡中的设置:

在此输入图像描述

在“行为”选项卡下,选中“将文件移动到垃圾箱之前询问”框:

在此输入图像描述

通过转到“预览”选项卡并将文件大小从 1 MB 更改为 100 MB 左右,打开较大图像的图像缩略图预览:

在此输入图像描述

在“工具栏”选项卡下,打开“计算机”图标(未显示屏幕截图)。

在“上下文菜单”选项卡下,选中“建立链接”框(参见下面的屏幕截图)。这会在右键单击菜单中添加一个“创建链接”菜单选项,以便快速创建指向所选文件或文件夹的符号链接。

在此输入图像描述

要返回使用 Nautilus 而不是 Nemo:

# Make `xdg-open` open up directories in nautilus instead of nemo
xdg-mime default nautilus.desktop inode/directory application/x-gnome-saved-search
# Make Gnome-controlled directories and **icons on the desktop** open up in
# nautilus now instead of in nemo
gsettings set org.gnome.shell.extensions.ding use-nemo false

# (optional) do NOT run if you want to keep nemo as an extra file manager
sudo apt purge nemo nemo*

# (optional) do NOT run if you want to **keep** applications which were once
# dependencies of other applications, but no longer are; see `man apt` for
# details  
sudo apt autoremove

# Reboot to test, when done
reboot
Run Code Online (Sandbox Code Playgroud)

测试更改:

# 1. Ensure `xdg-open` now opens up your home folder **in nautilus**, and NOT in
# nemo like it did before
xdg-open $HOME

# 2. double-click the Home dir or any folder icon on your desktop and ensure it
# opens up in nautilus again now instead of in nemo.
Run Code Online (Sandbox Code Playgroud)

参考

  1. https://itsfoss.com/install-nemo-file-manager-ubuntu/
  2. 我如何学习如何更改 Ubuntu 22.04 的最新设置:请参阅此处的两个答案:How can I hide the homefolder icon from Ubuntu 22.04 Desktop


归档时间:

查看次数:

10498 次

最近记录:

4 年,1 月 前