Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| scripting_pcmanfm [2025/10/27 19:32] – final + examples crcerror | scripting_pcmanfm [2025/10/29 20:35] (current) – Some juggling with text crcerror | ||
|---|---|---|---|
| Line 10: | Line 10: | ||
| * ''/ | * ''/ | ||
| - | The corrospending user-space space for actions, desktop applets and default MIME are stored in: | + | The corrospending user-space for actions, desktop applets and default MIME are stored in: |
| * ''/ | * ''/ | ||
| * ''/ | * ''/ | ||
| Line 17: | Line 17: | ||
| ===== MIME types ===== | ===== MIME types ===== | ||
| - | Unlike Windows systems, it is much less common in Linux to identify files by their ‘file extensions’. Instead, the operating system recognises the file type based on file permissions and metadata, not just the extension. However, common file extensions are still used for organisation and compatibility, | + | Unlike Windows systems, it is much less common in Linux to identify files by the ‘file extensions’. Instead, the operating system recognises the file type based on file permissions and metadata, not just the extension. However, common file extensions are still used for organisation and compatibility, |
| - | So yes, we are talking about MIME (aka Multipurpose Internet Mail Extensions) types, rather then file extenions. Best praxis to determine the MIME-type that PCManFM uses is, if you just right-click the file and then read it' | + | So yes, we are talking about MIME (aka Multipurpose Internet Mail Extensions) types, rather then file extenions. Best praxis to determine the MIME-type that PCManFM uses is, if you just right-click the file and then read its properties. Or you can just select the file and you'll the file-description into the down-left corner of the filemanager. Valid descriptions are '' |
| ===== Link a MIME type to an application (manual) ===== | ===== Link a MIME type to an application (manual) ===== | ||
| - | You doubleclick | + | Doubleclick |
| **Important steps: | **Important steps: | ||
| - | - Fill in Application name (name it as you like) | + | - Fill: Application name (free selectable, |
| - | - tick: Set selected application as default for this file type | + | - Tick: Set selected application as default for this file type |
| - | So the needed | + | All data is set to: ''/ |
| < | < | ||
| Line 36: | Line 36: | ||
| </ | </ | ||
| - | So you see: I associated | + | So you see: Associated |
| The **.desktop**-file contains all the additional data and can be found in ''/ | The **.desktop**-file contains all the additional data and can be found in ''/ | ||
| Line 111: | Line 111: | ||
| * '' | * '' | ||
| * '' | * '' | ||
| - | |||
| - | |||
| ==== PCManFM creating an entry in Contextmenu and using Cascaded Contextmenus ==== | ==== PCManFM creating an entry in Contextmenu and using Cascaded Contextmenus ==== | ||
| Line 120: | Line 118: | ||
| If you place your **.desktop** files to ''/ | If you place your **.desktop** files to ''/ | ||
| - | < | + | < |
| [Desktop Entry] | [Desktop Entry] | ||
| Type=Action | Type=Action | ||
| Line 133: | Line 131: | ||
| === Creating a Cascaded Contextmenu === | === Creating a Cascaded Contextmenu === | ||
| - | Again, just change the Type you want to descripe into the **.desktop** file and use **Type=Menu** - rather undocumented it seems not to work to set the Name only instead use **Tooltip** to get the name readable. Then arrange | + | Again, just change the **Type** you want to descripe into the **.desktop** file and use **Type=Menu** - rather undocumented it seems not to work to set the Name only instead use **Tooltip** to get the entry visible into the context menu. Then just enter the **.desktop**-files you want into your **ItemList** (remember, only the one placed in the DIR '' |
| - | < | + | < |
| [Desktop Entry] | [Desktop Entry] | ||
| Type=Menu | Type=Menu | ||
| Line 150: | Line 148: | ||
| Here you see how PCManFMs internal parametes are used. '' | Here you see how PCManFMs internal parametes are used. '' | ||
| - | < | + | **Destination: |
| + | |||
| + | < | ||
| [Desktop Entry] | [Desktop Entry] | ||
| Type=Action | Type=Action | ||
| Name=Toggle filenames upper-/ | Name=Toggle filenames upper-/ | ||
| - | Profiles=Desktop | + | Profiles=Batocera |
| SelectionCount=< | SelectionCount=< | ||
| - | [X-Action-Profile | + | [X-Action-Profile |
| MimeTypes=all/ | MimeTypes=all/ | ||
| Exec=bash -c "cd %d; [[ %b =~ [A-Z] ]] && { for f in %B; do mv \" | Exec=bash -c "cd %d; [[ %b =~ [A-Z] ]] && { for f in %B; do mv \" | ||
| + | </ | ||
| + | |||
| + | === Create WINE autorun.cmd === | ||
| + | |||
| + | You enter the gamefolder and click on a windows-exe-file. From there select '' | ||
| + | |||
| + | * p1 = Location of all wine-games | ||
| + | * p2 = Directory of our current EXE | ||
| + | * p3 = Windows game directoy itself | ||
| + | |||
| + | So with clever subtrating the strings you can extract all data you need and you are able to write back the needed data to '' | ||
| + | |||
| + | **Destination: | ||
| + | |||
| + | <code bash| wine.create-autorun.desktop> | ||
| + | [Desktop Entry] | ||
| + | Type=Action | ||
| + | Name=Create autorun.cmd | ||
| + | Folders=/ | ||
| + | Profiles=Batocera | ||
| + | SelectionCount==1 | ||
| + | |||
| + | [X-Action-Profile Batocera] | ||
| + | MimeTypes=application/ | ||
| + | Exec=bash -c " | ||
| </ | </ | ||
- scripting_pcmanfm.1761593557.txt.gz
- Last modified: 6 months ago
- by crcerror