How can I learn the command which will start an application in Unity's 'System Settings' from the command line?
Solution 1:
The details are all in a setting's *.desktop
file.
- Go to the directory
/usr/share/applications
. - Find the
*.desktop
file for the setting you are interested in. - Open the file in
gedit
.
For example, to open Brightness and Lock I used the command below.gedit '/usr/share/applications/gnome-screen-panel.desktop'
The content of the file gnome-screen-panel.desktop
is shown below. The fourth line in the file, Exec=gnome-control-center screen
, shows that the terminal command to open the Brightness and Lock settings windows is 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