Revision [20488]
This is an old revision of ApplicationEntry made by darkcity on 2012-02-06 10:16:05.
How to make File Associations
There are two ways to associate file-types in Puppy. The first is the by setting the 'default action' when clicking a certain file type. The second is creating an option in the File 'filename' menu when file is 'right-clicked'.
'Right-click' Association
MIME-Types are used to standardised file-types. The 'Right-click' options are stored in
/root/.config/rox.sourceforge.net/OpenWith
There is a directory for each mime-type in use, for example the MIME-Type directory for image/jpeg becomes .image_jpeg
A shortcut for getting to this directory is to right-click on a jpeg and select
File 'filename.jpg' > Customise Menu ...
Typically the MIME-type directories are filled with links to ROX AppDirs stored at /usr/local/apps
If the application/action you want is already in this directory simply create a link in the MIME-type directory.
If not then create an AppDir. They consist of a directory containing three files-
Appinfo.xml - information about app in xml
AppRun - script to run program
.DirIcon - image file icon for directory
These typically contain the following - using AbiWord as an example-
Appinfo.xml -
<?xml version="1.0"?> <AppInfo> <Summary>Abiword text editor</Summary> </AppInfo>
AppRun -
#!/bin/sh exec abiword "$@"
The "S@" typically passes file clicked on to the app.
To pass a file to a WINE program see the follow example with Irfanview
#!/bin/sh # Purpose: To convert Unix filename to DOS style to pass as an argument # to wine when starting IrfanView from filer. # FileName="z:"${1//\//\\} exec wine 'C:\\Program Files\\IrfanView\\i_view32.exe' $FileName
""AppDirs"" on ROX desktop - in Puppy AppDirs are only used for file associations rather than containing the whole apps