L. *_*mes 17 gnome-terminal nemo
我意识到 Nemo 右键单击“在终端中打开”的默认设置是启动“gnome-terminal”,但是,我的安装是打开“xfce4-terminal”。
不久前,当“gnome-terminal”被破坏时,我安装了“xfce4-terminal”作为替代。我将系统范围的默认设置配置为为终端调用“xfce4-terminal”。
在解决 Gnome 终端的问题后,我将系统范围的默认设置移回了 Gnome 终端。Nautilus 再次开始使用 Gnome 终端,但是Nemo继续只启动“xfce4-terminal”。
我卸载了“xfce4-terminal”,然后 Nemo 的“在终端中打开”功能停止工作。
为了解决这个问题,我做了以下工作:
Nemo still will only launch "xfce4-terminal". It appears to be a problem with in my home folder's Nemo configuration or some other per user cache.
Creating a new user, and Nemo properly launches "Gnome-Terminal".
Can someone help me with where to check and fix Nemo's functionality in my '/home/username` settings.
Is there some type of editible configuration to check what happens when clicking on the "Open in Terminal" function?
小智 29
谷歌把我带到这里,所以我正在恢复这个线程,希望至少让一个人免于一些不必要的麻烦。
我正在使用 Debian,这里 LD James 的建议对我不起作用。所以我查看了 Nemo 的源代码,在nemo-global-preferences.c 的第 132 行我发现(上游)配置模式如下:
org.cinnamon.desktop.default-applications.terminal
我使用 Nemo 作为 Nautilus 的替代品,并且由于我使用的是 Gnome3 而不是 Cinnamon,对我来说这个模式甚至不存在。因此,我使用以下命令创建了它。发出此命令后,“在终端中打开”操作将gnome-shell
在正确的目录中打开:
gsettings set org.cinnamon.desktop.default-applications.terminal exec gnome-shell
Run Code Online (Sandbox Code Playgroud)
只需将gnome-shell
命令替换为您想使用的任何终端即可。例如:对于gnome-terminal
,使用:
gsettings set org.cinnamon.desktop.default-applications.terminal exec gnome-terminal
Run Code Online (Sandbox Code Playgroud)
对于terminator
( sudo apt install terminator
) 使用:
gsettings set org.cinnamon.desktop.default-applications.terminal exec terminator
Run Code Online (Sandbox Code Playgroud)
L. *_*mes 17
Nemo 使用 gsettings 配置。这恢复了预期的行为:
$ gsettings set org.gnome.desktop.default-applications.terminal exec gnome-terminal
Run Code Online (Sandbox Code Playgroud)
在 Ubuntu 上,出于某种原因,情况有所不同:
$ gsettings set org.cinnamon.desktop.default-applications.terminal exec gnome-terminal
Run Code Online (Sandbox Code Playgroud)
小智 6
在 Xubuntu 18.10 这对我有帮助(我使用 sakura 作为终端):
$ gsettings set org.cinnamon.desktop.default-applications.terminal exec sakura
Run Code Online (Sandbox Code Playgroud)
如果您不想替换,而是在右键菜单中添加“在终结者中打开” ,
\n/home/$USER/.local/share/nemo/actions
文件夹,open_in_terminator.nemo_action
文件:\n[Nemo Action]\n\nName=Open in Terminator\nComment=Open the \'terminator\' terminal in the selected folder\nExec=terminator --working-directory=%F\nIcon-Name=terminator\nSelection=any\nExtensions=dir;\nEscapeSpaces=true\n
Run Code Online (Sandbox Code Playgroud)\n添加完上述文件后,关闭并重新打开 Nemo。
\n现在右键菜单截图:
\n\n来自加布里埃尔·斯台普斯 (Gabriel Staples),在这里:
\n\n\n不要忘记
\nEscapeSpaces=true
,否则“在终结者中打开”操作将无法在其路径中包含空格、单引号 (\'
) 或双引号 ("
) 的任何文件夹上运行。
旧的官方文档(仍然适用于nemo
可以安装在 Ubuntu 22.04 上的版本)说:
\n\nRun Code Online (Sandbox Code Playgroud)\n# Escape Spaces - set to true to escape spaces in filenames and uris ($U, $F, $P, $D)\n#\n# Sometimes this may be preferred to getting raw filenames that must be enclosed in\n# quotes.\n#\n# Optional - by default this is false\n\nEscapeSpaces=true\n
新文档称该字段已被弃用,并且在 Nemo 的未来版本中不会执行任何操作:
\n\n\nRun Code Online (Sandbox Code Playgroud)\n# Escape Spaces (deprecated)\n#\n# This field is deprecated and does nothing - paths with spaces, as well as other special\n# shell characters, will now be passed on correctly no matter what, even when Quote is not set.\n#\n# Optional - by default this is false\n\n#EscapeSpaces=true\n
归档时间: |
|
查看次数: |
21953 次 |
最近记录: |