Windows 'Folder Options' equivalent

Asked by Daniel Brumbaugh-Keeney

How do you change what media-type and programs are associated with a file extension

For example, how would I change all files ending with '.xht' to be served as 'application/xhtml+xml' and have the default action be 'geany --option /File/Path/Here'

Or, as I wrote it in the summary,
What is the equivalent of the Windows 'Folder Options'?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
marcobra (Marco Braida)
Solved:
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

Please open the menu Places -> Home Folder
search a .xht file select it and right click with mouse, then select
Open with... -> Open with Other application...
Select application from list
or click on Use custom command...
type the path of you "geany --option ...."

To view the complete path of command you like to use, please open a Terminal from the menu Applications->Accessories->Terminal and type:

which geany

give your user password when requested, you don't see nothing when you type it, then press enter.

Hope this help

Revision history for this message
Daniel Brumbaugh-Keeney (db-keen) said :
#2

Several Issues
* That only changes the default program if there is no default program set
* that doesn't allow the --option to be used by default when opening .xht files
* that doesn't change the media-type

Revision history for this message
Daniel Brumbaugh-Keeney (db-keen) said :
#3

Ignore the first issue, that is possible with the Properties dialog

Revision history for this message
Best marcobra (Marco Braida) (marcobra) said :
#4

But the --option must be an real geany option...
Please open a terminal and type:

man geany

for geany help and options

For example this work for me:
/usr/bin/geany -l

To "mime type" related to .xht please read this
http://ubuntuforums.org/showthread.php?t=150393

HTH

Revision history for this message
Daniel Brumbaugh-Keeney (db-keen) said :
#5

Thanks marcobra, that solved my question.