如何更改 Unity 面板上的桌面名称?

tan*_*.01 21 panel unity rename

在此处输入图片说明

如何通过 Unity 面板将我的桌面名称从Ubuntu 桌面更改为XYZ 的桌面

小智 36

通过滥用 gettext 翻译系统,有一种比doug 的方法更快的方法。假设您使用的是英语语言环境:

#Make a temporary text file using vim/gedit/cat/whatever
cat > /tmp/foo.po
msgid "Ubuntu Desktop"
msgstr "A Badger With A Gun"
^D

cd /usr/share/locale/en/LC_MESSAGES
sudo msgfmt -o unity.mo /tmp/foo.po
Run Code Online (Sandbox Code Playgroud)

然后,要么注销并重新登录,要么直接执行:

unity --replace
Run Code Online (Sandbox Code Playgroud)

  • 我不建议使用 `unity --replace`,它使我的界面无法使用。虽然注销并重新登录工作正常。此外,对 `msgstr` 使用空字符串不起作用。您必须使用空格作为字符串(例如“”)才能删除消息。 (2认同)

dou*_*oug 13

您可能需要构建unity 或 unity-2d 源。目前,在 unity-5.12 中,可以在/plugins/unityshell/src/PanelMenuView.cpp第 78 行中找到它:

 _desktop_name(_("Ubuntu Desktop"))
Run Code Online (Sandbox Code Playgroud)

在 unity-2d, unity-2d 5.12: 中/panel/applets/appname/appnameapplet.cpp,第 369 行:

d->m_label->setText(u2dTr("Ubuntu Desktop"));
Run Code Online (Sandbox Code Playgroud)