Revision history for AssociateFiles


Revision [30243]

Last edited on 2014-07-20 06:05:19 by darkcity
Additions:
==Also on the Wiki==
==Related Webpages==
----
==Categories==
CategoryFilesystem
CategoryComponent
CategoryTutorial
Deletions:
==Related Pages==


Revision [30241]

Edited on 2014-07-20 06:03:25 by darkcity
Additions:
~[[HowToAddMIMEType|How To Add MIME-Type]]
Deletions:
~[[HowToAddMIMEType How To Add MIME-Type]]


Revision [30240]

Edited on 2014-07-20 06:03:05 by darkcity
Additions:
---
---
---
---
---
---
~[[HowToAddMIMEType How To Add MIME-Type]]


Revision [22131]

Edited on 2012-07-09 16:52:42 by darkcity
Additions:
~Typically, the file is a script file or a link to an executable. Often, it is a link to a program's [[AppsDesktop .Desktop]] stored in ##/usr/share/applications##.
~Right-click association loads the file into a program chosen from the 'right-click File menu' - //Right-clicks menu > File 'document.doc' > Doc program//
~The options in the menu depend on its [[InternetMediaTypes MIME-type]]. ROX will list any file in the directory named after the MIME-type in ##~/.config/rox.sourceforge.net/MIME-types/[MIME-type directory]##
~For example, if the MIME-Type is ##audio/mpeg##
~then [[ROXFiler ROX]] will list the file in the directory called ##.audio_mpeg## (notice the ##.## at the start and the ##/## is replaced by an ##_##).
~Typically, the files are script files or links to an executables. Often, they are links to a program's [[AppsDesktop .Desktop]] stored in ##/usr/share/applications##.
~ROX provides a graphical way to set Right-click Association:
~{{image width="200" url="http://murga-linux.com/puppy/viewtopic.php?mode=attach&id=57238" link="http://murga-linux.com/puppy/viewtopic.php?mode=attach&id=57238"}}
~Open-with Association allows a program to open any file. It is accessed by the 'right-click File menu' - //Right-clicks menu > File 'document.doc' > Open With//
~The options in the menu depend on the files (not the folders) in the directory ##~/.config/rox.sourceforge.net/MIME-types/##
~Typically, the files are script files or links to an executables. Often, they are links to a program's [[AppsDesktop .Desktop]] stored in ##/usr/share/applications##.
~ROX provides a graphical way to set Open-With Association:
~{{image width="200" url="http://murga-linux.com/puppy/viewtopic.php?mode=attach&id=57237" link="http://murga-linux.com/puppy/viewtopic.php?mode=attach&id=57237"}}
Deletions:
~Typically this file is a script of a link to an executable. Often it is a link to a program's [[AppsDesktop .Desktop]] stored in ##/usr/share/applications##.
~Right-click Association loads the program when the user goes - //Right-clicks menu > File 'document.doc' > Doc program//
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 making a 'right-click' association** is in the example of a jpeg, 'right click' on a jpeg file and select
~//File 'filename.jpg' > Customise Menu ...//
~Open /usr/local/apps and copy an absolute link of the program you wish to associate
=='Default Action' Association==
To set the 'default action' of a file-type follow the following instructions (modified from [[http://www.murga-linux.com/puppy/viewtopic.php?p=363990 this thread]]). **Jump to Step 3 if you wish to associate with program already installed.**
**1.** Check if your file-type has a MIME-type entry in Puppy Linux. They are stored in the text file ##/usr/share/mime/globs##
If file-type is already associated to the correct MIME-type jump to step 2.
~Add or edit your MIME-Type to file-type definition. For example, if you have a TextMaker file whose extension is ##.tmd## and your making a non-standard MIME-type ##application/x-tmd## append the code ##:*.tmd## to the globs file. ENSURE you end the line with a 'return' otherwise it won't work.
**2.** Create an executable shell script in ##/usr/local/bin## , for starting up the TextMaker program and passing the 'clicked on' file to it. In our example, .tmd files will be associated to TextMaker. We'll make a script called ##textmaker## (though it could be anything you like):
textmaker -
%%
#!/bin/sh
exec /usr/local/textmaker/tml "$@"
%%
You don't need the path to the executable (in this case ##/usr/local/textmaker/##) if the path directory your Linux [[PATH]] environment variable.
~~If textmaker was a [[WINE]] program then the script might be-
~~ textmaker -
~~ %%#!/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\\TextMaker\\TextMaker.exe' $FileName%%
**3.** Finally, tell the ROX filer to run that script when you click on your file-type. To do that you create another script in ##/root/Choices/MIME-types## named after the MIME-type. In our example the MIME type was application/x-tmd, so the file becomes ##application_x-tmd##-
application_x-tmd
%%#!/bin/sh
exec textmaker "$1"%%
~**An easy way to associate a file-type with a program** is (instead of step 3). is to use 'Set Run Action' i.e right click on a file of your type and enter the shell command/ or drag program on to box. In our example it would be ##exec textmaker "$1"##.


Revision [22130]

Edited on 2012-07-09 16:14:09 by darkcity
Additions:
~ROX provides a graphical way to set Default-Action:
~{{image width="200" url="http://murga-linux.com/puppy/viewtopic.php?mode=attach&id=57236" link="http://murga-linux.com/puppy/viewtopic.php?mode=attach&id=57236"}}
Deletions:
~ROX provides a graphical way to set Default-Action


Revision [22129]

Edited on 2012-07-09 15:38:12 by darkcity
Additions:
~For example, if the MIME-Type is ##application/x-audacity-project##
Deletions:
~For example, if the MIME-Type is ##application_x/audacity-project##


Revision [22128]

Edited on 2012-07-09 15:30:33 by darkcity
Additions:
~Add or edit your MIME-Type to file-type definition. For example, if you have a TextMaker file whose extension is ##.tmd## and your making a non-standard MIME-type ##application/x-tmd## append the code ##:*.tmd## to the globs file. ENSURE you end the line with a 'return' otherwise it won't work.
~[[ROXApplicationDirectory ROX Application Directory]] - special ROX desktop environment directory
~[[http://www.murga-linux.com/puppy/viewtopic.php?p=363429#363429 Example involving two MS applications running over wine, thread]]
~[[http://www.murga-linux.com/puppy/viewtopic.php?p=363990 How to add a new MIME-type (file extension type) thread]]
~[[http://theinfamousj.tumblr.com/post/13433505685/puppy-linux-adding-new-mime-filetypes adding MIME type on tumblr (with pics and icons)]]
Deletions:
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 (many apps have an icon stored in ##/usr/share/pixmaps## which you can link)
These typically contain the following - using [[AbiWord]] as an example-
Appinfo.xml -
%%<?xml version="1.0"?>
<AppInfo>
<Summary>Abiword text editor</Summary>
</AppInfo>%%
""AppRun"" -
exec abiword "$@"%%
The ##"S@"## passes the file clicked on to the application.
To pass a file to a [[WINE]] program see the follow example using Irfanview

~ ""AppRun"" -
~ %%#!/bin/sh
exec wine 'C:\\Program Files\\IrfanView\\i_view32.exe' $FileName%%
~Add or edit your MIME-Type to file-type definition. For example, if you have a TextMaker file whose extension is ##.tmd## and your making a non-standard MIME-type ##application/x-tmd## append the code ##application/x-tmd:*.tmd## to the globs file. ENSURE you end the line with a 'return' otherwise it won't work.
~(The x- in the MIME-type name above is used to indicate that this type hasn't already been registered with the MIME-type authorities ([[www.iana.org/assignments/media-types/ media-types]]). i.e. It is a non-standard/private/local type, not an IANA officially registered one.)
~NOTE this alternative will save MIME-Type run action in ##/root/.config/rox.sourceforge.net/MIME-types## rather than ##/root/Choices/MIME-types##. This method will take precedence over using ##/root/Choices/MIME-types## (i.e. ROX looks to ##/root/.config/rox.sourceforge.net/MIME-types## first).
[[http://www.murga-linux.com/puppy/viewtopic.php?p=363429#363429 Example involving two MS applications running over wine, thread]]
[[http://www.murga-linux.com/puppy/viewtopic.php?p=363990 How to add a new MIME-type (file extension type) thread]]
[[http://theinfamousj.tumblr.com/post/13433505685/puppy-linux-adding-new-mime-filetypes adding MIME type on tumblr (with pics)]]


Revision [22126]

Edited on 2012-07-09 15:13:15 by darkcity
Additions:
~There are a few ways to associate file-types to programs in Puppy. The following descriptions are based on the [[RoxFiler ROX Filer]] and may not work with other file managers.
~Sometimes you won't be able to associate a file to a program because its MIME-type has not been defined. Looking in the file's //Properties > Type// will reveal only a general type (guessed by its content) - for example text/plain or application/x-executable. In this case you need to [[HowToAddMIMEType add a mime type]].
~For example, if the MIME-Type is ##application_x/audacity-project##
~then [[ROXFiler ROX]] will look for a file called ##application_x-audacity-project## (notice the ##/## is replaced by an ##_##).
~Typically this file is a script of a link to an executable. Often it is a link to a program's [[AppsDesktop .Desktop]] stored in ##/usr/share/applications##.
Deletions:
~There are a few ways to associate file-types to programs in Puppy. The following descriptions are based on the RoxFiler and may not work with other file managers.
~For example, if the MIME-Type is ##application_x/audacity-project## [[ROXFiler ROX]] will look for a file called ##application_x-audacity-project## (notice the ##/## is replaced by an ##_##). Typically this file is a script of a link to an executable. Often it is a link to a program's [[AppsDesktop .Desktop]] stored in ##/usr/share/applications##.


Revision [22125]

Edited on 2012-07-09 14:58:54 by darkcity
Additions:
~Default Action loads the file into the appropriate program when it is clicked (left-clicked) depending on its [[InternetMediaTypes MIME-type]]. ROX will look for file named after the MIME type, firstly in-
~~##~/.config/rox.sourceforge.net/MIME-types/[MIME-type]## then
~~##~/Choices/MIME-types/[MIME-type]##
~For example, if the MIME-Type is ##application_x/audacity-project## [[ROXFiler ROX]] will look for a file called ##application_x-audacity-project## (notice the ##/## is replaced by an ##_##). Typically this file is a script of a link to an executable. Often it is a link to a program's [[AppsDesktop .Desktop]] stored in ##/usr/share/applications##.
~ROX provides a graphical way to set Default-Action
Deletions:
~Default Action loads the program when the file is left-clicked.


Revision [22088]

Edited on 2012-07-07 13:31:17 by darkcity
Additions:
~There are a few ways to associate file-types to programs in Puppy. The following descriptions are based on the RoxFiler and may not work with other file managers.
==Default Action==
~Default Action loads the program when the file is left-clicked.
==Right-click Association==
~Right-click Association loads the program when the user goes - //Right-clicks menu > File 'document.doc' > Doc program//
==Open-with Association==
~Open-with Association loads the program when the user goes - //Right-clicks menu > File 'document.doc' > Open With > Program//
~[[FileTypes]]
~[[FileManagers]]
Deletions:
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'. The following descriptions are based on the RoxFiler and may not work with other file managers.
=='Right-click' Association==
[[FileTypes]]
[[FileManagers]]
[[http://roscidus.com/desktop/taxonomy/term/16 MimeTypes in Rox]]
[[http://roscidus.com/desktop/AppDirs ""AppDirs"" on ROX desktop]] - in Puppy ""AppDirs"" are only used for 'right-click' file associations rather than containing the whole apps


Revision [20576]

Edited on 2012-02-10 08:06:41 by darkcity [for rox filer]
Additions:
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'. The following descriptions are based on the RoxFiler and may not work with other file managers.
[[FileManagers]]
Deletions:
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'.


Revision [20544]

Edited on 2012-02-07 13:19:35 by darkcity [for rox filer]
Additions:
To set the 'default action' of a file-type follow the following instructions (modified from [[http://www.murga-linux.com/puppy/viewtopic.php?p=363990 this thread]]). **Jump to Step 3 if you wish to associate with program already installed.**
Deletions:
To set the 'default action' of a file-type follow the following instructions (modified from [[http://www.murga-linux.com/puppy/viewtopic.php?p=363990 this thread]])


Revision [20543]

Edited on 2012-02-07 13:17:52 by darkcity [for rox filer]
Additions:
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'.
Deletions:
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'.


Revision [20542]

Edited on 2012-02-07 13:16:17 by darkcity [for rox filer]
Additions:
~**A shortcut for making a 'right-click' association** is in the example of a jpeg, 'right click' on a jpeg file and select
~Open /usr/local/apps and copy an absolute link of the program you wish to associate
Deletions:
~A shortcut for getting to this directory is to right-click on a jpeg and select


Revision [20541]

Edited on 2012-02-07 13:12:43 by darkcity [for rox filer]
Additions:
~**An easy way to associate a file-type with a program** is (instead of step 3). is to use 'Set Run Action' i.e right click on a file of your type and enter the shell command/ or drag program on to box. In our example it would be ##exec textmaker "$1"##.
Deletions:
~**An alternative** to step 3. is to use 'Set Run Action' i.e right click on a file of your type and enter the shell command. In our example it would be ##exec textmaker "$1"##.


Revision [20527]

Edited on 2012-02-06 14:34:42 by darkcity [for rox filer]
Additions:
~Add or edit your MIME-Type to file-type definition. For example, if you have a TextMaker file whose extension is ##.tmd## and your making a non-standard MIME-type ##application/x-tmd## append the code ##application/x-tmd:*.tmd## to the globs file. ENSURE you end the line with a 'return' otherwise it won't work.
~(The x- in the MIME-type name above is used to indicate that this type hasn't already been registered with the MIME-type authorities ([[www.iana.org/assignments/media-types/ media-types]]). i.e. It is a non-standard/private/local type, not an IANA officially registered one.)
Deletions:
Add or edit your MIME-Type to file-type definition. For example, if you have a TextMaker file whose extension is ##.tmd## and your making a non-standard MIME-type ##application/x-tmd## append the code ##application/x-tmd:*.tmd## to the globs file. ENSURE you end the line with a 'return' otherwise it won't work.
(The x- in the MIME-type name above is used to indicate that this type hasn't already been registered with the MIME-type authorities ([[www.iana.org/assignments/media-types/ media-types]]). i.e. It is a non-standard/private/local type, not an IANA officially registered one.)


Revision [20526]

Edited on 2012-02-06 14:33:40 by darkcity [for rox filer]
Additions:
To pass a file to a [[WINE]] program see the follow example using Irfanview
~ ""AppRun"" -
~ %%#!/bin/sh
~**An alternative** to step 3. is to use 'Set Run Action' i.e right click on a file of your type and enter the shell command. In our example it would be ##exec textmaker "$1"##.
Deletions:
To pass a file to a [[WINE]] program see the follow example with Irfanview
~An alternative to step 3. is to use 'Set Run Action' i.e right click on a file of your type and enter the shell command. In our example it would be ##exec textmaker "$1"##.


Revision [20525]

Edited on 2012-02-06 14:31:58 by darkcity [for rox filer]
Additions:
You don't need the path to the executable (in this case ##/usr/local/textmaker/##) if the path directory your Linux [[PATH]] environment variable.
~~If textmaker was a [[WINE]] program then the script might be-
~~ textmaker -
~~ %%#!/bin/sh
Deletions:
You don't need the path to the executable (in this case ##/usr/local/textmaker/##) if the path directory your Linux [[PATH]] environment variable.
If textmaker was a [[WINE]] program then the script might be-


Revision [20511]

The oldest known version of this page was created on 2012-02-06 13:07:51 by darkcity [for rox filer]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki