如何从命令行学习将在Unity的“系统设置”中启动应用程序的命令?


9

如何发现Unity的“ 系统设置”应用程序之一的命令行名称(即实际位置)?例如,“ 用户帐户 ”,“ 备份 ”,“ 外观 ”等等?

我希望知道这一点,因此可以针对特定应用程序提交错误报告!

Answers:


7

详细信息全部在设置*.desktop文件中。

  • 转到目录/usr/share/applications
  • 查找所需*.desktop设置的文件。
  • 在中打开文件gedit

例如,要打开“ 亮度和锁定”,我使用了以下命令。
gedit '/usr/share/applications/gnome-screen-panel.desktop'

该文件的内容gnome-screen-panel.desktop如下所示。文件的第四行Exec=gnome-control-center screen显示打开“ 亮度和锁定”设置窗口的终端命令是gnome-control-center screen

[Desktop Entry]
Name=Brightness and Lock
Comment=Screen brightness and lock settings
Exec=gnome-control-center screen
Icon=system-lock-screen
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-PersonalSettings
OnlyShowIn=GNOME;Unity;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-control-center
X-GNOME-Bugzilla-Component=screen
X-GNOME-Bugzilla-Version=3.4.1
X-GNOME-Settings-Panel=screen
# Translators: those are keywords for the brightness and lock control-center panel
Keywords=Brightness;Lock;Dim;Blank;Monitor;
X-Ubuntu-Gettext-Domain=gnome-control-center-2.0

1
FWIW,无需费心gksudo仅查看文件内容。您可以使用gedit而不用麻烦输入密码。
非理性的约翰

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.