Difference between revisions of "Cinnamon Desktop"
m (→shell aka right click) |
m (→main menu) |
||
(10 intermediate revisions by one user not shown) | |||
Line 23: | Line 23: | ||
cinnamon-menu-editor | cinnamon-menu-editor | ||
This is verified to work in Cinnamon version 5.6.8 | This is verified to work in Cinnamon version 5.6.8 | ||
+ | |||
+ | Using CLI you can change the name of a software in the main menu by editing the .desktop file in "/usr/share/applications" and presumably also "~/.local/share/applications". For example, to change the name "GNU Image Manipulation Program" to "Gimp" (as it used to be labeled in the menu) you can simply edit the file | ||
+ | sudo vi /usr/share/applications/gimp.desktop | ||
+ | and change the line | ||
+ | Name=GNU Image Manipulation Program | ||
+ | to | ||
+ | Name=Gimp | ||
+ | The format of .desktop is consistent. The name parameter is under the heading "[Desktop Entry]" | ||
+ | |||
+ | More on creating .desktop files to add entries in the menu, or removing .desktop files to delete entries. Also, .desktop files in "~/.local/share/applications" are specific to a user, while those in "/usr/share/applications" are system wide for all users. | ||
+ | |||
+ | Two ways to make edits have been demonstrated, one using a GUI utility and another by directly editing, adding, or removing .desktop files in the CLI. | ||
=== shell aka right click === | === shell aka right click === | ||
Things such as the Open and Open With... options in the right-click shell menu can be edited. Adding items is simpler than removing, that is to say removing an application open with option without completely uninstalling the software. | Things such as the Open and Open With... options in the right-click shell menu can be edited. Adding items is simpler than removing, that is to say removing an application open with option without completely uninstalling the software. | ||
+ | |||
+ | The procedure is different for Nemo versus PCManFM. Nemo is the default file manager. PCManFM is a recommended alternative file manager. | ||
+ | |||
+ | You can make custom .desktop files associated with actions with either if you right click --> 'Open with', which allows you to add items. Removal is more complicated. It involves mime types and .desktop files. | ||
+ | |||
+ | The following configuration paths are involved | ||
+ | * ~/.local/share/applications | ||
+ | * /usr/share/applications | ||
+ | |||
+ | Example of how to do this, in theory, for PCManFM | ||
+ | |||
+ | 1. add a file ~/.local/share/file-manager/actions/happyprogram.desktop | ||
+ | |||
+ | 2. edit happyprogram.desktop to include | ||
+ | [Desktop Entry] | ||
+ | Type=Action | ||
+ | Tooltip=Program that forces user to be happy | ||
+ | Name=Make You Happy | ||
+ | [X-Action-Profile profile-zero] | ||
+ | MimeTypes=inode/directory | ||
+ | Exec=/path/to/happyprogram.sh -s %f | ||
+ | |||
+ | === desktop === | ||
+ | see "update-desktop-database" | ||
+ | |||
+ | === custom actions === | ||
+ | Define the custom action by writing the lines you can see below in the ~/.local/share/file-manager/actions/kepubify.desktop file (the name is completely arbitrary). | ||
+ | |||
+ | Notice the Type key, and assigned the “Action” value to it. Use the Name key to specify a label for the action. The Profiles key is used to specify the list of the profiles associated with the action. Each profile related to an action is defined in the [X-Action-Profile <profile-id>]. | ||
+ | |||
+ | The first key, Mimetypes, is used to provide the (semi-colon separated) list of mime-types the action should be applied to. | ||
+ | |||
+ | == Curiosities == | ||
+ | === Is it libfm to blame? === | ||
+ | When viewing the path | ||
+ | /usr/share/applications | ||
+ | with the CLI you will see all of the various files ending in the .desktop extension. However, if you view the same path with Nemo or PCManFM, you will see something entirely different. You do not see the actual filenames! The file manager actually parses the text in each .desktop file and displays the contents of the parameter "Name=" within "[Desktop Entry]" as if it were the actual filename! This sucks and smells very Microsoft like "protect the dumb end user from seeing what is really behind the curtain." This is even the cause when you launch Nemo or PCManFM as root. | ||
+ | * reference: [https://github.com/lxqt/pcmanfm-qt/issues/472 Github Issue: Add an option for showing filenames of desktop files #472] | ||
+ | Verified that SpaceFM 1.0.6 shows the actual filenames. Nemo and PCManFM do not. | ||
== Related == | == Related == |
Latest revision as of 21:51, 23 October 2024
Cinnamon is a free and open-source desktop environment by the Linux Mint team with a traditional and easy to navigate design model and is similar to the Xfce, MATE, and GNOME 2. Cinnamon was a product of dissatisfaction with GNOME team's abandonment of a traditional desktop experience in April 2011. Since October 2013 (version 2.0 onwards), Cinnamon is no longer a frontend on top of the GNOME desktop like Unity or GNOME Shell, but a discrete desktop environment in its own. Cinnamon is still built on GNOME technologies and uses GTK, however, it no longer requires GNOME itself to be installed.
There are some core features that all desktop environments try to fulfill while offering additional features. In the case of Cinnamon and MATE, both are inspired by GNOME 2, you can find a lot of similarities. Linux Mint Cinnamon features Nemo file manager. It’s a lightweight file manager and uses GNOME Terminal as the default terminal emulator.
Contents
Versions
- Linux Mint 17 ships with Cinnamon 2.2
- Linux Mint 21 ships with Cinnamon 5.4
To determine which version of Cinnamon Desktop you have on your Linux Mint installation do the following:
- From the System Information search for or click on “system info” in your system’s Mint Menu.
Menu Editing
Welcome to a weakness in Cinnamon and linux desktop environments in general, the complexity of trying to customize and edit system and shell menus. Cinnamon continues to mature and now seems to have a fairly easy to use GUI menu editor at least for the main system menu.
mintmenu is a MATE specific package. It (and Mozo) and preinstalled in a Cinnamon desktop as Cinnamon uses mate-panel to provide it's fallback session to give a usable desktop in the event of a Cinnamon crash.
Cinnamon panel applets are written in Cinnamon JavaScript - the stock ones found in /usr/share/cinnamon/applets are installed with the package cinnamon-common Cinnamon's menu editor is cinnamon-menu-editor
This might work on your version of cinnamon. From the command line type:
cinnamon-menu-editor
This is verified to work in Cinnamon version 5.6.8
Using CLI you can change the name of a software in the main menu by editing the .desktop file in "/usr/share/applications" and presumably also "~/.local/share/applications". For example, to change the name "GNU Image Manipulation Program" to "Gimp" (as it used to be labeled in the menu) you can simply edit the file
sudo vi /usr/share/applications/gimp.desktop
and change the line
Name=GNU Image Manipulation Program
to
Name=Gimp
The format of .desktop is consistent. The name parameter is under the heading "[Desktop Entry]"
More on creating .desktop files to add entries in the menu, or removing .desktop files to delete entries. Also, .desktop files in "~/.local/share/applications" are specific to a user, while those in "/usr/share/applications" are system wide for all users.
Two ways to make edits have been demonstrated, one using a GUI utility and another by directly editing, adding, or removing .desktop files in the CLI.
shell aka right click
Things such as the Open and Open With... options in the right-click shell menu can be edited. Adding items is simpler than removing, that is to say removing an application open with option without completely uninstalling the software.
The procedure is different for Nemo versus PCManFM. Nemo is the default file manager. PCManFM is a recommended alternative file manager.
You can make custom .desktop files associated with actions with either if you right click --> 'Open with', which allows you to add items. Removal is more complicated. It involves mime types and .desktop files.
The following configuration paths are involved
- ~/.local/share/applications
- /usr/share/applications
Example of how to do this, in theory, for PCManFM
1. add a file ~/.local/share/file-manager/actions/happyprogram.desktop
2. edit happyprogram.desktop to include
[Desktop Entry] Type=Action Tooltip=Program that forces user to be happy Name=Make You Happy [X-Action-Profile profile-zero] MimeTypes=inode/directory Exec=/path/to/happyprogram.sh -s %f
desktop
see "update-desktop-database"
custom actions
Define the custom action by writing the lines you can see below in the ~/.local/share/file-manager/actions/kepubify.desktop file (the name is completely arbitrary).
Notice the Type key, and assigned the “Action” value to it. Use the Name key to specify a label for the action. The Profiles key is used to specify the list of the profiles associated with the action. Each profile related to an action is defined in the [X-Action-Profile <profile-id>].
The first key, Mimetypes, is used to provide the (semi-colon separated) list of mime-types the action should be applied to.
Curiosities
Is it libfm to blame?
When viewing the path
/usr/share/applications
with the CLI you will see all of the various files ending in the .desktop extension. However, if you view the same path with Nemo or PCManFM, you will see something entirely different. You do not see the actual filenames! The file manager actually parses the text in each .desktop file and displays the contents of the parameter "Name=" within "[Desktop Entry]" as if it were the actual filename! This sucks and smells very Microsoft like "protect the dumb end user from seeing what is really behind the curtain." This is even the cause when you launch Nemo or PCManFM as root.
Verified that SpaceFM 1.0.6 shows the actual filenames. Nemo and PCManFM do not.