Talk:Cinnamon Desktop

From Free Knowledge Base- The DUCK Project: information for everyone
Revision as of 11:51, 10 November 2024 by Littleguy (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How do I add entries to PCManFM's right-click menu?

like this:

[MIME Cache]
inode/directory=qiv-usercreated-0.desktop

in ~/.local/share/applications, and a qiv.desktop in the very same folder. For record, for my qiv, this gives me:

[Desktop Entry]
Encoding=UTF-8
Name=Sildeshow (random, recursive)
Exec=qiv -Rrlfstmiu
MimeType=image/jpeg
Icon=exec
NoDisplay=false

Another example:

/home/photos/.local/share/applications/mimeinfo.cache

[MIME Cache]
inode/directory=lazyslideshow-usercreated-0.desktop;qiv-usercreated-0.desktop
application/x-shellscript=sh-usercreated-0.desktop
text/plain=leafpad-usercreated-0.desktop

.desktop files

lazyslideshow-usercreated-0.desktop
qiv-usercreated-0.desktop

2021 PCManFM right click menu and Open As Root

https://forums.raspberrypi.com/viewtopic.php?t=310734

You can start by right clicking an item, then click Open with ..., and choose "Custom Command Line" (instead of the picking from the normal list). Here you have to add an "Application name". Now there will be a file in /home/pi/.local/share/applications

PCManFM can be extended via custom actions

PCManFM can be extended via “custom actions”, which, on the appropriate cases, can be accessed in the context menu of the application. They are quite easy to write, since they follow the Desktop Entry Specification. Custom actions, and the conditions for their applications (e.g. on what files they should be applied, for example) are defined in files with the .desktop extension, placed under the ~/.local/share/file-manager/actions directory.

view actual filename of .desktop files

Technically, this is about a GLib function, namely g_file_info_get_display_name(). pcmanfm-qt uses GLib (IMO, this is one of its advantages over Dolphin) and inherits the display name, in contrast to the real name, for desktop files. It is possible to use g_file_info_get_name() everywhere. How this can be implemented as an option is another problem.

Using display name somewhere and real name elsewhere isn't an option.

Customizing the Cinnamon Main Menu

3 configuration files/folders:

  1. 1. /home/<user>/.local/share/applications -- This directory contains the .desktop files for the custom app icons displayed in the Main Menu.
  1. 2. /home/<user>/.local/share/desktop-directories -- This directory contains the files for the folders (default and custom) displayed in the Main Menu.
  1. 3. /home/<user>/.config/menus/cinnamon-applications.menu -- This is the main configuration file that organizes the display of the Main Menu and refers to the 2 preceding directories and their files.