This happens because Rox Filer uses a pre-made list of applications called "mime types" to know which programs are installed in the system. When the program you've installed is not in that list, Rox cannot associate a file type to it, and therefore you won't be able to execute it with a simple clic or enter press.
I found a first workaround to this problem that I documented here: http://murga-linux.com/puppy/viewtopic.php?t=106994. But such system was created before I knew how to modify the Mime types, so this current post supersedes that one.
This page in the Puppy wiki shows how to modify Mime types for your purposes:
http://www.puppylinux.org/wikka/HowToAddMIMEType
It seems to create a new mime-type all you need is adding 4 lines of code per program. The wiki offers two systems to do that: the first, which I haven't tried, is automated, running the update-mime command. It has the drawback that it requires to have installed the devx file that corresponds to our Puppy, and also, there are certain Puppy versions in which it doesn't work (version 4, I think).
The second option shows you how to create manually one single new mime type entry, like I said just adding 4 lines of code, in different places. I've simply taken the code from the wiki and added user input to automate things a bit. Here is the script I use:
Code: Select all
#!/bin/sh
#add mime-type (without using update-mime-database)
clear
echo "Application name?"
read a
echo "File termination (without the .)?"
read b
echo application/x-$a-project:*.$b >> /usr/share/mime/globs
echo 50:application/x-$a-project:*.$b >> /usr/share/mime/globs2
echo application/x-$a-project text/xml >> /usr/share/mime/subclasses
echo application/x-$a-project >> /usr/share/mime/types
echo "New MIME type added. You might need to restart the graphic server"
So the full process to have a new file type configured goes like this (I'll use the Hydrogen drumming machine, whose file termination is .h2song, as an example):
1) Run the script in a terminal. First reply, "hydrogen",enter, second "h2song", enter
The new Mime type is created; now Rox-Filer recognizes an application called Hydrogen, but the Mime type is still empty; we have to tell Rox what to open and what icon to show with the files.
2) To configure which program will open the file: In Rox-filer, go to one file of the type you just configured, and right click on it. Select "set run action", and type the command that must execute that file ("hydrogen -s $1" or "hydrogen -s $@" in this case. The final characters are like a placeholder that tells the computer "whatever file we're pointing at").
Now click or press enter on an .h2song, and it should be open by Hydrogen directly.
3)Now we have to configure the icon that all .h2song files will show. There should be an easier way to do this, by adding the icon image directly in some of ROX's folders and having it automatically associated, but I haven't been able to configure it, so here's what I have:
Again in Rox-Filer, right click on the file of the kind you want to configure, and select "set icon". A window will open. On top there are two options. Mark the one that has the name of your program in it. Drag the icon image you want to the window, and you're done.
Regarding icon images, I've found that they tend to be scattered around the system tree (because programs get installed in very diverse places), so what I do to find the icons in my system is:
(DON'T BOTHER WITH THIS PROCESS BELOW
Use Jwm menu>Graphic>Icon finder instead. Far more useful and clear.)
1) make a list of everything that might contain an icon, and put it in a text file:
Code: Select all
find / -name '*icon*' > icons_paths
2) When the time comes when you need an icon for a certain program, filter that list to show only the lines that contain that program
Code: Select all
cat icons_paths | grep hydrogen
This system is easier done than explained, I thought some people might find it helpful or, at the very least, get out of this some insights on how the MIME types work.