ubuntu菜单添加应用_如何从Ubuntu的声音菜单中删除媒体播放器并添加自己的媒体播放器...

ubuntu菜单添加应用

ubuntu菜单添加应用_如何从Ubuntu的声音菜单中删除媒体播放器并添加自己的媒体播放器...

Ubuntu’s sound menu contains Rhythmbox by default. Any other media players you install will also appear in the menu, assuming they support the MPRIS2 specification. You can hide media players in the menu or add any application you like.

Ubuntu的声音菜单默认包含Rhythmbox。 您安装的任何其他媒体播放器也将显示在菜单中,前提是它们支持MPRIS2规范。 您可以在菜单中隐藏媒体播放器,或添加所需的任何应用程序。

Media players you add won’t have integrated playback controls, but you can easily launch them from the sound menu. You can add any application’s shortcut to the sound menu, as long as the application has a desktop file.

您添加的媒体播放器没有集成的播放控件,但是您可以从声音菜单轻松启动它们。 您可以将任何应用程序的快捷方式添加到声音菜单,只要该应用程序具有桌面文件即可。

图形方法 (Graphical Method)

The easiest way to modify your sound menu is with graphically, with the dconf-editor application. It isn’t installed by default — search for dconf in Ubuntu’s Software Center to install it.

修改声音菜单的最简单方法是使用dconf-editor应用程序以图形方式。 默认情况下未安装它-在Ubuntu软件中心搜索dconf进行安装。

ubuntu菜单添加应用_如何从Ubuntu的声音菜单中删除媒体播放器并添加自己的媒体播放器...

You can also do this with the gsettings terminal command included with Ubuntu — see the last section for instructions.

您也可以使用Ubuntu随附的gsettings terminal命令执行此操作-有关说明,请参阅最后一部分。

Launch dconf-editor from the Dash after installing it.

安装后,从Dash启动dconf-editor。

ubuntu菜单添加应用_如何从Ubuntu的声音菜单中删除媒体播放器并添加自己的媒体播放器...

Navigate to the com/canonical/indicator/sound section in the dconf-editor window.

导航到dconf-editor窗口中的com / canonical / indicator / sound部分。

ubuntu菜单添加应用_如何从Ubuntu的声音菜单中删除媒体播放器并添加自己的媒体播放器...

The interested-media-players setting contains a list of applications that will appear in the menu. The blacklisted-media-players setting can override the list of interested media players — blacklisted media players won’t appear in the menu, even if they’re in the list of interested media players.

感兴趣的媒体播放器设置包含将出现在菜单中的应用程序列表。 被列入黑名单的媒体播放器设置可以覆盖感兴趣的媒体播放器的列表-被列入黑名单的媒体播放器即使出现在感兴趣的媒体播放器的列表中也不会出现在菜单中。

For example, if you wanted to hide Rhythmbox from the menu, you could change the value of blacklisted-media-players to [‘rhythmbox’].

例如,如果您想从菜单中隐藏Rhythmbox,则可以将列入黑名单的媒体播放器的值更改为['rhythmbox']

ubuntu菜单添加应用_如何从Ubuntu的声音菜单中删除媒体播放器并添加自己的媒体播放器...

If you wanted to add VLC and Clementine to the sound menu, assuming they’re installed, you could change the value of interested-media-players to [‘rhythmbox’,’vlc’,’clementine’].

如果您想将VLC和Clementine添加到声音菜单(假设已安装),则可以将有兴趣的媒体播放器的值更改为['rhythmbox','vlc','clementine']

ubuntu菜单添加应用_如何从Ubuntu的声音菜单中删除媒体播放器并添加自己的媒体播放器...

A few quick notes:

快速注意事项:

  • Each value must contain the name of each application’s desktop file, not the application’s command itself. For example, vlc points to the vlc.desktop file that represents the application.

    每个值必须包含每个应用程序的桌面文件的名称,而不是应用程序的命令本身。 例如, vlc指向代表应用程序的vlc.desktop文件。

  • You can add any application with a .desktop file to the menu. Want to add your web browser to the list? Go ahead.

    您可以将任何带有.desktop文件的应用程序添加到菜单。 想要将您的网络浏览器添加到列表中? 前进。
ubuntu菜单添加应用_如何从Ubuntu的声音菜单中删除媒体播放器并添加自己的媒体播放器...

Your changes won’t appear until you log out and log back in.

在您注销并重新登录后,您的更改才会显示。

ubuntu菜单添加应用_如何从Ubuntu的声音菜单中删除媒体播放器并添加自己的媒体播放器...

终端方式 (Terminal Method)

The gsettings get and gsettings set commands allow you to view and manage these settings from a terminal.

使用gsettings getgsettings set命令可以从终端查看和管理这些设置。

Use the gsettings get command to view one of the values:

使用gsettings get命令查看以下值之一:

gsettings get com.canonical.indicator.sound interested-media-players gsettings get com.canonical.indicator.sound blacklisted-media-players

gsettings获得com.canonical.indicator.sound感兴趣的媒体播放器gsettings获得com.canonical.indicator.sound感兴趣的媒体播放器

ubuntu菜单添加应用_如何从Ubuntu的声音菜单中删除媒体播放器并添加自己的媒体播放器...

Use the gsettings set command to set the values. This command adds Rhythmbox to the blacklist, hiding it:

使用gsettings set命令设置值。 此命令将Rhythmbox添加到黑名单,将其隐藏:

gsettings set com.canonical.indicator.sound blacklisted-media-players “[‘rhythmbox’]”

设置com.canonical.indicator.sound列入黑名单的媒体播放器“ ['rhythmbox']”

This command adds VLC and Amarok to the sound menu:

此命令将VLC和Amarok添加到声音菜单:

gsettings set com.canonical.indicator.sound interested-media-players “[‘rhythmbox’, ‘vlc’, ‘amarok’]”

设置com.canonical.indicator.sound感兴趣的媒体播放器“ ['rhythmbox','vlc','amarok']”

Remember to log out and log back in after running these commands.

运行这些命令后,请记住注销并重新登录。

翻译自: https://www.howtogeek.com/113897/how-to-remove-media-players-from-ubuntus-sound-menu-add-your-own/

ubuntu菜单添加应用

相关文章:

  • 2022-12-23
  • 2021-09-11
  • 2021-10-19
  • 2022-01-09
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-21
猜你喜欢
  • 2021-12-10
  • 2022-12-23
  • 2021-09-16
  • 2021-10-18
  • 2021-05-10
  • 2021-12-28
  • 2022-12-23
相关资源
相似解决方案